qemu-patch-raspberry4/hw/i386
Dr. David Alan Gilbert f8d9ccf8d5 kvm: apic: set APIC base as part of kvm_apic_put
The parsing of KVM_SET_LAPIC's input depends on the current value of the
APIC base MSR---which indeed is stored in APICCommonState---but for historical
reasons APIC base is set through KVM_SET_SREGS together with cr8 (which is
really just the APIC TPR) and the actual "special CPU registers".

APIC base must now be set before the actual LAPIC registers, so do that
in kvm_apic_put.  It will be set again to the same value with KVM_SET_SREGS,
but that's not a big issue.

This only happens since Linux 4.8, which checks for x2apic mode in
KVM_SET_LAPIC.  However it's really a QEMU bug; until the recent
commit 78d6a05 ("x86/lapic: Load LAPIC state at post_load", 2016-09-13)
QEMU was indeed setting APIC base (via KVM_SET_SREGS) before the other
LAPIC registers.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-09-22 17:25:59 +02:00
..
kvm kvm: apic: set APIC base as part of kvm_apic_put 2016-09-22 17:25:59 +02:00
xen include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
acpi-build.c acpi-build: fix array leak 2016-09-08 18:05:21 +04:00
acpi-build.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
intel_iommu.c intel_iommu: avoid unnamed fields 2016-07-21 20:44:20 +03:00
intel_iommu_internal.h intel_iommu: support all masks in interrupt entry cache invalidation 2016-07-21 20:44:19 +03:00
kvmvapic.c kvmvapic: fix state change handler 2016-09-15 15:10:06 +02:00
Makefile.objs x86-iommu: introduce parent class 2016-07-20 19:30:27 +03:00
multiboot.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc.c pc: apic: fix touch LAPIC when irqchip is split 2016-09-14 12:25:14 +02:00
pc_piix.c pc: Add 2.8 machine 2016-09-09 20:58:34 +03:00
pc_q35.c pc: Add 2.8 machine 2016-09-09 20:58:34 +03:00
pc_sysfw.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
pci-assign-load-rom.c pci-assign: Move "Invalid ROM" error message to pci-assign-load-rom.c 2016-06-29 14:03:47 +02:00
trace-events trace-event: display "%d" instead of "0x%d" 2016-09-13 18:12:34 +03:00
x86-iommu.c x86-iommu: introduce IEC notifiers 2016-07-21 20:43:49 +03:00