KVM: nVMX: Fix host crash when loading MSRs with userspace irqchip
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 4 May 2015 06:32:32 +0000 (08:32 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 8 May 2015 08:51:45 +0000 (10:51 +0200)
commit8a9781f7ad0087182c51c629335803264568ef3b
treee3f24554a01b312d269f74beca71451a015f936e
parentacac6f89574c743796c9c947e046a0d6637d5fe2
KVM: nVMX: Fix host crash when loading MSRs with userspace irqchip

vcpu->arch.apic is NULL when a userspace irqchip is active. But instead
of letting the test incorrectly depend on in-kernel irqchip mode,
open-code it to catch also userspace x2APICs.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c