aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/emulate.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index d71aac0bf32f..9ebe95c5836e 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -853,6 +853,8 @@ FASTOP2W(bts);
853FASTOP2W(btr); 853FASTOP2W(btr);
854FASTOP2W(btc); 854FASTOP2W(btc);
855 855
856FASTOP2(xadd);
857
856static u8 test_cc(unsigned int condition, unsigned long flags) 858static u8 test_cc(unsigned int condition, unsigned long flags)
857{ 859{
858 u8 rc; 860 u8 rc;
@@ -3861,7 +3863,7 @@ static const struct opcode twobyte_table[256] = {
3861 F(DstReg | SrcMem | ModRM, em_bsf), F(DstReg | SrcMem | ModRM, em_bsr), 3863 F(DstReg | SrcMem | ModRM, em_bsf), F(DstReg | SrcMem | ModRM, em_bsr),
3862 D(DstReg | SrcMem8 | ModRM | Mov), D(DstReg | SrcMem16 | ModRM | Mov), 3864 D(DstReg | SrcMem8 | ModRM | Mov), D(DstReg | SrcMem16 | ModRM | Mov),
3863 /* 0xC0 - 0xC7 */ 3865 /* 0xC0 - 0xC7 */
3864 D2bv(DstMem | SrcReg | ModRM | Lock), 3866 F2bv(DstMem | SrcReg | ModRM | SrcWrite | Lock, em_xadd),
3865 N, D(DstMem | SrcReg | ModRM | Mov), 3867 N, D(DstMem | SrcReg | ModRM | Mov),
3866 N, N, N, GD(0, &group9), 3868 N, N, N, GD(0, &group9),
3867 /* 0xC8 - 0xCF */ 3869 /* 0xC8 - 0xCF */
@@ -4698,12 +4700,6 @@ twobyte_insn:
4698 ctxt->dst.val = (ctxt->src.bytes == 1) ? (s8) ctxt->src.val : 4700 ctxt->dst.val = (ctxt->src.bytes == 1) ? (s8) ctxt->src.val :
4699 (s16) ctxt->src.val; 4701 (s16) ctxt->src.val;
4700 break; 4702 break;
4701 case 0xc0 ... 0xc1: /* xadd */
4702 fastop(ctxt, em_add);
4703 /* Write back the register source. */
4704 ctxt->src.val = ctxt->dst.orig_val;
4705 write_register_operand(&ctxt->src);
4706 break;
4707 case 0xc3: /* movnti */ 4703 case 0xc3: /* movnti */
4708 ctxt->dst.bytes = ctxt->op_bytes; 4704 ctxt->dst.bytes = ctxt->op_bytes;
4709 ctxt->dst.val = (ctxt->op_bytes == 4) ? (u32) ctxt->src.val : 4705 ctxt->dst.val = (ctxt->op_bytes == 4) ? (u32) ctxt->src.val :