mirror_qemu/hw
Peter Xu 0ab994867c apic: Use 32bit APIC ID for migration instance ID
Migration is silently broken now with x2apic config like this:

     -smp 200,maxcpus=288,sockets=2,cores=72,threads=2 \
     -device intel-iommu,intremap=on,eim=on

After migration, the guest kernel could hang at anything, due to
x2apic bit not migrated correctly in IA32_APIC_BASE on some vcpus, so
any operations related to x2apic could be broken then (e.g., RDMSR on
x2apic MSRs could fail because KVM would think that the vcpu hasn't
enabled x2apic at all).

The issue is that the x2apic bit was never applied correctly for vcpus
whose ID > 255 when migrate completes, and that's because when we
migrate APIC we use the APICCommonState.id as instance ID of the
migration stream, while that's too short for x2apic.

Let's use the newly introduced initial_apic_id for that.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2020-01-20 09:10:23 +01:00
..
9pfs 9pfs: make Error **errp const where it is appropriate 2019-12-18 08:43:19 +01:00
acpi hmat acpi: Build Memory Side Cache Information Structure(s) 2020-01-05 07:03:03 -05:00
adc Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
alpha hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
arm migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
audio hda-codec: fix recording rate control 2020-01-06 08:47:16 +01:00
block * Compat machines fix (Denis) 2020-01-10 17:16:49 +00:00
bt Remove the core bluetooth code 2019-12-17 09:01:14 +01:00
char * Compat machines fix (Denis) 2020-01-10 17:16:49 +00:00
core migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
cpu hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
cris cris: improve passing PIC interrupt vector to the CPU 2020-01-07 17:24:29 +04:00
display migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
dma lance: replace PROP_PTR with PROP_LINK 2020-01-07 17:24:29 +04:00
gpio omap-gpio: remove PROP_PTR 2020-01-07 17:24:29 +04:00
hppa hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
hyperv hyperv: Use auto rcu_read macros 2019-12-17 19:33:52 +01:00
i2c migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
i386 * Compat machines fix (Denis) 2020-01-10 17:16:49 +00:00
ide vmstate: replace DeviceState with VMStateIf 2020-01-06 18:41:32 +04:00
input migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
intc apic: Use 32bit APIC ID for migration instance ID 2020-01-20 09:10:23 +01:00
ipack Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
ipmi chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
isa hw/isa/isa-bus: cleanup irq functions 2019-12-17 19:33:51 +01:00
lm32 Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
m68k Clean-ups: qom-ify serial and remove QDEV_PROP_PTR 2020-01-07 17:54:29 +00:00
mem memory-device: Fix memory pre-plug error API violations 2019-12-18 08:36:15 +01:00
microblaze microblaze: fix leak of fdevice tree blob 2019-10-04 18:49:16 +02:00
mips * Compat machines fix (Denis) 2020-01-10 17:16:49 +00:00
misc migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
moxie Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
net migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
nios2 Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
nubus hw/m68k: add Nubus support 2019-10-28 19:06:47 +01:00
nvram hw/nvram/Kconfig: Restrict CHRP NVRAM to machines using OpenBIOS or SLOF 2020-01-07 12:08:39 +01:00
openrisc Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
pci migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
pci-bridge numa: move numa global variable nb_numa_nodes into MachineState 2019-09-03 11:26:55 -03:00
pci-host hw/pci-host: Add Kconfig entry to select the IGD Passthrough Host Bridge 2019-12-18 02:34:12 +01:00
pcmcia Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
ppc migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
rdma hw/rdma: Utilize ibv_reg_mr_iova for memory registration 2019-11-06 12:49:04 +02:00
riscv chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
rtc hw/rtc/mc146818: Add missing dependency on ISA Bus 2020-01-07 12:23:10 +01:00
s390x vmstate: replace DeviceState with VMStateIf 2020-01-06 18:41:32 +04:00
scsi * Compat machines fix (Denis) 2020-01-10 17:16:49 +00:00
sd hw/sd: drop extra whitespace in sdhci_sysbus_realize() header 2019-12-18 08:43:19 +01:00
semihosting semihosting: add qemu_semihosting_console_inc for SYS_READC 2020-01-09 11:41:29 +00:00
sh4 sm501: make SerialMM a child, export chardev property 2020-01-07 17:24:29 +04:00
smbios smbios:ipmi: Ignore IPMI devices with no fwinfo function 2019-09-20 14:08:10 -05:00
sparc * Compat machines fix (Denis) 2020-01-10 17:16:49 +00:00
sparc64 hw/nvram/Kconfig: Restrict CHRP NVRAM to machines using OpenBIOS or SLOF 2020-01-07 12:08:39 +01:00
ssi aspeed/smc: Add AST2600 timings registers 2019-12-16 10:46:34 +00:00
timer migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
tpm migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
tricore Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
unicore32 Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
usb usb: bugfixes for xhci, usb pass-through and usb redirection. 2020-01-13 14:19:57 +00:00
vfio vfio/pci: Don't remove irqchip notifier if not registered 2020-01-06 14:19:42 -07:00
virtio virtio: reset region cache when on queue deletion 2020-01-06 12:04:51 -05:00
watchdog aspeed: Change the "scu" property definition 2019-12-16 10:46:34 +00:00
xen xen: convert "-machine igd-passthru" to an accelerator property 2019-12-17 19:32:27 +01:00
xenpv Include sysemu/sysemu.h a lot less 2019-08-16 13:31:53 +02:00
xtensa hw/xtensa: add virt machine 2019-10-18 20:38:10 -07:00
Kconfig Remove the core bluetooth code 2019-12-17 09:01:14 +01:00
Makefile.objs Remove the core bluetooth code 2019-12-17 09:01:14 +01:00