Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197680
b: refs/heads/master
c: 5e3ae6c
h: refs/heads/master
v: v3
  • Loading branch information
Gleb Natapov authored and Avi Kivity committed May 17, 2010
1 parent 8857869 commit f83169a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 063db061b9b3472c925f09ae3a0a8359b80c2295
refs/heads/master: 5e3ae6c5407ffb23bc4d9871e09d1b222e1b31a4
7 changes: 3 additions & 4 deletions trunk/arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2126,12 +2126,11 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
case 0x8c: { /* mov r/m, sreg */
struct kvm_segment segreg;

if (c->modrm_reg <= 5)
if (c->modrm_reg <= VCPU_SREG_GS)
kvm_get_segment(ctxt->vcpu, &segreg, c->modrm_reg);
else {
printk(KERN_INFO "0x8c: Invalid segreg in modrm byte 0x%02x\n",
c->modrm);
goto cannot_emulate;
kvm_queue_exception(ctxt->vcpu, UD_VECTOR);
goto done;
}
c->dst.val = segreg.selector;
break;
Expand Down

0 comments on commit f83169a

Please sign in to comment.