diff options
author | Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> | 2011-12-06 18:07:27 +0900 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-12-27 11:23:38 +0200 |
commit | e0dac408d08c2a5e1bed2a6a9da7f3af3f7a9827 (patch) | |
tree | 321aefae4499c222d9bdce93b5194240f282e6a3 /arch/x86/kvm | |
parent | c04ec8393f3815e0f60dde1d6b29040bf1875d52 (diff) | |
download | op-kernel-dev-e0dac408d08c2a5e1bed2a6a9da7f3af3f7a9827.zip op-kernel-dev-e0dac408d08c2a5e1bed2a6a9da7f3af3f7a9827.tar.gz |
KVM: x86 emulator: Use opcode::execute for Group 9 instruction
Group 9: 0F C7
Rename em_grp9() to em_cmpxchg8b() and register it.
Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/emulate.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 5b78785..de7be77 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -1784,7 +1784,7 @@ static int em_grp45(struct x86_emulate_ctxt *ctxt) return rc; } -static int em_grp9(struct x86_emulate_ctxt *ctxt) +static int em_cmpxchg8b(struct x86_emulate_ctxt *ctxt) { u64 old = ctxt->dst.orig_val64; @@ -3261,7 +3261,7 @@ static struct opcode group8[] = { }; static struct group_dual group9 = { { - N, D(DstMem64 | ModRM | Lock | PageTable), N, N, N, N, N, N, + N, I(DstMem64 | ModRM | Lock | PageTable, em_cmpxchg8b), N, N, N, N, N, N, }, { N, N, N, N, N, N, N, N, } }; @@ -4202,9 +4202,6 @@ twobyte_insn: ctxt->dst.val = (ctxt->op_bytes == 4) ? (u32) ctxt->src.val : (u64) ctxt->src.val; break; - case 0xc7: /* Grp9 (cmpxchg8b) */ - rc = em_grp9(ctxt); - break; default: goto cannot_emulate; } |