aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/lapic.h
diff options
context:
space:
mode:
authorJue Wang <juew@google.com>2022-06-10 10:11:28 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-24 04:52:01 -0400
commit1d8c681fb6ed459128ab9d5e36adb7ec06a26aea (patch)
tree4cf055e55e7ac8b7d94dfd53731c377ada313c3a /arch/x86/kvm/lapic.h
parentKVM: x86: Make APIC_VERSION capture only the magic 0x14UL. (diff)
downloadlinux-dev-1d8c681fb6ed459128ab9d5e36adb7ec06a26aea.tar.xz
linux-dev-1d8c681fb6ed459128ab9d5e36adb7ec06a26aea.zip
KVM: x86: Fill apic_lvt_mask with enums / explicit entries.
This patch defines a lapic_lvt_entry enum used as explicit indices to the apic_lvt_mask array. In later patches a LVT_CMCI will be added to implement the 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-3-juew@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.h')
-rw-r--r--arch/x86/kvm/lapic.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
index 6207b64b1281..af26777fb0ea 100644
--- a/arch/x86/kvm/lapic.h
+++ b/arch/x86/kvm/lapic.h
@@ -10,7 +10,6 @@
#define KVM_APIC_INIT 0
#define KVM_APIC_SIPI 1
-#define KVM_APIC_LVT_NUM 6
#define APIC_SHORT_MASK 0xc0000
#define APIC_DEST_NOSHORT 0x0
@@ -29,6 +28,17 @@ enum lapic_mode {
LAPIC_MODE_X2APIC = MSR_IA32_APICBASE_ENABLE | X2APIC_ENABLE,
};
+enum lapic_lvt_entry {
+ LVT_TIMER,
+ LVT_THERMAL_MONITOR,
+ LVT_PERFORMANCE_COUNTER,
+ LVT_LINT0,
+ LVT_LINT1,
+ LVT_ERROR,
+
+ KVM_APIC_MAX_NR_LVT_ENTRIES,
+};
+
struct kvm_timer {
struct hrtimer timer;
s64 period; /* unit: ns */