diff options
author | Sean Christopherson <seanjc@google.com> | 2023-01-07 02:10:23 +0100 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-01-24 19:04:35 +0100 |
commit | b5fcc59be72a76b5cf7bcc6d4aba6cdb14557d44 (patch) | |
tree | c10ad769f8cbf60b562abc68c77f739ef3aab476 /arch/x86/kvm/lapic.h | |
parent | KVM: x86: Mark x2APIC DFR reg as non-existent for x2APIC (diff) | |
download | linux-b5fcc59be72a76b5cf7bcc6d4aba6cdb14557d44.tar.xz linux-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.h | 2 |
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) |