diff options
author | Nadav Amit <namit@cs.technion.ac.il> | 2014-09-18 22:39:40 +0300 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-12-14 12:17:33 -0500 |
commit | 5b4df4648d73b9794f2a15f75ebb43d609d72694 (patch) | |
tree | 648917c71596bf86f78e06f8f221e8ce2908c6e7 | |
parent | 79e62de2efb2f586726e46342c792360a9644319 (diff) | |
download | lwn-5b4df4648d73b9794f2a15f75ebb43d609d72694.tar.gz lwn-5b4df4648d73b9794f2a15f75ebb43d609d72694.zip |
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.c | 2 |
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); |