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>
This commit is contained in:
Nadav Amit 2014-09-18 22:39:40 +03:00 committed by Paolo Bonzini
parent d09155d2f3
commit 4be4de7ef9
1 changed files with 1 additions and 1 deletions

View File

@ -658,7 +658,7 @@ static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt,
*max_size = 0; *max_size = 0;
switch (ctxt->mode) { switch (ctxt->mode) {
case X86EMUL_MODE_PROT64: case X86EMUL_MODE_PROT64:
if (((signed long)la << 16) >> 16 != la) if (is_noncanonical_address(la))
return emulate_gp(ctxt, 0); return emulate_gp(ctxt, 0);
*max_size = min_t(u64, ~0u, (1ull << 48) - la); *max_size = min_t(u64, ~0u, (1ull << 48) - la);