Loading arch/x86/kvm/emulate.c +12 −6 Original line number Original line Diff line number Diff line Loading @@ -2531,9 +2531,12 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) c->dst.type = OP_NONE; /* no writeback */ c->dst.type = OP_NONE; /* no writeback */ break; break; case 0x21: /* mov from dr to reg */ case 0x21: /* mov from dr to reg */ if (emulator_get_dr(ctxt, c->modrm_reg, &c->regs[c->modrm_rm])) if ((ops->get_cr(4, ctxt->vcpu) & X86_CR4_DE) && goto cannot_emulate; (c->modrm_reg == 4 || c->modrm_reg == 5)) { rc = X86EMUL_CONTINUE; kvm_queue_exception(ctxt->vcpu, UD_VECTOR); goto done; } emulator_get_dr(ctxt, c->modrm_reg, &c->regs[c->modrm_rm]); c->dst.type = OP_NONE; /* no writeback */ c->dst.type = OP_NONE; /* no writeback */ break; break; case 0x22: /* mov reg, cr */ case 0x22: /* mov reg, cr */ Loading @@ -2541,9 +2544,12 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) c->dst.type = OP_NONE; c->dst.type = OP_NONE; break; break; case 0x23: /* mov from reg to dr */ case 0x23: /* mov from reg to dr */ if (emulator_set_dr(ctxt, c->modrm_reg, c->regs[c->modrm_rm])) if ((ops->get_cr(4, ctxt->vcpu) & X86_CR4_DE) && goto cannot_emulate; (c->modrm_reg == 4 || c->modrm_reg == 5)) { rc = X86EMUL_CONTINUE; kvm_queue_exception(ctxt->vcpu, UD_VECTOR); goto done; } emulator_set_dr(ctxt, c->modrm_reg, c->regs[c->modrm_rm]); c->dst.type = OP_NONE; /* no writeback */ c->dst.type = OP_NONE; /* no writeback */ break; break; case 0x30: case 0x30: Loading Loading
arch/x86/kvm/emulate.c +12 −6 Original line number Original line Diff line number Diff line Loading @@ -2531,9 +2531,12 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) c->dst.type = OP_NONE; /* no writeback */ c->dst.type = OP_NONE; /* no writeback */ break; break; case 0x21: /* mov from dr to reg */ case 0x21: /* mov from dr to reg */ if (emulator_get_dr(ctxt, c->modrm_reg, &c->regs[c->modrm_rm])) if ((ops->get_cr(4, ctxt->vcpu) & X86_CR4_DE) && goto cannot_emulate; (c->modrm_reg == 4 || c->modrm_reg == 5)) { rc = X86EMUL_CONTINUE; kvm_queue_exception(ctxt->vcpu, UD_VECTOR); goto done; } emulator_get_dr(ctxt, c->modrm_reg, &c->regs[c->modrm_rm]); c->dst.type = OP_NONE; /* no writeback */ c->dst.type = OP_NONE; /* no writeback */ break; break; case 0x22: /* mov reg, cr */ case 0x22: /* mov reg, cr */ Loading @@ -2541,9 +2544,12 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) c->dst.type = OP_NONE; c->dst.type = OP_NONE; break; break; case 0x23: /* mov from reg to dr */ case 0x23: /* mov from reg to dr */ if (emulator_set_dr(ctxt, c->modrm_reg, c->regs[c->modrm_rm])) if ((ops->get_cr(4, ctxt->vcpu) & X86_CR4_DE) && goto cannot_emulate; (c->modrm_reg == 4 || c->modrm_reg == 5)) { rc = X86EMUL_CONTINUE; kvm_queue_exception(ctxt->vcpu, UD_VECTOR); goto done; } emulator_set_dr(ctxt, c->modrm_reg, c->regs[c->modrm_rm]); c->dst.type = OP_NONE; /* no writeback */ c->dst.type = OP_NONE; /* no writeback */ break; break; case 0x30: case 0x30: Loading