summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/lapic.h
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2023-01-07 01:10:23 +0000
committerSean Christopherson <seanjc@google.com>2023-01-24 10:04:35 -0800
commitb5fcc59be72a76b5cf7bcc6d4aba6cdb14557d44 (patch)
treec10ad769f8cbf60b562abc68c77f739ef3aab476 /arch/x86/kvm/lapic.h
parentb223649576fc21bec46260805c2cd70e1cb3b8e8 (diff)
downloadlinux-stable-b5fcc59be72a76b5cf7bcc6d4aba6cdb14557d44.tar.gz
linux-stable-b5fcc59be72a76b5cf7bcc6d4aba6cdb14557d44.tar.bz2
linux-stable-b5fcc59be72a76b5cf7bcc6d4aba6cdb14557d44.zip
KVM: x86: Split out logic to generate "readable" APIC regs mask to helper
Move the generation of the readable APIC regs bitmask to a standalone helper so that VMX can use the mask for its MSR interception bitmaps. No functional change intended. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20230107011025.565472-5-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/kvm/lapic.h')
-rw-r--r--arch/x86/kvm/lapic.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
index df316ede7546..0a0ea4b5dd8c 100644
--- a/arch/x86/kvm/lapic.h
+++ b/arch/x86/kvm/lapic.h
@@ -146,6 +146,8 @@ int kvm_hv_vapic_msr_read(struct kvm_vcpu *vcpu, u32 msr, u64 *data);
int kvm_lapic_set_pv_eoi(struct kvm_vcpu *vcpu, u64 data, unsigned long len);
void kvm_lapic_exit(void);
+u64 kvm_lapic_readable_reg_mask(struct kvm_lapic *apic);
+
#define VEC_POS(v) ((v) & (32 - 1))
#define REG_POS(v) (((v) >> 5) << 4)