hw/mips/malta: turn off x86 specific features of PIIX4_PM
commitbd64c210ce2bebba993ee49d34327706ec47f685
authorIgor Mammedov <imammedo@redhat.com>
Thu, 28 Jul 2022 11:50:34 +0000 (28 07:50 -0400)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 8 Aug 2022 21:23:11 +0000 (8 23:23 +0200)
tree24c0dbad25b043dc70358c5a70f0fe1c773fcc13
parent8809baf4e40633ba01b47cd2257bbbbba14fc861
hw/mips/malta: turn off x86 specific features of PIIX4_PM

QEMU crashes trying to save VMSTATE when only MIPS target are compiled in
  $ qemu-system-mips -monitor stdio
  (qemu) migrate "exec:gzip -c > STATEFILE.gz"
  Segmentation fault (core dumped)

It happens due to PIIX4_PM trying to parse hotplug vmstate structures
which are valid only for x86 and not for MIPS (as it requires ACPI
tables support which is not existent for ithe later)

Issue was probably exposed by trying to cleanup/compile out unused
ACPI bits from MIPS target (but forgetting about migration bits).

Disable compiled out features using compat properties as the least
risky way to deal with issue.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/995
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20220728115034.1327988-1-imammedo@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/mips/malta.c