summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/lapic.h
diff options
context:
space:
mode:
authorWei Yang <richardw.yang@linux.intel.com>2019-03-31 19:17:22 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2019-06-18 11:43:47 +0200
commitee171d2f39d60c6405dc21a0aaa766cad2c9c43e (patch)
tree34dfcd86b640b0d58a783cc26d9f818f8f3e3f49 /arch/x86/kvm/lapic.h
parent7d2296bfa52cc9b63063935dd21ca5fa0d790754 (diff)
kvm: x86: use same convention to name kvm_lapic_{set,clear}_vector()
apic_clear_vector() is the counterpart of kvm_lapic_set_vector(), while they have different naming convention. Rename it and move together to arch/x86/kvm/lapic.h. Also fix one typo in comment by hand. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
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 f974a3d5a44d..36747174e4a8 100644
--- a/arch/x86/kvm/lapic.h
+++ b/arch/x86/kvm/lapic.h
@@ -130,6 +130,11 @@ void kvm_lapic_exit(void);
#define VEC_POS(v) ((v) & (32 - 1))
#define REG_POS(v) (((v) >> 5) << 4)
+static inline void kvm_lapic_clear_vector(int vec, void *bitmap)
+{
+ clear_bit(VEC_POS(vec), (bitmap) + REG_POS(vec));
+}
+
static inline void kvm_lapic_set_vector(int vec, void *bitmap)
{
set_bit(VEC_POS(vec), (bitmap) + REG_POS(vec));