Loading drivers/kvm/x86.c +0 −1 Original line number Diff line number Diff line Loading @@ -1702,7 +1702,6 @@ int emulate_instruction(struct kvm_vcpu *vcpu, vcpu->emulate_ctxt.vcpu = vcpu; vcpu->emulate_ctxt.eflags = kvm_x86_ops->get_rflags(vcpu); vcpu->emulate_ctxt.cr2 = cr2; vcpu->emulate_ctxt.mode = (vcpu->emulate_ctxt.eflags & X86_EFLAGS_VM) ? X86EMUL_MODE_REAL : cs_l Loading drivers/kvm/x86_emulate.c +9 −9 Original line number Diff line number Diff line Loading @@ -1127,13 +1127,13 @@ static inline int emulate_grp45(struct x86_emulate_ctxt *ctxt, static inline int emulate_grp9(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops, unsigned long cr2) unsigned long memop) { struct decode_cache *c = &ctxt->decode; u64 old, new; int rc; rc = ops->read_emulated(cr2, &old, 8, ctxt->vcpu); rc = ops->read_emulated(memop, &old, 8, ctxt->vcpu); if (rc != 0) return rc; Loading @@ -1148,7 +1148,7 @@ static inline int emulate_grp9(struct x86_emulate_ctxt *ctxt, new = ((u64)c->regs[VCPU_REGS_RCX] << 32) | (u32) c->regs[VCPU_REGS_RBX]; rc = ops->cmpxchg_emulated(cr2, &old, &new, 8, ctxt->vcpu); rc = ops->cmpxchg_emulated(memop, &old, &new, 8, ctxt->vcpu); if (rc != 0) return rc; ctxt->eflags |= EFLG_ZF; Loading Loading @@ -1211,7 +1211,7 @@ static inline int writeback(struct x86_emulate_ctxt *ctxt, int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) { unsigned long cr2 = ctxt->cr2; unsigned long memop = 0; u64 msr_data; unsigned long saved_eip = 0; struct decode_cache *c = &ctxt->decode; Loading @@ -1226,10 +1226,10 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) saved_eip = c->eip; if (((c->d & ModRM) && (c->modrm_mod != 3)) || (c->d & MemAbs)) cr2 = c->modrm_ea; memop = c->modrm_ea; if (c->src.type == OP_MEM) { c->src.ptr = (unsigned long *)cr2; c->src.ptr = (unsigned long *)memop; c->src.val = 0; rc = ops->read_emulated((unsigned long)c->src.ptr, &c->src.val, Loading @@ -1245,7 +1245,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) if (c->dst.type == OP_MEM) { c->dst.ptr = (unsigned long *)cr2; c->dst.ptr = (unsigned long *)memop; c->dst.bytes = (c->d & ByteOp) ? 1 : c->op_bytes; c->dst.val = 0; if (c->d & BitOp) { Loading Loading @@ -1677,7 +1677,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) &ctxt->eflags); break; case 7: /* invlpg*/ emulate_invlpg(ctxt->vcpu, cr2); emulate_invlpg(ctxt->vcpu, memop); break; default: goto cannot_emulate; Loading Loading @@ -1848,7 +1848,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) break; } case 0xc7: /* Grp9 (cmpxchg8b) */ rc = emulate_grp9(ctxt, ops, cr2); rc = emulate_grp9(ctxt, ops, memop); if (rc != 0) goto done; break; Loading drivers/kvm/x86_emulate.h +0 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ struct x86_emulate_ctxt { /* Linear faulting address (if emulating a page-faulting instruction). */ unsigned long eflags; unsigned long cr2; /* Emulated execution mode, represented by an X86EMUL_MODE value. */ int mode; Loading Loading
drivers/kvm/x86.c +0 −1 Original line number Diff line number Diff line Loading @@ -1702,7 +1702,6 @@ int emulate_instruction(struct kvm_vcpu *vcpu, vcpu->emulate_ctxt.vcpu = vcpu; vcpu->emulate_ctxt.eflags = kvm_x86_ops->get_rflags(vcpu); vcpu->emulate_ctxt.cr2 = cr2; vcpu->emulate_ctxt.mode = (vcpu->emulate_ctxt.eflags & X86_EFLAGS_VM) ? X86EMUL_MODE_REAL : cs_l Loading
drivers/kvm/x86_emulate.c +9 −9 Original line number Diff line number Diff line Loading @@ -1127,13 +1127,13 @@ static inline int emulate_grp45(struct x86_emulate_ctxt *ctxt, static inline int emulate_grp9(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops, unsigned long cr2) unsigned long memop) { struct decode_cache *c = &ctxt->decode; u64 old, new; int rc; rc = ops->read_emulated(cr2, &old, 8, ctxt->vcpu); rc = ops->read_emulated(memop, &old, 8, ctxt->vcpu); if (rc != 0) return rc; Loading @@ -1148,7 +1148,7 @@ static inline int emulate_grp9(struct x86_emulate_ctxt *ctxt, new = ((u64)c->regs[VCPU_REGS_RCX] << 32) | (u32) c->regs[VCPU_REGS_RBX]; rc = ops->cmpxchg_emulated(cr2, &old, &new, 8, ctxt->vcpu); rc = ops->cmpxchg_emulated(memop, &old, &new, 8, ctxt->vcpu); if (rc != 0) return rc; ctxt->eflags |= EFLG_ZF; Loading Loading @@ -1211,7 +1211,7 @@ static inline int writeback(struct x86_emulate_ctxt *ctxt, int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) { unsigned long cr2 = ctxt->cr2; unsigned long memop = 0; u64 msr_data; unsigned long saved_eip = 0; struct decode_cache *c = &ctxt->decode; Loading @@ -1226,10 +1226,10 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) saved_eip = c->eip; if (((c->d & ModRM) && (c->modrm_mod != 3)) || (c->d & MemAbs)) cr2 = c->modrm_ea; memop = c->modrm_ea; if (c->src.type == OP_MEM) { c->src.ptr = (unsigned long *)cr2; c->src.ptr = (unsigned long *)memop; c->src.val = 0; rc = ops->read_emulated((unsigned long)c->src.ptr, &c->src.val, Loading @@ -1245,7 +1245,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) if (c->dst.type == OP_MEM) { c->dst.ptr = (unsigned long *)cr2; c->dst.ptr = (unsigned long *)memop; c->dst.bytes = (c->d & ByteOp) ? 1 : c->op_bytes; c->dst.val = 0; if (c->d & BitOp) { Loading Loading @@ -1677,7 +1677,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) &ctxt->eflags); break; case 7: /* invlpg*/ emulate_invlpg(ctxt->vcpu, cr2); emulate_invlpg(ctxt->vcpu, memop); break; default: goto cannot_emulate; Loading Loading @@ -1848,7 +1848,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) break; } case 0xc7: /* Grp9 (cmpxchg8b) */ rc = emulate_grp9(ctxt, ops, cr2); rc = emulate_grp9(ctxt, ops, memop); if (rc != 0) goto done; break; Loading
drivers/kvm/x86_emulate.h +0 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ struct x86_emulate_ctxt { /* Linear faulting address (if emulating a page-faulting instruction). */ unsigned long eflags; unsigned long cr2; /* Emulated execution mode, represented by an X86EMUL_MODE value. */ int mode; Loading