diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 57dc0d79c10ea88d2a0d67f69d4769908f448bb9..19a59f3f702c73200b7561ac41f69697e331f894 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -670,10 +670,9 @@ static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt, } if (size > *max_size) goto bad; + la &= (u32)-1; break; } - if (ctxt->mode != X86EMUL_MODE_PROT64) - la &= (u32)-1; if (insn_aligned(ctxt, size) && ((la & (size - 1)) != 0)) return emulate_gp(ctxt, 0); *linear = la;