diff mbox series

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

Message ID 20210429042237.51280-1-kai.huang@intel.com (mailing list archive)
State New, archived
Headers show
Series KVM: VMX: Fix a typo in comment around handle_vmx_instruction() | expand

Commit Message

Kai Huang April 29, 2021, 4:22 a.m. UTC
It is nested_vmx_hardware_setup() which overwrites VMX instruction VM
exits handlers, but not nested_vmx_setup().  Fix the typo in comment.

Signed-off-by: Kai Huang <kai.huang@intel.com>
---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sean Christopherson May 5, 2021, 9:28 p.m. UTC | #1
On Thu, Apr 29, 2021, Kai Huang wrote:
> It is nested_vmx_hardware_setup() which overwrites VMX instruction VM
> exits handlers, but not nested_vmx_setup().  Fix the typo in comment.
> 
> Signed-off-by: Kai Huang <kai.huang@intel.com>
> ---
>  arch/x86/kvm/vmx/vmx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 10b610fc7bbc..f8661bc113ed 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -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.

>   */
>  static int handle_vmx_instruction(struct kvm_vcpu *vcpu)
>  {
> -- 
> 2.30.2
>
diff mbox series

Patch

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 10b610fc7bbc..f8661bc113ed 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -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)
 {