Skip to contentSkip to conversation

kvm: vmx: fix a trivial comment in vmx_vcpu_after_set_cpuid()

PATCH In review Yi Wang 2 participants 2 messages Jul 25, 2023

Subsystems (3)
lore
Share & tools
lore

Yi Wang

author
#0 lore raw

PATCH 1/1 kvm: vmx: fix a trivial comment in vmx_vcpu_after_set_cpuid()

The commit b6247686b7571 ("KVM: VMX: Drop caching of KVM's desired sec exec controls for vmcs01") renamed vmx_compute_secondary_exec_control() to vmx_secondary_exec_control(), but forgot to modify the comment.

---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx/vmx.c +1 -1
index 0ecf4be2c6af..26d62990fea7 100644
@@ -7722,7 +7722,7 @@ static void vmx_vcpu_after_set_cpuid(struct kvm_vcpu *vcpu)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
 
-	/* xsaves_enabled is recomputed in vmx_compute_secondary_exec_control(). */
+	/* xsaves_enabled is recomputed in vmx_secondary_exec_control(). */
 	vcpu->arch.xsaves_enabled = false;
 
 	vmx_setup_uret_msrs(vmx);
Signature · 1 line
2.39.3
#1 lore raw
Quoted 14 lines · Yi Wang

The commit b6247686b7571 ("KVM: VMX: Drop caching of KVM's desired sec exec controls for vmcs01") renamed vmx_compute_secondary_exec_control() to vmx_secondary_exec_control(), but forgot to modify the comment.

---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx/vmx.c +0 -0
index 0ecf4be2c6af..26d62990fea7 100644

arch/x86/kvm/vmx/vmx.c static void vmx_vcpu_after_set_cpuid(struct kvm_vcpu *vcpu) · line 7726

Quoted 6 lines
arch/x86/kvm/vmx/vmx.c +1 -1
@@ -7722,7 +7722,7 @@ static void vmx_vcpu_after_set_cpuid(struct kvm_vcpu *vcpu)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
 
-	/* xsaves_enabled is recomputed in vmx_compute_secondary_exec_control(). */
+	/* xsaves_enabled is recomputed in vmx_secondary_exec_control(). */
 	vcpu->arch.xsaves_enabled = false;

I have an in-progress patch[*] that reworks this code and wipes out the stale comment as a side effect. Thank you though!

[*] https://lore.kernel.org/all/[email protected]