projects
/
platform
/
kernel
/
kernel-mfld-blackbay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd52536
)
KVM: x86 emulator: If LOCK prefix is used dest arg should be memory.
author
Gleb Natapov
<gleb@redhat.com>
Thu, 18 Mar 2010 13:20:14 +0000
(15:20 +0200)
committer
Avi Kivity
<avi@redhat.com>
Mon, 17 May 2010 09:16:11 +0000
(12:16 +0300)
If LOCK prefix is used dest arg should be memory, otherwise instruction
should generate #UD.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/emulate.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/emulate.c
b/arch/x86/kvm/emulate.c
index
b89a8f2
..
46a7ee3
100644
(file)
--- a/
arch/x86/kvm/emulate.c
+++ b/
arch/x86/kvm/emulate.c
@@
-1842,7
+1842,7
@@
x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
}
/* LOCK prefix is allowed only with some instructions */
- if (c->lock_prefix &&
!(c->d & Lock
)) {
+ if (c->lock_prefix &&
(!(c->d & Lock) || c->dst.type != OP_MEM
)) {
kvm_queue_exception(ctxt->vcpu, UD_VECTOR);
goto done;
}