[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200204203607.GB5663@linux.intel.com>
Date: Tue, 4 Feb 2020 12:36:07 -0800
From: Sean Christopherson <sean.j.christopherson@...el.com>
To: Krish Sadhukhan <krish.sadhukhan@...cle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: nVMX: Remove stale comment from
nested_vmx_load_cr3()
On Tue, Feb 04, 2020 at 11:57:39AM -0800, Krish Sadhukhan wrote:
>
> On 2/4/20 7:32 AM, Sean Christopherson wrote:
> >The blurb pertaining to the return value of nested_vmx_load_cr3() no
> >longer matches reality, remove it entirely as the behavior it is
> >attempting to document is quite obvious when reading the actual code.
> >
> >Signed-off-by: Sean Christopherson <sean.j.christopherson@...el.com>
> >---
> > arch/x86/kvm/vmx/nested.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> >diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> >index 7608924ee8c1..0c9b847f7a25 100644
> >--- a/arch/x86/kvm/vmx/nested.c
> >+++ b/arch/x86/kvm/vmx/nested.c
> >@@ -1076,8 +1076,6 @@ static bool nested_cr3_valid(struct kvm_vcpu *vcpu, unsigned long val)
> > /*
> > * Load guest's/host's cr3 at nested entry/exit. nested_ept is true if we are
> > * emulating VM entry into a guest with EPT enabled.
> >- * Returns 0 on success, 1 on failure. Invalid state exit qualification code
> >- * is assigned to entry_failure_code on failure.
> > */
> > static int nested_vmx_load_cr3(struct kvm_vcpu *vcpu, unsigned long cr3, bool nested_ept,
> > u32 *entry_failure_code)
>
> I think it's worth keeping the last part which is " Exit qualification code
> is assigned to entry_failure_code on failure." because "Entry Failure" and
> "Exit Qualification" might sound bit confusing until you actually look at
> the caller nested_vmx_enter_non_root_mode().
Hmm, something like this?
/*
* Load guest's/host's cr3 at nested entry/exit. @nested_ept is true if we are
* emulating VM-Entry into a guest with EPT enabled. On failure, the expected
* Exit Qualification (for a VM-Entry consistency check VM-Exit) is assigned to
* @entry_failure_code.
*/
Powered by blists - more mailing lists