From: Wei Yongjun <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index fccbed6..42725df 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2788,16 +2788,12 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
c->eip = ctxt->eip;
}
- if (c->src.type == OP_MEM) {
- if (c->d & NoAccess)
- goto no_fetch;
+ if ((c->src.type == OP_MEM) && !(c->d & NoAccess)) {
rc = read_emulated(ctxt, ops, c->src.addr.mem,
c->src.valptr, c->src.bytes);
if (rc != X86EMUL_CONTINUE)
goto done;
c->src.orig_val = c->src.val;
- no_fetch:
- ;
}
if (c->src2.type == OP_MEM) {
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html