Skip to content

Add a helper to read GPR index and move INVPCID validation to a common place

Vipin Sharma kvm lkml 3 versions – Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 1 replyApplied
  2. v32 patches 5 repliesSuperseded
  3. v22 patches 3 repliesSuperseded

Changes in v4 from the cover letter

- Changed commit message of the patch 1

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: VMX: Add a helper function to retrieve the GPR index for INVPCID, INVVPID, and INVEPTarch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/vmx.c arch/x86/kvm/vmx/vmx.h+14 -50 replies
2/2KVM: Move INVPCID type check from vmx and svm to the common kvm_handle_invpcid()arch/x86/kvm/svm/svm.c arch/x86/kvm/vmx/vmx.c arch/x86/kvm/x86.c+2 -110 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchSean Christopherson
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] Add a helper to read GPR index and move INVPCID validation to a common place

INVPCID, INVVPID, and INVEPT instructions retrieve the GPR index similarly to find the invalidation type. Patch 1 moves the shift and mask magic to a single place.

INVPCID invalidation type check is same for both VMX and SVM. This instruction is not documented to verify the type before reading the operand from memory. So, moving the check to a common place in patch 2.

v4:
- Changed commit message of the patch 1

v3:
- https://lore.kernel.org/lkml/[email protected]/
- Patch 2's commit message is more detailed now.

v2:
- https://lore.kernel.org/lkml/[email protected]/
- Keeping the register read visible in the functions.
- Removed INVPCID type check hardcoding and moved error condition to common function.

v1: https://lore.kernel.org/lkml/[email protected]/

Vipin Sharma (2):
KVM: VMX: Add a helper function to retrieve the GPR index for INVPCID,
INVVPID, and INVEPT
KVM: Move INVPCID type check from vmx and svm to the common
kvm_handle_invpcid()

 arch/x86/kvm/svm/svm.c    |  5 -----
 arch/x86/kvm/vmx/nested.c | 10 ++++++----
 arch/x86/kvm/vmx/vmx.c    |  9 +++------
 arch/x86/kvm/vmx/vmx.h    |  5 +++++
 arch/x86/kvm/x86.c        |  3 ++-
 5 files changed, 16 insertions(+), 16 deletions(-)
Signature · 1 line
2.34.0.rc0.344.g81b53c2807-goog