diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/emulate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index e10fd3732d10..af06539369b4 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -1670,6 +1670,8 @@ static int em_grp3(struct x86_emulate_ctxt *ctxt) | |||
1670 | switch (ctxt->modrm_reg) { | 1670 | switch (ctxt->modrm_reg) { |
1671 | case 0 ... 1: /* test */ | 1671 | case 0 ... 1: /* test */ |
1672 | emulate_2op_SrcV(ctxt, "test"); | 1672 | emulate_2op_SrcV(ctxt, "test"); |
1673 | /* Disable writeback. */ | ||
1674 | ctxt->dst.type = OP_NONE; | ||
1673 | break; | 1675 | break; |
1674 | case 2: /* not */ | 1676 | case 2: /* not */ |
1675 | ctxt->dst.val = ~ctxt->dst.val; | 1677 | ctxt->dst.val = ~ctxt->dst.val; |
@@ -2513,6 +2515,8 @@ static int em_cmp(struct x86_emulate_ctxt *ctxt) | |||
2513 | static int em_test(struct x86_emulate_ctxt *ctxt) | 2515 | static int em_test(struct x86_emulate_ctxt *ctxt) |
2514 | { | 2516 | { |
2515 | emulate_2op_SrcV(ctxt, "test"); | 2517 | emulate_2op_SrcV(ctxt, "test"); |
2518 | /* Disable writeback. */ | ||
2519 | ctxt->dst.type = OP_NONE; | ||
2516 | return X86EMUL_CONTINUE; | 2520 | return X86EMUL_CONTINUE; |
2517 | } | 2521 | } |
2518 | 2522 | ||