Test instruction emulation should not perform writeback. Signed-off-by: Nadav Amit <nadav.amit@xxxxxxxxx> --- 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 8b4cc5f..0ad0a75 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -1708,6 +1708,8 @@ static int em_grp3(struct x86_emulate_ctxt *ctxt) switch (ctxt->modrm_reg) { case 0 ... 1: /* test */ emulate_2op_SrcV("test", ctxt->src, ctxt->dst, ctxt->eflags); + /* Disable writeback. */ + ctxt->dst.type = OP_NONE; break; case 2: /* not */ ctxt->dst.val = ~ctxt->dst.val; @@ -2553,6 +2555,8 @@ static int em_cmp(struct x86_emulate_ctxt *ctxt) static int em_test(struct x86_emulate_ctxt *ctxt) { emulate_2op_SrcV("test", ctxt->src, ctxt->dst, ctxt->eflags); + /* Disable writeback. */ + ctxt->dst.type = OP_NONE; return X86EMUL_CONTINUE; } -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html