Explorar el Código

KVM: x86 emulator: cleanup xchg emulation

Dst operand is already initialized during decoding stage. No need to
reinitialize.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Gleb Natapov hace 15 años
padre
commit
f0c13ef1a8
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      arch/x86/kvm/emulate.c

+ 2 - 2
arch/x86/kvm/emulate.c

@@ -2804,8 +2804,8 @@ special_insn:
 			break;
 			break;
 		}
 		}
 	case 0x91 ... 0x97: /* xchg reg,rax */
 	case 0x91 ... 0x97: /* xchg reg,rax */
-		c->src.type = c->dst.type = OP_REG;
-		c->src.bytes = c->dst.bytes = c->op_bytes;
+		c->src.type = OP_REG;
+		c->src.bytes = c->op_bytes;
 		c->src.ptr = (unsigned long *) &c->regs[VCPU_REGS_RAX];
 		c->src.ptr = (unsigned long *) &c->regs[VCPU_REGS_RAX];
 		c->src.val = *(c->src.ptr);
 		c->src.val = *(c->src.ptr);
 		goto xchg;
 		goto xchg;