mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 19:11:02 +07:00
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>
This commit is contained in:
parent
054fe9f6e3
commit
f0c13ef1a8
@ -2804,8 +2804,8 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
|
||||
break;
|
||||
}
|
||||
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.val = *(c->src.ptr);
|
||||
goto xchg;
|
||||
|
Loading…
Reference in New Issue
Block a user