Skip to content

Commit

Permalink
KVM: x86 emulator: do not adjust the address for immediate source
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Avi Kivity committed Oct 24, 2010
1 parent 35c843c commit 3885f18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3885f18

Please sign in to comment.