diff options
-rw-r--r-- | arch/x86/kvm/emulate.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index df349f376da8..78541e8fd149 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2787,16 +2787,12 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt) | |||
2787 | c->eip = ctxt->eip; | 2787 | c->eip = ctxt->eip; |
2788 | } | 2788 | } |
2789 | 2789 | ||
2790 | if (c->src.type == OP_MEM) { | 2790 | if ((c->src.type == OP_MEM) && !(c->d & NoAccess)) { |
2791 | if (c->d & NoAccess) | ||
2792 | goto no_fetch; | ||
2793 | rc = read_emulated(ctxt, ops, c->src.addr.mem, | 2791 | rc = read_emulated(ctxt, ops, c->src.addr.mem, |
2794 | c->src.valptr, c->src.bytes); | 2792 | c->src.valptr, c->src.bytes); |
2795 | if (rc != X86EMUL_CONTINUE) | 2793 | if (rc != X86EMUL_CONTINUE) |
2796 | goto done; | 2794 | goto done; |
2797 | c->src.orig_val64 = c->src.val64; | 2795 | c->src.orig_val64 = c->src.val64; |
2798 | no_fetch: | ||
2799 | ; | ||
2800 | } | 2796 | } |
2801 | 2797 | ||
2802 | if (c->src2.type == OP_MEM) { | 2798 | if (c->src2.type == OP_MEM) { |