qemu-e2k/include
Dr. David Alan Gilbert a83c284490 acpi: fix acpi_index migration
vmstate_acpi_pcihp_use_acpi_index() was expecting AcpiPciHpState
as state but it actually received PIIX4PMState, because
VMSTATE_PCI_HOTPLUG is a macro and not another struct.
So it ended up accessing random pointer, which resulted
in 'false' return value and acpi_index field wasn't ever
sent.

However in 7.0 that pointer de-references to value > 0, and
destination QEMU starts to expect the field which isn't
sent in migratioon stream from older QEMU (6.2 and older).
As result migration fails with:
  qemu-system-x86_64: Missing section footer for 0000:00:01.3/piix4_pm
  qemu-system-x86_64: load of migration failed: Invalid argument

In addition with QEMU-6.2, destination due to not expected
state, also never expects the acpi_index field in migration
stream.

Q35 is not affected as it always sends/expects the field as
long as acpi based PCI hotplug is enabled.

Fix issue by introducing compat knob to never send/expect
acpi_index in migration stream for 6.2 and older PC machine
types and always send it for 7.0 and newer PC machine types.

Diagnosed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Fixes: b32bd76 ("pci: introduce acpi-index property for PCI device")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/932
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-04-06 20:03:26 +01:00
..
authz
block block: pass desired TLS hostname through from block driver client 2022-03-07 15:58:42 -06:00
chardev Replace GCC_FMT_ATTR with G_GNUC_PRINTF 2022-03-22 14:40:51 +04:00
crypto crypto: Make QCryptoTLSCreds* structures private 2021-06-29 18:30:24 +01:00
disas Replace GCC_FMT_ATTR with G_GNUC_PRINTF 2022-03-22 14:40:51 +04:00
exec softmmu/physmem: Introduce MemTxAttrs::memory field and MEMTX_ACCESS_ERROR 2022-03-21 10:10:58 +01:00
fpu softfloat: Add float64r32 arithmetic routines 2021-12-17 17:57:15 +01:00
hw acpi: fix acpi_index migration 2022-04-06 20:03:26 +01:00
io
libdecnumber libdecnumber: Introduce decNumberIntegralToInt128 2021-11-09 10:32:52 +11:00
migration migration: Remove load_state_old and minimum_version_id_old 2022-03-02 18:20:45 +00:00
monitor Replace GCC_FMT_ATTR with G_GNUC_PRINTF 2022-03-22 14:40:51 +04:00
net Revert "virtio-net: add support for configure interrupt" 2022-01-10 16:00:54 -05:00
qapi Replace GCC_FMT_ATTR with G_GNUC_PRINTF 2022-03-22 14:40:51 +04:00
qemu main-loop: Disable GLOBAL_STATE_CODE() assertions 2022-03-29 16:30:55 +02:00
qom compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINATED 2022-03-22 14:40:51 +04:00
scsi
semihosting semihosting: Move include/hw/semihosting/ -> include/semihosting/ 2021-03-10 15:34:12 +00:00
standard-headers headers: Add pvpanic.h 2022-03-06 05:08:23 -05:00
sysemu softmmu: List CPU types again 2022-03-16 08:43:10 +01:00
tcg tcg: Add opcodes for vector nand, nor, eqv 2022-03-04 08:50:41 -10:00
ui ui/dbus: fix texture sharing 2022-03-15 12:54:55 +04:00
user common-user: Move safe-syscall.* from linux-user 2021-12-20 10:12:24 -08:00
elf.h elf: Add machine type value for LoongArch 2021-12-21 13:17:06 -08:00
glib-compat.h docs/devel: more documentation on the use of suffixes 2022-01-18 16:42:42 +00:00
qemu-common.h util: remove the net/net.h dependency 2022-03-22 14:46:17 +04:00
qemu-io.h