diff options
Diffstat (limited to 'src/recompiler/target-i386/op_helper.c')
-rw-r--r-- | src/recompiler/target-i386/op_helper.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/recompiler/target-i386/op_helper.c b/src/recompiler/target-i386/op_helper.c index 5596d7cf0..fc72fe128 100644 --- a/src/recompiler/target-i386/op_helper.c +++ b/src/recompiler/target-i386/op_helper.c @@ -269,10 +269,9 @@ DECLINLINE(void) load_seg_vm(int seg, int selector) { selector &= 0xffff; #ifdef VBOX - unsigned flags = DESC_P_MASK | DESC_S_MASK | DESC_W_MASK; - - if (seg == R_CS) - flags |= DESC_CS_MASK; + /* flags must be 0xf3; expand-up read/write accessed data segment with DPL=3. (VT-x) */ + unsigned flags = DESC_P_MASK | DESC_S_MASK | DESC_W_MASK | DESC_A_MASK; + flags |= (3 << DESC_DPL_SHIFT); cpu_x86_load_seg_cache(env, seg, selector, (selector << 4), 0xffff, flags); |