On Thu, 28 Jul 2022 at 15:44, Dr. David Alan Gilbert <dgilb...@redhat.com> wrote: > > * Igor Mammedov (imamm...@redhat.com) wrote: > > 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. > > Isn't the problem partially due to a 'stub' vmsd which isn't terminated?
Yes, but setting these properties causes that vmsd (vmstate_acpi_pcihp_pci_status) to not be used: * it is used only in VMSTATE_PCI_HOTPLUG() * that macro is used only in hw/acpi/ich9.c (not relevant here) and hw/acpi/piix4.c * in piix4.c it is invoked passing it the test functions vmstate_test_use_acpi_hotplug_bridge and vmstate_test_migrate_acpi_index * setting the properties on the device as this patch does causes those test functions to return false, so the vmstate_acpi_pcihp_pci_status is never examined -- PMM