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: Fri, 16 Dec 2022 16:49:55 +0000	[thread overview]
Message-ID: <Y5yhs34E169ol+qE@google.com> (raw)
In-Reply-To: <20221216014538.3yx5mnmwz2vaa5cy@linux.intel.com>

On Fri, Dec 16, 2022, Yu Zhang wrote:
> > 
> > Eh, just drop the comment.  Pretty obvious this is for secondary execution controls.
> Thanks Sean. Well, I agree it is obvious.
> 
> This line was kept because there are comments for other groups of
> control fields(e.g., exit/entry/pin-based/cpu-based controls etc.)
> in nested_vmx_setup_ctls_msrs(). If we do not keep the one for secondary
> cpu-based controls, we may just delete other comments as well. But
> is that really necessary? 

Adding a patch to delete the various one-line comments is probably unnecessary
churn.  The comments are kinda sorta helpful, but only because the function is a
giant and thus a bit hard to follow.  A better solution than comments would be to
add helpers for each collection ("secondary_ctls" is a bit of a lie because it
handle VPID, EPT, VMFUNC, etc..., but whatever), e.g.

	nested_vmx_setup_pinbased_ctls(msrs);
	nested_vmx_setup_exit_ctls(msrs);
	nested_vmx_setup_entry_ctls(msrs);
	nested_vmx_setup_cpubased_ctls(msrs);
	nested_vmx_setup_secondary_ctls(msrs);
	nested_vmx_setup_misc_data(msrs);

  reply	other threads:[~2022-12-16 16:51 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
2022-12-16  1:45   ` Yu Zhang
2022-12-16 16:49     ` Sean Christopherson [this message]
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=Y5yhs34E169ol+qE@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