summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorNadav Amit <namit@cs.technion.ac.il>2014-09-18 22:39:40 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2014-11-03 12:07:19 +0100
commit4be4de7ef9fd3a4d77320d4713970299ffecd286 (patch)
tree54b6d2e713aa6f4e2c5a7a7febb561c61db3d6d5 /arch
parentd09155d2f39ebf2cce29c49f085fe43b1d66fbef (diff)
downloadlinux-4be4de7ef9fd3a4d77320d4713970299ffecd286.tar.gz
linux-4be4de7ef9fd3a4d77320d4713970299ffecd286.tar.bz2
linux-4be4de7ef9fd3a4d77320d4713970299ffecd286.zip
KVM: x86: Use new is_noncanonical_address in _linearize
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>
Diffstat (limited to 'arch')
-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 07e9913d6bbb..77041d494052 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -658,7 +658,7 @@ static __always_inline 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);