diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-29 12:05:37 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-10-01 15:06:25 +0200 |
commit | 35754c987f252e859bfa390a6816e85563afe79d (patch) | |
tree | cfb0a2d85738ea20b4421a13c2c5a8313b65f69d /arch/x86/kvm/mmu.c | |
parent | d50ab6c1a2b24e12d3012d7beb343eba5b94a6ca (diff) | |
download | lwn-35754c987f252e859bfa390a6816e85563afe79d.tar.gz lwn-35754c987f252e859bfa390a6816e85563afe79d.zip |
KVM: x86: introduce lapic_in_kernel
Avoid pointer chasing and memory barriers, and simplify the code
when split irqchip (LAPIC in kernel, IOAPIC/PIC in userspace)
is introduced.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index ff606f507913..c3f39aa9b9cb 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -3427,7 +3427,7 @@ static int kvm_arch_setup_async_pf(struct kvm_vcpu *vcpu, gva_t gva, gfn_t gfn) static bool can_do_async_pf(struct kvm_vcpu *vcpu) { - if (unlikely(!irqchip_in_kernel(vcpu->kvm) || + if (unlikely(!lapic_in_kernel(vcpu) || kvm_event_needs_reinjection(vcpu))) return false; |