]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
KVM: x86 emulator: do not adjust the address for immediate source
authorWei Yongjun <yjwei@cn.fujitsu.com>
Mon, 9 Aug 2010 03:37:37 +0000 (11:37 +0800)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:51:02 +0000 (10:51 +0200)
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>
arch/x86/kvm/emulate.c

index 5fc441c064ba126d14351ba49ed7d7ae45957703..9b81cde8ffa2cae3984379055103973f535100e7 100644 (file)
@@ -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)