diff options
| author | Neeraj Upadhyay <[email protected]> | 2025-07-09 03:32:16 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2025-07-10 16:44:41 +0000 |
| commit | b5f8980f29ce20357c6ee364a83c55f2bdf2dfde (patch) | |
| tree | 1cfa17f7cdc3c514136151cf47454e42f98fb760 | |
| parent | KVM: x86: Rename lapic get/set_reg64() helpers (diff) | |
| download | kernel-b5f8980f29ce20357c6ee364a83c55f2bdf2dfde.tar.gz kernel-b5f8980f29ce20357c6ee364a83c55f2bdf2dfde.zip | |
KVM: x86: Rename lapic set/clear vector helpers
In preparation for moving kvm-internal kvm_lapic_set_vector(),
kvm_lapic_clear_vector() to apic.h for use in Secure AVIC APIC driver,
rename them as part of the APIC API.
No functional change intended.
Signed-off-by: Neeraj Upadhyay <[email protected]>
Acked-by: Sean Christopherson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
| -rw-r--r-- | arch/x86/kvm/lapic.c | 10 | ||||
| -rw-r--r-- | arch/x86/kvm/lapic.h | 6 |
2 files changed, 7 insertions, 9 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index b7a9d7037cab..27cc8dc1514e 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -718,10 +718,10 @@ static inline int apic_find_highest_irr(struct kvm_lapic *apic) static inline void apic_clear_irr(int vec, struct kvm_lapic *apic) { if (unlikely(apic->apicv_active)) { - kvm_lapic_clear_vector(vec, apic->regs + APIC_IRR); + apic_clear_vector(vec, apic->regs + APIC_IRR); } else { apic->irr_pending = false; - kvm_lapic_clear_vector(vec, apic->regs + APIC_IRR); + apic_clear_vector(vec, apic->regs + APIC_IRR); if (apic_search_irr(apic) != -1) apic->irr_pending = true; } @@ -1328,11 +1328,9 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode, if (apic_test_vector(vector, apic->regs + APIC_TMR) != !!trig_mode) { if (trig_mode) - kvm_lapic_set_vector(vector, - apic->regs + APIC_TMR); + apic_set_vector(vector, apic->regs + APIC_TMR); else - kvm_lapic_clear_vector(vector, - apic->regs + APIC_TMR); + apic_clear_vector(vector, apic->regs + APIC_TMR); } kvm_x86_call(deliver_interrupt)(apic, delivery_mode, diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index a49e4c21db35..c7babae8af83 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h @@ -145,19 +145,19 @@ void kvm_lapic_exit(void); u64 kvm_lapic_readable_reg_mask(struct kvm_lapic *apic); -static inline void kvm_lapic_clear_vector(int vec, void *bitmap) +static inline void apic_clear_vector(int vec, void *bitmap) { clear_bit(APIC_VECTOR_TO_BIT_NUMBER(vec), bitmap + APIC_VECTOR_TO_REG_OFFSET(vec)); } -static inline void kvm_lapic_set_vector(int vec, void *bitmap) +static inline void apic_set_vector(int vec, void *bitmap) { set_bit(APIC_VECTOR_TO_BIT_NUMBER(vec), bitmap + APIC_VECTOR_TO_REG_OFFSET(vec)); } static inline void kvm_lapic_set_irr(int vec, struct kvm_lapic *apic) { - kvm_lapic_set_vector(vec, apic->regs + APIC_IRR); + apic_set_vector(vec, apic->regs + APIC_IRR); /* * irr_pending must be true if any interrupt is pending; set it after * APIC_IRR to avoid race with apic_clear_irr |
