diff options
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 687ea0906b79..8a4aa73ff1e4 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -3132,7 +3132,7 @@ twobyte_insn: | |||
3132 | kvm_queue_exception(ctxt->vcpu, UD_VECTOR); | 3132 | kvm_queue_exception(ctxt->vcpu, UD_VECTOR); |
3133 | goto done; | 3133 | goto done; |
3134 | } | 3134 | } |
3135 | emulator_get_dr(ctxt, c->modrm_reg, &c->regs[c->modrm_rm]); | 3135 | ops->get_dr(c->modrm_reg, &c->regs[c->modrm_rm], ctxt->vcpu); |
3136 | c->dst.type = OP_NONE; /* no writeback */ | 3136 | c->dst.type = OP_NONE; /* no writeback */ |
3137 | break; | 3137 | break; |
3138 | case 0x22: /* mov reg, cr */ | 3138 | case 0x22: /* mov reg, cr */ |
@@ -3145,7 +3145,10 @@ twobyte_insn: | |||
3145 | kvm_queue_exception(ctxt->vcpu, UD_VECTOR); | 3145 | kvm_queue_exception(ctxt->vcpu, UD_VECTOR); |
3146 | goto done; | 3146 | goto done; |
3147 | } | 3147 | } |
3148 | emulator_set_dr(ctxt, c->modrm_reg, c->regs[c->modrm_rm]); | 3148 | |
3149 | ops->set_dr(c->modrm_reg,c->regs[c->modrm_rm] & | ||
3150 | ((ctxt->mode == X86EMUL_MODE_PROT64) ? ~0ULL : ~0U), | ||
3151 | ctxt->vcpu); | ||
3149 | c->dst.type = OP_NONE; /* no writeback */ | 3152 | c->dst.type = OP_NONE; /* no writeback */ |
3150 | break; | 3153 | break; |
3151 | case 0x30: | 3154 | case 0x30: |