diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2014-10-30 14:06:47 (GMT) |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-11-03 11:07:32 (GMT) |
commit | f30ebc312ca9def25650b4e1d01cdb425c310dca (patch) | |
tree | bc3bda35500fdd10e6d2dced919633fde0c322c3 /arch/x86/kvm/lapic.h | |
parent | a323b409820c8afd33fbd841f5534eb84b406e8d (diff) | |
download | linux-f30ebc312ca9def25650b4e1d01cdb425c310dca.tar.xz |
KVM: x86: optimize some accesses to LVTT and SPIV
We mirror a subset of these registers in separate variables.
Using them directly should be faster.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.h')
-rw-r--r-- | arch/x86/kvm/lapic.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index 35d83dc..d4365f2 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h @@ -121,11 +121,11 @@ static inline int kvm_apic_hw_enabled(struct kvm_lapic *apic) extern struct static_key_deferred apic_sw_disabled; -static inline int kvm_apic_sw_enabled(struct kvm_lapic *apic) +static inline bool kvm_apic_sw_enabled(struct kvm_lapic *apic) { if (static_key_false(&apic_sw_disabled.key)) - return kvm_apic_get_reg(apic, APIC_SPIV) & APIC_SPIV_APIC_ENABLED; - return APIC_SPIV_APIC_ENABLED; + return apic->sw_enabled; + return true; } static inline bool kvm_apic_present(struct kvm_vcpu *vcpu) |