Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329883
b: refs/heads/master
c: a562518
h: refs/heads/master
i:
  329881: 2eda737
  329879: 206abe4
v: v3
  • Loading branch information
Avi Kivity authored and Marcelo Tosatti committed Aug 27, 2012
1 parent 23cf0bd commit 0015e2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 03ebebeb1ff5d1d6209fd8df4ffc9204df82bd55
refs/heads/master: a5625189f6810ef79ced53989c794acfa10d3370
7 changes: 4 additions & 3 deletions trunk/arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,6 @@ static int __linearize(struct x86_emulate_ctxt *ctxt,

la = seg_base(ctxt, addr.seg) + addr.ea;
switch (ctxt->mode) {
case X86EMUL_MODE_REAL:
break;
case X86EMUL_MODE_PROT64:
if (((signed long)la << 16) >> 16 != la)
return emulate_gp(ctxt, 0);
Expand Down Expand Up @@ -699,7 +697,10 @@ static int __linearize(struct x86_emulate_ctxt *ctxt,
goto bad;
}
cpl = ctxt->ops->cpl(ctxt);
rpl = sel & 3;
if (ctxt->mode == X86EMUL_MODE_REAL)
rpl = 0;
else
rpl = sel & 3;
cpl = max(cpl, rpl);
if (!(desc.type & 8)) {
/* data segment */
Expand Down

0 comments on commit 0015e2a

Please sign in to comment.