qemu/hw/intc
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
..
Kconfig hw/intc/i8259: Fix Kconfig dependency on ISA bus 2020-01-07 12:08:39 +01:00
Makefile.objs
allwinner-a10-pic.c
apic.c hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
apic_common.c apic: Use 32bit APIC ID for migration instance ID 2020-01-20 09:10:23 +01:00
arm_gic.c
arm_gic_common.c
arm_gic_kvm.c
arm_gicv2m.c
arm_gicv3.c
arm_gicv3_common.c
arm_gicv3_cpuif.c arm/gicv3: update virtual irq state after IAR register read 2020-01-17 14:27:16 +00:00
arm_gicv3_dist.c
arm_gicv3_its_common.c
arm_gicv3_its_kvm.c
arm_gicv3_kvm.c
arm_gicv3_redist.c
armv7m_nvic.c
aspeed_vic.c
bcm2835_ic.c
bcm2836_control.c
etraxfs_pic.c cris: improve passing PIC interrupt vector to the CPU 2020-01-07 17:24:29 +04:00
exynos4210_combiner.c
exynos4210_gic.c
gic_internal.h
gicv3_internal.h
grlib_irqmp.c leon3: use qemu_irq framework instead of callback as property 2020-01-07 17:24:29 +04:00
heathrow_pic.c
i8259.c hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
i8259_common.c hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
imx_avic.c
imx_gpcv2.c
intc.c
ioapic.c hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
ioapic_common.c
lm32_pic.c
mips_gic.c
nios2_iic.c
omap_intc.c omap-intc: remove PROP_PTR 2020-01-07 17:24:29 +04:00
ompic.c
openpic.c
openpic_kvm.c
pl190.c
pnv_xive.c pnv/xive: Deduce the PnvXive pointer from XiveTCTX::xptr 2020-01-08 11:01:59 +11:00
pnv_xive_regs.h
puv3_intc.c
realview_gic.c
s390_flic.c
s390_flic_kvm.c hw/intc/s390: Simplify error handling in kvm_s390_flic_realize() 2019-12-18 08:36:15 +01:00
sh_intc.c
slavio_intctl.c
spapr_xive.c xive: Add a "presenter" link property to the TCTX object 2020-01-08 11:01:59 +11:00
spapr_xive_kvm.c spapr/xive: Deduce the SpaprXive pointer from XiveTCTX::xptr 2020-01-08 11:01:59 +11:00
trace-events
vgic_common.h
xics.c xics: Don't deassert outputs 2019-12-17 10:39:48 +11:00
xics_kvm.c
xics_pnv.c
xics_spapr.c
xilinx_intc.c
xive.c xive: Add a "presenter" link property to the TCTX object 2020-01-08 11:01:59 +11:00
xlnx-pmu-iomod-intc.c
xlnx-zynqmp-ipi.c