public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Yu Zhang <yu.c.zhang@linux.intel.com>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: nVMX: Remove outdated comments in nested_vmx_setup_ctls_msrs().
Date: Thu, 15 Dec 2022 18:23:16 +0000	[thread overview]
Message-ID: <Y5tmFKPj8ZX2GgUY@google.com> (raw)
In-Reply-To: <20221215100558.1202615-1-yu.c.zhang@linux.intel.com>

On Thu, Dec 15, 2022, Yu Zhang wrote:
> nested_vmx_setup_ctls_msrs() initializes the vmcs_conf.nested,
> which stores the global VMX MSR configurations when nested is
> supported, regardless of any particular CPUID settings for one
> VM.
> 
> Commit 6defc591846d ("KVM: nVMX: include conditional controls
> in /dev/kvm KVM_GET_MSRS") added the some feature flags for
> secondary proc-based controls, so that those features can be
> available in KVM_GET_MSRS. Yet this commit did not remove the
> obsolete comments in nested_vmx_setup_ctls_msrs().
> 
> Just fix the comments, and no functional change intended.
> 
> Fixes: 6defc591846d ("KVM: nVMX: include conditional controls in /dev/kvm KVM_GET_MSRS")
> Reported-by: Sean Christopherson <seanjc@google.com>

I appreciate the nod, but you found this, not me :-)

> Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
> ---
>  arch/x86/kvm/vmx/nested.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> index b6f4411b613e..76cca5d5aa6b 100644
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -6854,11 +6854,7 @@ void nested_vmx_setup_ctls_msrs(struct vmcs_config *vmcs_conf, u32 ept_caps)
>  	msrs->procbased_ctls_low &=
>  		~(CPU_BASED_CR3_LOAD_EXITING | CPU_BASED_CR3_STORE_EXITING);
>  
> -	/*
> -	 * secondary cpu-based controls.  Do not include those that
> -	 * depend on CPUID bits, they are added later by
> -	 * vmx_vcpu_after_set_cpuid.
> -	 */
> +	/* secondary cpu-based controls */

Eh, just drop the comment.  Pretty obvious this is for secondary execution controls.

>  	msrs->secondary_ctls_low = 0;
>  
>  	msrs->secondary_ctls_high = vmcs_conf->cpu_based_2nd_exec_ctrl;
> -- 
> 2.17.1
> 

  reply	other threads:[~2022-12-15 18:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 10:05 [PATCH] KVM: nVMX: Remove outdated comments in nested_vmx_setup_ctls_msrs() Yu Zhang
2022-12-15 18:23 ` Sean Christopherson [this message]
2022-12-16  1:45   ` Yu Zhang
2022-12-16 16:49     ` Sean Christopherson
2022-12-19  9:53       ` Yu Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y5tmFKPj8ZX2GgUY@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yu.c.zhang@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox