diff options
author | Nadav Amit <namit@cs.technion.ac.il> | 2014-11-19 17:43:13 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-11-19 18:20:15 +0100 |
commit | 31ff64881bed80456c5d37df905bdb66cdf29abe (patch) | |
tree | e362fcf9d4c8fb47d09aff5356f25dc0c758e0a8 /arch/x86/kvm/emulate.c | |
parent | abc7d8a4c935dbe0be5db2eb338b2ec9b27ae157 (diff) | |
download | op-kernel-dev-31ff64881bed80456c5d37df905bdb66cdf29abe.zip op-kernel-dev-31ff64881bed80456c5d37df905bdb66cdf29abe.tar.gz |
KVM: x86: Move __linearize masking of la into switch
In __linearize there is check of the condition whether to check if masking of
the linear address is needed. It occurs immediately after switch that
evaluates the same condition. Merge them.
Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 57dc0d7..19a59f3 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; |