Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72131
b: refs/heads/master
c: 4e62417
h: refs/heads/master
i:
  72129: e4c73e5
  72127: dab4a15
v: v3
  • Loading branch information
Aurelien Jarno authored and Avi Kivity committed Oct 22, 2007
1 parent d95c992 commit 009bf08
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78f7826868da8e27d097802139a3fec39f47f3b8
refs/heads/master: 4e62417bf317504c0b85e0d7abd236f334f54eaf
16 changes: 16 additions & 0 deletions trunk/drivers/kvm/x86_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,14 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
if (twobyte && b == 0x01 && modrm_reg == 7)
break;
srcmem_common:
/*
* For instructions with a ModR/M byte, switch to register
* access if Mod = 3.
*/
if ((d & ModRM) && modrm_mod == 3) {
src.type = OP_REG;
break;
}
src.type = OP_MEM;
src.ptr = (unsigned long *)cr2;
src.val = 0;
Expand Down Expand Up @@ -893,6 +901,14 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
dst.ptr = (unsigned long *)cr2;
dst.bytes = (d & ByteOp) ? 1 : op_bytes;
dst.val = 0;
/*
* For instructions with a ModR/M byte, switch to register
* access if Mod = 3.
*/
if ((d & ModRM) && modrm_mod == 3) {
dst.type = OP_REG;
break;
}
if (d & BitOp) {
unsigned long mask = ~(dst.bytes * 8 - 1);

Expand Down

0 comments on commit 009bf08

Please sign in to comment.