Skip to content

Commit 9c23bc4

Browse files
neerajupadhyasean-jc
authored andcommitted
KVM: x86: Rename lapic get/set_reg64() helpers
In preparation for moving kvm-internal __kvm_lapic_set_reg64(), __kvm_lapic_get_reg64() 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 <Neeraj.Upadhyay@amd.com> Acked-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20250709033242.267892-9-Neeraj.Upadhyay@amd.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent b9bd231 commit 9c23bc4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

arch/x86/kvm/lapic.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,18 @@ static inline void kvm_lapic_set_reg(struct kvm_lapic *apic, int reg_off, u32 va
8989
apic_set_reg(apic->regs, reg_off, val);
9090
}
9191

92-
static __always_inline u64 __kvm_lapic_get_reg64(void *regs, int reg)
92+
static __always_inline u64 apic_get_reg64(void *regs, int reg)
9393
{
9494
BUILD_BUG_ON(reg != APIC_ICR);
9595
return *((u64 *) (regs + reg));
9696
}
9797

9898
static __always_inline u64 kvm_lapic_get_reg64(struct kvm_lapic *apic, int reg)
9999
{
100-
return __kvm_lapic_get_reg64(apic->regs, reg);
100+
return apic_get_reg64(apic->regs, reg);
101101
}
102102

103-
static __always_inline void __kvm_lapic_set_reg64(void *regs, int reg, u64 val)
103+
static __always_inline void apic_set_reg64(void *regs, int reg, u64 val)
104104
{
105105
BUILD_BUG_ON(reg != APIC_ICR);
106106
*((u64 *) (regs + reg)) = val;
@@ -109,7 +109,7 @@ static __always_inline void __kvm_lapic_set_reg64(void *regs, int reg, u64 val)
109109
static __always_inline void kvm_lapic_set_reg64(struct kvm_lapic *apic,
110110
int reg, u64 val)
111111
{
112-
__kvm_lapic_set_reg64(apic->regs, reg, val);
112+
apic_set_reg64(apic->regs, reg, val);
113113
}
114114

115115
static inline int apic_test_vector(int vec, void *bitmap)
@@ -3082,9 +3082,9 @@ static int kvm_apic_state_fixup(struct kvm_vcpu *vcpu,
30823082
if (set) {
30833083
icr = apic_get_reg(s->regs, APIC_ICR) |
30843084
(u64)apic_get_reg(s->regs, APIC_ICR2) << 32;
3085-
__kvm_lapic_set_reg64(s->regs, APIC_ICR, icr);
3085+
apic_set_reg64(s->regs, APIC_ICR, icr);
30863086
} else {
3087-
icr = __kvm_lapic_get_reg64(s->regs, APIC_ICR);
3087+
icr = apic_get_reg64(s->regs, APIC_ICR);
30883088
apic_set_reg(s->regs, APIC_ICR2, icr >> 32);
30893089
}
30903090
}

0 commit comments

Comments
 (0)