KVM: nVMX: Truncate base/index GPR value on address calc in !64-bit
authorSean Christopherson <seanjc@google.com>
Thu, 22 Apr 2021 02:21:25 +0000 (19:21 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 Apr 2021 09:27:12 +0000 (05:27 -0400)
commit82277eeed65eed6c6ee5b8f97bd978763eab148f
treeebd98699de6f2d0f5a2eefd528bd78eae9420223
parentee050a577523dfd5fac95e6cc182ebe0293ead59
KVM: nVMX: Truncate base/index GPR value on address calc in !64-bit

Drop bits 63:32 of the base and/or index GPRs when calculating the
effective address of a VMX instruction memory operand.  Outside of 64-bit
mode, memory encodings are strictly limited to E*X and below.

Fixes: 064aea774768 ("KVM: nVMX: Decoding memory operands of VMX instructions")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210422022128.3464144-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c