diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2010-08-08 23:37:37 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:51:02 -0400 |
commit | 3885f18fe3034a10b3e3923885d70d31ba522844 (patch) | |
tree | 5e06ea1dfcd77daf4788b0af9dbf6a0a185e0f49 /arch/x86/kvm/emulate.c | |
parent | 35c843c4857e2a818d1d951d87c40ee2cf5c1be8 (diff) |
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 <yjwei@cn.fujitsu.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
727 | { | 727 | { |
728 | long sv, mask; | 728 | long sv, mask; |
729 | 729 | ||
730 | if (c->dst.type == OP_MEM) { | 730 | if (c->dst.type == OP_MEM && c->src.type == OP_REG) { |
731 | mask = ~(c->dst.bytes * 8 - 1); | 731 | mask = ~(c->dst.bytes * 8 - 1); |
732 | 732 | ||
733 | if (c->src.bytes == 2) | 733 | if (c->src.bytes == 2) |