public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Vipin Sharma <vipinsh@google.com>
Cc: pbonzini@redhat.com, jmattson@google.com, dmatlack@google.com,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] KVM: VMX: Add a wrapper to read index of GPR for INVPCID, INVVPID, and INVEPT
Date: Wed, 3 Nov 2021 23:00:13 +0000	[thread overview]
Message-ID: <YYMUfbKJYTFgyyD+@google.com> (raw)
In-Reply-To: <20211103183232.1213761-2-vipinsh@google.com>

On Wed, Nov 03, 2021, Vipin Sharma wrote:
> handle_invept(), handle_invvpid(), handle_invpcid() read the same reg2

"same reg2" doesn't provide any context as to what "reg2" is, or what it's used
for.

> on VM exit. Move them to a common wrapper function.

"Move them to a common helper function" reads as if the patch is moving the
whole handle_*() code :-)

handle_invept(), handle_invvpid(), handle_invpcid() read the same reg2
field in vmcs.VMX_INSTRUCTION_INFO to get the index of the GPR that holds
the invalidation type.  Add a helper to retrieve reg2 from VMX instr info
to consolidate and document the shift+mask magic.

> Signed-off-by: Vipin Sharma <vipinsh@google.com>

Changelog nits aside,

Reviewed-by: Sean Christopherson <seanjc@google.com> 

  reply	other threads:[~2021-11-03 23:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 18:32 [PATCH v2 0/2] Add wrapper to read GPR of INVPCID, INVVPID, and INVEPT Vipin Sharma
2021-11-03 18:32 ` [PATCH v2 1/2] KVM: VMX: Add a wrapper to read index of GPR for " Vipin Sharma
2021-11-03 23:00   ` Sean Christopherson [this message]
2021-11-03 18:32 ` [PATCH v2 2/2] KVM: Move INVPCID type check from vmx and svm to the common kvm_handle_invpcid() Vipin Sharma
2021-11-03 20:00   ` Sean Christopherson
2021-11-03 20:23     ` Vipin Sharma

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=YYMUfbKJYTFgyyD+@google.com \
    --to=seanjc@google.com \
    --cc=dmatlack@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=vipinsh@google.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