summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/lapic.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-11-21 12:01:51 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2019-11-21 14:03:40 +0300
commit46f4f0aabc61bfd365e1eb3c8a6d766d1a49cf32 (patch)
treef98a256ff3e4b20ca6252f7f80ce17759e57c6f2 /arch/x86/kvm/lapic.h
parent14edff88315add29099fd8eebb9ef989c2e47c18 (diff)
parentb07a5c53d42a8c87b208614129e947dd2338ff9c (diff)
downloadlinux-46f4f0aabc61bfd365e1eb3c8a6d766d1a49cf32.tar.xz
Merge branch 'kvm-tsx-ctrl' into HEAD
Conflicts: arch/x86/kvm/vmx/vmx.c
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 c1d77436126a..39925afdfcdc 100644
--- a/arch/x86/kvm/lapic.h
+++ b/arch/x86/kvm/lapic.h
@@ -245,4 +245,9 @@ static inline enum lapic_mode kvm_apic_mode(u64 apic_base)
return apic_base & (MSR_IA32_APICBASE_ENABLE | X2APIC_ENABLE);
}
+static inline u8 kvm_xapic_id(struct kvm_lapic *apic)
+{
+ return kvm_lapic_get_reg(apic, APIC_ID) >> 24;
+}
+
#endif