summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadav Amit <namit@cs.technion.ac.il>2014-09-18 22:39:40 +0300
committerSasha Levin <sasha.levin@oracle.com>2015-12-14 12:17:33 -0500
commit5b4df4648d73b9794f2a15f75ebb43d609d72694 (patch)
tree648917c71596bf86f78e06f8f221e8ce2908c6e7
parent79e62de2efb2f586726e46342c792360a9644319 (diff)
KVM: x86: Use new is_noncanonical_address in _linearize
[ Upstream commit 4be4de7ef9fd3a4d77320d4713970299ffecd286 ] Replace the current canonical address check with the new function which is identical. Signed-off-by: Nadav Amit <namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r--arch/x86/kvm/emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 974e4d98ed29..852572c971c4 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -658,7 +658,7 @@ static int __linearize(struct x86_emulate_ctxt *ctxt,
*max_size = 0;
switch (ctxt->mode) {
case X86EMUL_MODE_PROT64:
- if (((signed long)la << 16) >> 16 != la)
+ if (is_noncanonical_address(la))
return emulate_gp(ctxt, 0);
*max_size = min_t(u64, ~0u, (1ull << 48) - la);