]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Add a helper function to retrieve the GPR index for INVPCID, INVVPID, and...
authorVipin Sharma <vipinsh@google.com>
Tue, 9 Nov 2021 17:44:25 +0000 (17:44 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Nov 2021 15:56:24 +0000 (10:56 -0500)
commit7da45a1c92c83b4c19f50cb4a01047cc5271f761
tree6bb424f4dce1e78b147d70b057c5cf6ae8faf68b
parentba4b80eac42fea731ce825202c211d5e1eaadd67
KVM: VMX: Add a helper function to retrieve the GPR index for INVPCID, INVVPID, and INVEPT

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
instruction info to consolidate and document the shift+mask magic.

Signed-off-by: Vipin Sharma <vipinsh@google.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211109174426.2350547-2-vipinsh@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h