From: Wei Yongjun Date: Mon, 9 Aug 2010 03:37:37 +0000 (+0800) Subject: KVM: x86 emulator: do not adjust the address for immediate source X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3885f18fe3034a10b3e3923885d70d31ba522844;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git KVM: x86 emulator: do not adjust the address for immediate source adjust the dst address for a register source but not adjust the address for an immediate source. Signed-off-by: Wei Yongjun Reviewed-by: Paolo Bonzini Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 5fc441c064ba..9b81cde8ffa2 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -727,7 +727,7 @@ static void fetch_bit_operand(struct decode_cache *c) { long sv, mask; - if (c->dst.type == OP_MEM) { + if (c->dst.type == OP_MEM && c->src.type == OP_REG) { mask = ~(c->dst.bytes * 8 - 1); if (c->src.bytes == 2)