diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-04-28 12:15:24 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 03:35:29 -0400 |
commit | f0c13ef1a8f31be08bf1b1244fe4565f11f4b009 (patch) | |
tree | 86386e9237cf6a32307127dd5c67566814cfd7c1 /arch/x86/kvm/emulate.c | |
parent | 054fe9f6e3b76877516b37ac7d83d58c7f37c1b6 (diff) |
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>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index a81e6bfcade..a99d49cc893 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2804,8 +2804,8 @@ special_insn: | |||
2804 | break; | 2804 | break; |
2805 | } | 2805 | } |
2806 | case 0x91 ... 0x97: /* xchg reg,rax */ | 2806 | case 0x91 ... 0x97: /* xchg reg,rax */ |
2807 | c->src.type = c->dst.type = OP_REG; | 2807 | c->src.type = OP_REG; |
2808 | c->src.bytes = c->dst.bytes = c->op_bytes; | 2808 | c->src.bytes = c->op_bytes; |
2809 | c->src.ptr = (unsigned long *) &c->regs[VCPU_REGS_RAX]; | 2809 | c->src.ptr = (unsigned long *) &c->regs[VCPU_REGS_RAX]; |
2810 | c->src.val = *(c->src.ptr); | 2810 | c->src.val = *(c->src.ptr); |
2811 | goto xchg; | 2811 | goto xchg; |