KVM: x86: Add APIC_LVTx() macro.
authorJue Wang <juew@google.com>
Fri, 10 Jun 2022 17:11:29 +0000 (10:11 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Jun 2022 08:52:02 +0000 (04:52 -0400)
commit987f625e0799c9666ce0a0e18c2d0c001db96fad
tree73d025bbe7c19c7e2a728927029399d0a8dee7c1
parent1d8c681fb6ed459128ab9d5e36adb7ec06a26aea
KVM: x86: Add APIC_LVTx() macro.

An APIC_LVTx macro is introduced to calcualte the APIC_LVTx register
offset based on the index in the lapic_lvt_entry enum. Later patches
will extend the APIC_LVTx macro to support the APIC_LVTCMCI register
in order to implement Corrected Machine Check Interrupt signaling.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Jue Wang <juew@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220610171134.772566-4-juew@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h