vbox的更動 47709 路徑 trunk/src/recompiler
- 時間撮記:
- 2013-8-13 下午07:34:18 (11 年 以前)
- 位置:
- trunk/src/recompiler
- 檔案:
-
- 修改 3 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/recompiler/VBoxRecompiler.c
r47550 r47709 4614 4614 uint32_t u32 = 0; 4615 4615 int rc = IOMIOPortRead(env->pVM, env->pVCpu, (RTIOPORT)addr, &u32, 1); 4616 if (addr == 0x01f0) RTLogPrintf("ins: %#06x -> %#04x %d\n", addr, u32, rc); 4616 4617 if (RT_LIKELY(rc == VINF_SUCCESS)) 4617 4618 { … … 4634 4635 uint32_t u32 = 0; 4635 4636 int rc = IOMIOPortRead(env->pVM, env->pVCpu, (RTIOPORT)addr, &u32, 2); 4637 if (addr == 0x01f0) RTLogPrintf("ins: %#06x -> %#06x %d\n", addr, u32, rc); 4636 4638 if (RT_LIKELY(rc == VINF_SUCCESS)) 4637 4639 { … … 4653 4655 uint32_t u32 = 0; 4654 4656 int rc = IOMIOPortRead(env->pVM, env->pVCpu, (RTIOPORT)addr, &u32, 4); 4657 if (addr == 0x01f0) RTLogPrintf("ins: %#06x -> %#010x %d\n", addr, u32, rc); 4655 4658 if (RT_LIKELY(rc == VINF_SUCCESS)) 4656 4659 { -
trunk/src/recompiler/target-i386/cpu.h
r47678 r47709 117 117 #define DESC_TSS_BUSY_MASK (1 << 9) 118 118 #ifdef VBOX 119 # define DESC_INTEL_UNUSABLE RT_BIT_32(16+8) /**< Internal VT-x bit for NULL sectors. */ 119 # define DESC_INTEL_UNUSABLE RT_BIT_32(16+8) /**< Internal VT-x bit for NULL sectors. */ 120 # define DESC_RAW_FLAG_BITS UINT32_C(0x00ffffff) /**< Flag bits we load from the descriptor. */ 120 121 #endif 121 122 … … 934 935 /* this function must always be used to load data in the segment 935 936 cache: it synchronizes the hflags with the segment cache values */ 937 #ifndef VBOX 936 938 static inline void cpu_x86_load_seg_cache(CPUX86State *env, 937 939 int seg_reg, unsigned int selector, … … 939 941 unsigned int limit, 940 942 unsigned int flags) 943 #else 944 static inline void cpu_x86_load_seg_cache_with_clean_flags(CPUX86State *env, 945 int seg_reg, unsigned int selector, 946 target_ulong base, 947 unsigned int limit, 948 unsigned int flags) 949 #endif 941 950 { 942 951 SegmentCache *sc; … … 947 956 sc->base = base; 948 957 sc->limit = limit; 949 #ifndef VBOX950 958 sc->flags = flags; 951 #else 952 if (flags & DESC_P_MASK) 953 { 954 flags |= DESC_A_MASK; /* Make sure the A bit is set to avoid trouble. */ 955 flags &= ~DESC_INTEL_UNUSABLE; 956 } 957 else if (selector < 4U) 958 flags |= DESC_INTEL_UNUSABLE; 959 else 960 flags &= ~DESC_INTEL_UNUSABLE; 961 sc->flags = flags; 959 #ifdef VBOX 962 960 sc->newselector = 0; 963 961 sc->fVBoxFlags = CPUMSELREG_FLAGS_VALID; … … 1006 1004 } 1007 1005 1006 #ifdef VBOX 1007 /* Raw input, adjust the flags adding the stupid intel flag when applicable. */ 1008 static inline void cpu_x86_load_seg_cache(CPUX86State *env, 1009 int seg_reg, unsigned int selector, 1010 target_ulong base, 1011 unsigned int limit, 1012 unsigned int flags) 1013 { 1014 flags &= DESC_RAW_FLAG_BITS; 1015 if (flags & DESC_P_MASK) 1016 flags |= DESC_A_MASK; /* Make sure the A bit is set to avoid trouble. */ 1017 else if (selector < 4U) 1018 flags |= DESC_INTEL_UNUSABLE; 1019 cpu_x86_load_seg_cache_with_clean_flags(env, seg_reg, selector, base, limit, flags); 1020 } 1021 #endif 1022 1008 1023 static inline void cpu_x86_load_seg_cache_sipi(CPUX86State *env, 1009 1024 int sipi_vector) -
trunk/src/recompiler/target-i386/op_helper.c
r47666 r47709 272 272 sc->base = get_seg_base(e1, e2); 273 273 sc->limit = get_seg_limit(e1, e2); 274 #ifndef VBOX 274 275 sc->flags = e2; 275 # ifdef VBOX276 sc->flags &= ~DESC_INTEL_UNUSABLE;276 #else 277 sc->flags = e2 & DESC_RAW_FLAG_BITS; 277 278 sc->newselector = 0; 278 279 sc->fVBoxFlags = CPUMSELREG_FLAGS_VALID; … … 2583 2584 env->tr.limit = 0; 2584 2585 env->tr.flags = 0; 2585 #ifdef VBOX 2586 #ifdef VBOX /** @todo can TR really be 0? If so, what're the hidden attributes? */ 2586 2587 env->tr.flags = DESC_INTEL_UNUSABLE; 2587 2588 env->tr.fVBoxFlags = CPUMSELREG_FLAGS_VALID; … … 2677 2678 e2 = DESC_INTEL_UNUSABLE; 2678 2679 } 2679 cpu_x86_load_seg_cache (env, seg_reg, selector, 0, 0, e2);2680 cpu_x86_load_seg_cache_with_clean_flags(env, seg_reg, selector, 0, 0, e2); 2680 2681 #endif 2681 2682 } else { … … 3355 3356 if (!(e2 & DESC_A_MASK)) 3356 3357 e2 = set_segment_accessed(new_cs, e2); 3357 cpu_x86_load_seg_cache (env, R_SS, new_ss,3358 0, 0xffffffff,3359 DESC_INTEL_UNUSABLE | (rpl << DESC_DPL_SHIFT) );3358 cpu_x86_load_seg_cache_with_clean_flags(env, R_SS, new_ss, 3359 0, 0xffffffff, 3360 DESC_INTEL_UNUSABLE | (rpl << DESC_DPL_SHIFT) ); 3360 3361 ss_e2 = DESC_B_MASK; /* not really used */ 3361 3362 } else
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器