KVM: nVMX: Apply addr size mask to effective address for VMX instructions
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 23 Jan 2019 22:39:24 +0000 (14:39 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:10:13 +0000 (20:10 +0100)
commit29b515c27c0abd6933dc86a6c374658f85828244
treeaeadc93ca8e64e91dbabfd4f06489e2905be25ba
parent9ce0ffeb68b6b78c5186add2295d961226b0bbf9
KVM: nVMX: Apply addr size mask to effective address for VMX instructions

commit 8570f9e881e3fde98801bb3a47eef84dd934d405 upstream.

The address size of an instruction affects the effective address, not
the virtual/linear address.  The final address may still be truncated,
e.g. to 32-bits outside of long mode, but that happens irrespective of
the address size, e.g. a 32-bit address size can yield a 64-bit virtual
address when using FS/GS with a non-zero base.

Fixes: 064aea774768 ("KVM: nVMX: Decoding memory operands of VMX instructions")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx.c