All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: [PATCH] KVM: fix test emulation writeback
       [not found] <1325267105-16704-1-git-send-email-namit@cs.technion.ac.il>
@ 2011-12-30 18:24 ` Nadav Amit
  2012-01-01  9:09   ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Nadav Amit @ 2011-12-30 18:24 UTC (permalink / raw)
  To: Avi Kivity
  Cc: Marcelo Tosatti, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, kvm

Test instruction emulation should not perform writeback.

Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
---
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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Fwd: [PATCH] KVM: fix test emulation writeback
  2011-12-30 18:24 ` Fwd: [PATCH] KVM: fix test emulation writeback Nadav Amit
@ 2012-01-01  9:09   ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2012-01-01  9:09 UTC (permalink / raw)
  To: Nadav Amit
  Cc: Marcelo Tosatti, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, kvm

On 12/30/2011 08:24 PM, Nadav Amit wrote:
> Test instruction emulation should not perform writeback.
>

This was already fixed by caa8a168e356 (v3.2-rc1).

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-01  9:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1325267105-16704-1-git-send-email-namit@cs.technion.ac.il>
2011-12-30 18:24 ` Fwd: [PATCH] KVM: fix test emulation writeback Nadav Amit
2012-01-01  9:09   ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.