diff options
author | Nadav Amit <namit@cs.technion.ac.il> | 2014-09-18 22:39:40 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-11-18 12:43:22 +0100 |
commit | 2b27106cd93020563185ea94618ea5019308226b (patch) | |
tree | fc9939d3e9df48b854a94ed6ba6d4b7ab30fa252 /arch | |
parent | e4bcfa44c82cb5bcfb44a4722c80686096c2e181 (diff) | |
download | linux-stable-2b27106cd93020563185ea94618ea5019308226b.tar.gz linux-stable-2b27106cd93020563185ea94618ea5019308226b.tar.bz2 linux-stable-2b27106cd93020563185ea94618ea5019308226b.zip |
KVM: x86: Use new is_noncanonical_address in _linearize
commit 4be4de7ef9fd3a4d77320d4713970299ffecd286 upstream.
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: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/emulate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index ffae11d0754a..cad86cd56f82 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -664,7 +664,7 @@ static int __linearize(struct x86_emulate_ctxt *ctxt, la = seg_base(ctxt, addr.seg) + addr.ea; switch (ctxt->mode) { case X86EMUL_MODE_PROT64: - if (((signed long)la << 16) >> 16 != la) + if (is_noncanonical_address(la)) return emulate_gp(ctxt, 0); break; default: |