aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/lapic.c
diff options
context:
space:
mode:
authorNadav Amit <namit@cs.technion.ac.il>2014-11-02 04:54:59 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2014-11-08 02:20:51 -0500
commitdb324fe6f20b0ad118d230da23107ddb12784e8c (patch)
tree03fa36f2a03bcb53dcba7d7b53464aabcf2ec171 /arch/x86/kvm/lapic.c
parentd14cb5df59037f690e62f828c9977c23b1a59e0b (diff)
KVM: x86: Warn on APIC base relocation
APIC base relocation is unsupported by KVM. If anyone uses it, the least should be to report a warning in the hypervisor. Note that KVM-unit-tests uses this feature for some reason, so running the tests triggers the warning. Signed-off-by: Nadav Amit <namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r--arch/x86/kvm/lapic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index e7f7fc632a9b..344e7d36d0e8 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1457,6 +1457,10 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)
1457 apic->base_address = apic->vcpu->arch.apic_base & 1457 apic->base_address = apic->vcpu->arch.apic_base &
1458 MSR_IA32_APICBASE_BASE; 1458 MSR_IA32_APICBASE_BASE;
1459 1459
1460 if ((value & MSR_IA32_APICBASE_ENABLE) &&
1461 apic->base_address != APIC_DEFAULT_PHYS_BASE)
1462 pr_warn_once("APIC base relocation is unsupported by KVM");
1463
1460 /* with FSB delivery interrupt, we can restart APIC functionality */ 1464 /* with FSB delivery interrupt, we can restart APIC functionality */
1461 apic_debug("apic base msr is 0x%016" PRIx64 ", and base address is " 1465 apic_debug("apic base msr is 0x%016" PRIx64 ", and base address is "
1462 "0x%lx.\n", apic->vcpu->arch.apic_base, apic->base_address); 1466 "0x%lx.\n", apic->vcpu->arch.apic_base, apic->base_address);