OSDN Git Service

KVM: x86: cull apicv code when userspace irqchip is requested
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 30 Jan 2019 16:18:59 +0000 (17:18 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 Feb 2019 21:48:21 +0000 (22:48 +0100)
commitf7589cca50ef8970dda56cdced8d96d05aa0a777
tree972efe21769c8d3b7462fafd3eb353a031bf5045
parent98d90582be2e08246a70af31e09950ecb8876252
KVM: x86: cull apicv code when userspace irqchip is requested

Currently apicv_active can be true even if in-kernel LAPIC
emulation is disabled.  Avoid this by properly initializing
it in kvm_arch_vcpu_init, and then do not do anything to
deactivate APICv when it is actually not used

(Currently APICv is only deactivated by SynIC code that in turn
is only reachable when in-kernel LAPIC is in use.  However, it is
cleaner if kvm_vcpu_deactivate_apicv avoids relying on this.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c