projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2dccb4c
)
KVM: x86: CMOV emulation on legacy mode is wrong
author
Nadav Amit
<
[email protected]
>
Mon, 30 Mar 2015 12:39:19 +0000
(15:39 +0300)
committer
Paolo Bonzini
<
[email protected]
>
Mon, 30 Mar 2015 14:45:50 +0000
(16:45 +0200)
On legacy mode CMOV emulation should still clear bits [63:32] even if the
assignment is not done. The previous fix
140bad89fd
("KVM: x86: emulation of
dword cmov on long-mode should clear [63:32]") was incomplete.
Signed-off-by: Nadav Amit <
[email protected]
>
Message-Id: <
1427719163
[email protected]
>
Signed-off-by: Paolo Bonzini <
[email protected]
>
arch/x86/kvm/emulate.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/emulate.c
b/arch/x86/kvm/emulate.c
index c941abe800ef5730ebc85ce9998a5092925b6bbf..62f7a395717d1378b43114177043c605afa5ecb2 100644
(file)
--- a/
arch/x86/kvm/emulate.c
+++ b/
arch/x86/kvm/emulate.c
@@
-5126,8
+5126,7
@@
twobyte_insn:
case 0x40 ... 0x4f: /* cmov */
if (test_cc(ctxt->b, ctxt->eflags))
ctxt->dst.val = ctxt->src.val;
- else if (ctxt->mode != X86EMUL_MODE_PROT64 ||
- ctxt->op_bytes != 4)
+ else if (ctxt->op_bytes != 4)
ctxt->dst.type = OP_NONE; /* no writeback */
break;
case 0x80 ... 0x8f: /* jnz rel, etc*/