From: Gleb Natapov <gleb@redhat.com>
To: avi@redhat.com, mtosatti@redhat.com
Cc: kvm@vger.kernel.org
Subject: [PATCH] KVM: x86 emulator: fix unlocked CMPXCHG8B emulation.
Date: Sun, 21 Mar 2010 16:58:36 +0200 [thread overview]
Message-ID: <20100321145836.GH13522@redhat.com> (raw)
When CMPXCHG8B is executed without LOCK prefix it is racy. Preserve this
behaviour in emulator too.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
This patch goes on top of my previous "KVM: x86 emulator: add decoding
of CMPXCHG8B dst operand." patch.
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 904351e..e2bbb9c 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1724,7 +1724,6 @@ static inline int emulate_grp9(struct x86_emulate_ctxt *ctxt,
(u32) c->regs[VCPU_REGS_RBX];
ctxt->eflags |= EFLG_ZF;
- c->lock_prefix = 1;
}
return X86EMUL_CONTINUE;
}
--
Gleb.
next reply other threads:[~2010-03-21 14:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-21 14:58 Gleb Natapov [this message]
2010-03-23 12:34 ` [PATCH] KVM: x86 emulator: fix unlocked CMPXCHG8B emulation Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100321145836.GH13522@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.