[PATCH] KVM: x86/pmu: Use wrmsrq() instead of the deprecated wrmsrl() alias

From: Like Xu

Date: Thu Jun 25 2026 - 05:01:41 EST


Replace the remaining wrmsrl() calls in the x86 vPMU code with the
canonical wrmsrq() helper, for consistency with the surrounding code
that already uses the q-suffixed form.

wrmsrl() is merely a compatibility wrapper that expands directly to
wrmsrq() as part of the ongoing treewide rename to the q-suffixed MSR
helpers, so the generated code is identical.

No functional change intended.

Signed-off-by: Like Xu <likexu@xxxxxxxxxxx>
---
arch/x86/kvm/pmu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c
index b92dd2e583356..dd1c57593f48b 100644
--- a/arch/x86/kvm/pmu.c
+++ b/arch/x86/kvm/pmu.c
@@ -1330,14 +1330,14 @@ static void kvm_pmu_load_guest_pmcs(struct kvm_vcpu *vcpu)
pmc = &pmu->gp_counters[i];

if (pmc->counter != rdpmc(i))
- wrmsrl(gp_counter_msr(i), pmc->counter);
- wrmsrl(gp_eventsel_msr(i), pmc->eventsel_hw);
+ wrmsrq(gp_counter_msr(i), pmc->counter);
+ wrmsrq(gp_eventsel_msr(i), pmc->eventsel_hw);
}
for (i = 0; i < pmu->nr_arch_fixed_counters; i++) {
pmc = &pmu->fixed_counters[i];

if (pmc->counter != rdpmc(INTEL_PMC_FIXED_RDPMC_BASE | i))
- wrmsrl(fixed_counter_msr(i), pmc->counter);
+ wrmsrq(fixed_counter_msr(i), pmc->counter);
}
}

--
2.50.1 (Apple Git-155)