aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/lapic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/lapic.h')
-rw-r--r--arch/x86/kvm/lapic.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
index 9a8ee22bc7a3..22a5397b638c 100644
--- a/arch/x86/kvm/lapic.h
+++ b/arch/x86/kvm/lapic.h
@@ -126,4 +126,9 @@ static inline int kvm_lapic_enabled(struct kvm_vcpu *vcpu)
126 return kvm_apic_present(vcpu) && kvm_apic_sw_enabled(vcpu->arch.apic); 126 return kvm_apic_present(vcpu) && kvm_apic_sw_enabled(vcpu->arch.apic);
127} 127}
128 128
129static inline int apic_x2apic_mode(struct kvm_lapic *apic)
130{
131 return apic->vcpu->arch.apic_base & X2APIC_ENABLE;
132}
133
129#endif 134#endif