The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] KVM: x86/pmu: Use wrmsrq() instead of the deprecated wrmsrl() alias
@ 2026-06-25  9:00 Like Xu
  2026-07-08 16:32 ` Sean Christopherson
  0 siblings, 1 reply; 2+ messages in thread
From: Like Xu @ 2026-06-25  9:00 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: jmattson, kvm, linux-kernel

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@tencent.com>
---
 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)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM: x86/pmu: Use wrmsrq() instead of the deprecated wrmsrl() alias
  2026-06-25  9:00 [PATCH] KVM: x86/pmu: Use wrmsrq() instead of the deprecated wrmsrl() alias Like Xu
@ 2026-07-08 16:32 ` Sean Christopherson
  0 siblings, 0 replies; 2+ messages in thread
From: Sean Christopherson @ 2026-07-08 16:32 UTC (permalink / raw)
  To: Like Xu; +Cc: Paolo Bonzini, jmattson, kvm, linux-kernel

On Thu, Jun 25, 2026, Like Xu wrote:
> 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.

Just a hair late, already addressed in 7.2 via commit 2232959db26d ("x86/msr:
Switch wrmsrl() users to wrmsrq()").

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-08 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-25  9:00 [PATCH] KVM: x86/pmu: Use wrmsrq() instead of the deprecated wrmsrl() alias Like Xu
2026-07-08 16:32 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox