diff options
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 562e0343e2a3..628fb5de6a42 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2210,8 +2210,8 @@ static struct opcode twobyte_table[256] = { | |||
2210 | /* 0x10 - 0x1F */ | 2210 | /* 0x10 - 0x1F */ |
2211 | N, N, N, N, N, N, N, N, D(ImplicitOps | ModRM), N, N, N, N, N, N, N, | 2211 | N, N, N, N, N, N, N, N, D(ImplicitOps | ModRM), N, N, N, N, N, N, N, |
2212 | /* 0x20 - 0x2F */ | 2212 | /* 0x20 - 0x2F */ |
2213 | D(ModRM | DstMem | Priv | Op3264), D(ModRM | Priv | Op3264), | 2213 | D(ModRM | DstMem | Priv | Op3264), D(ModRM | DstMem | Priv | Op3264), |
2214 | D(ModRM | SrcMem | Priv | Op3264), D(ModRM | Priv | Op3264), | 2214 | D(ModRM | SrcMem | Priv | Op3264), D(ModRM | SrcMem | Priv | Op3264), |
2215 | N, N, N, N, | 2215 | N, N, N, N, |
2216 | N, N, N, N, N, N, N, N, | 2216 | N, N, N, N, N, N, N, N, |
2217 | /* 0x30 - 0x3F */ | 2217 | /* 0x30 - 0x3F */ |
@@ -3248,8 +3248,7 @@ twobyte_insn: | |||
3248 | emulate_ud(ctxt); | 3248 | emulate_ud(ctxt); |
3249 | goto done; | 3249 | goto done; |
3250 | } | 3250 | } |
3251 | ops->get_dr(c->modrm_reg, &c->regs[c->modrm_rm], ctxt->vcpu); | 3251 | ops->get_dr(c->modrm_reg, &c->dst.val, ctxt->vcpu); |
3252 | c->dst.type = OP_NONE; /* no writeback */ | ||
3253 | break; | 3252 | break; |
3254 | case 0x22: /* mov reg, cr */ | 3253 | case 0x22: /* mov reg, cr */ |
3255 | if (ops->set_cr(c->modrm_reg, c->src.val, ctxt->vcpu)) { | 3254 | if (ops->set_cr(c->modrm_reg, c->src.val, ctxt->vcpu)) { |
@@ -3265,7 +3264,7 @@ twobyte_insn: | |||
3265 | goto done; | 3264 | goto done; |
3266 | } | 3265 | } |
3267 | 3266 | ||
3268 | if (ops->set_dr(c->modrm_reg, c->regs[c->modrm_rm] & | 3267 | if (ops->set_dr(c->modrm_reg, c->src.val & |
3269 | ((ctxt->mode == X86EMUL_MODE_PROT64) ? | 3268 | ((ctxt->mode == X86EMUL_MODE_PROT64) ? |
3270 | ~0ULL : ~0U), ctxt->vcpu) < 0) { | 3269 | ~0ULL : ~0U), ctxt->vcpu) < 0) { |
3271 | /* #UD condition is already handled by the code above */ | 3270 | /* #UD condition is already handled by the code above */ |