]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
KVM: x86: Use new is_noncanonical_address in _linearize
authorNadav Amit <namit@cs.technion.ac.il>
Thu, 18 Sep 2014 19:39:40 +0000 (22:39 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 3 Nov 2014 11:07:19 +0000 (12:07 +0100)
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>
arch/x86/kvm/emulate.c

index 07e9913d6bbbab8077dbad1df9bc931a0336f1d7..77041d4940521af16113dd658ee8c7f749330159 100644 (file)
@@ -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);