Skip to contentSkip to conversation

KVM: VMX: Fix a typo in comment around handle_vmx_instruction()

PATCH In review Kai Huang 2 participants 2 messages Apr 29, 2021 – May 5, 2021

Subsystems (3)
lore
Share & tools
lore

Kai Huang

author
#0 lore raw

PATCH 1/1 KVM: VMX: Fix a typo in comment around handle_vmx_instruction()

It is nested_vmx_hardware_setup() which overwrites VMX instruction VM exits handlers, but not nested_vmx_setup(). Fix the typo in comment.

---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx/vmx.c +1 -1
index 10b610fc7bbc..f8661bc113ed 100644
@@ -5618,7 +5618,7 @@ static int handle_preemption_timer(struct kvm_vcpu *vcpu)
 
 /*
  * When nested=0, all VMX instruction VM Exits filter here.  The handlers
- * are overwritten by nested_vmx_setup() when nested=1.
+ * are overwritten by nested_vmx_hardware_setup() when nested=1.
  */
 static int handle_vmx_instruction(struct kvm_vcpu *vcpu)
 {
Signature · 1 line
2.30.2
#1 lore raw
Quoted 13 lines · Kai Huang

It is nested_vmx_hardware_setup() which overwrites VMX instruction VM exits handlers, but not nested_vmx_setup(). Fix the typo in comment.

---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx/vmx.c +0 -0
index 10b610fc7bbc..f8661bc113ed 100644

arch/x86/kvm/vmx/vmx.c static int handle_preemption_timer(struct kvm_vcpu *vcpu) · line 5621

Quoted 5 lines
arch/x86/kvm/vmx/vmx.c +1 -1
@@ -5618,7 +5618,7 @@ static int handle_preemption_timer(struct kvm_vcpu *vcpu)
 
 /*
  * When nested=0, all VMX instruction VM Exits filter here.  The handlers
- * are overwritten by nested_vmx_setup() when nested=1.
+ * are overwritten by nested_vmx_hardware_setup() when nested=1.

Alternatively, to reduce the odds of the comment becoming stale again:

are overwritten during hardware setup when nested=1.

Quoted 6 lines
arch/x86/kvm/vmx/vmx.c +0 -0
  */
 static int handle_vmx_instruction(struct kvm_vcpu *vcpu)
 {
Signature · 1 line
2.30.2