summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx/nested.h
diff options
context:
space:
mode:
authorEugene Korenevsky <ekorenevsky@gmail.com>2019-06-06 00:19:16 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2019-06-18 11:43:45 +0200
commitfdb28619a8f033c13f5d9b9e8b5536bb6e68a2c3 (patch)
tree42bd37018ff4798e0e89ea671e899e7c98c1f5fe /arch/x86/kvm/vmx/nested.h
parentc1a9acbc5295e278d788e9f7510f543bc9864fa2 (diff)
downloadlinux-fdb28619a8f033c13f5d9b9e8b5536bb6e68a2c3.tar.bz2
kvm: vmx: segment limit check: use access length
There is an imperfection in get_vmx_mem_address(): access length is ignored when checking the limit. To fix this, pass access length as a function argument. The access length is usually obvious since it is used by callers after get_vmx_mem_address() call, but for vmread/vmwrite it depends on the state of 64-bit mode. Signed-off-by: Eugene Korenevsky <ekorenevsky@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx/nested.h')
-rw-r--r--arch/x86/kvm/vmx/nested.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/nested.h b/arch/x86/kvm/vmx/nested.h
index e847ff1019a2..29d205bb4e4f 100644
--- a/arch/x86/kvm/vmx/nested.h
+++ b/arch/x86/kvm/vmx/nested.h
@@ -21,7 +21,7 @@ void nested_sync_from_vmcs12(struct kvm_vcpu *vcpu);
int vmx_set_vmx_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data);
int vmx_get_vmx_msr(struct nested_vmx_msrs *msrs, u32 msr_index, u64 *pdata);
int get_vmx_mem_address(struct kvm_vcpu *vcpu, unsigned long exit_qualification,
- u32 vmx_instruction_info, bool wr, gva_t *ret);
+ u32 vmx_instruction_info, bool wr, int len, gva_t *ret);
static inline struct vmcs12 *get_vmcs12(struct kvm_vcpu *vcpu)
{