Skip to contentSkip to conversation

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

PATCH In review Like Xu 2 participants 2 messages Jun 25 – Jul 8

Subsystems (3)
lore
Share & tools
lore

Like Xu

author
#0 lore raw

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

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.

---
 arch/x86/kvm/pmu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kvm/pmu.c +3 -3
index b92dd2e583356..dd1c57593f48b 100644
@@ -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);
 	}
 }
 
Signature · 1 line
2.50.1 (Apple Git-155)
#1 lore raw
Quoted 7 lines · Like Xu

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()").