- Timestamp:
- Sep 6, 2013 5:40:56 PM (11 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r48362 r48369 2224 2224 { 2225 2225 int rc = VERR_INTERNAL_ERROR_5; 2226 RTSEL uSelDS = 0;2227 RTSEL uSelES = 0;2228 RTSEL uSelFS = 0;2229 RTSEL uSelGS = 0;2230 RTSEL uSelTR = 0;2231 2226 2232 2227 /* … … 2234 2229 */ 2235 2230 #if HC_ARCH_BITS == 64 2231 RTSEL uSelDS = ASMGetDS(); 2232 RTSEL uSelES = ASMGetES(); 2233 RTSEL uSelFS = ASMGetFS(); 2234 RTSEL uSelGS = ASMGetGS(); 2235 #else 2236 RTSEL uSelDS = 0; 2237 RTSEL uSelES = 0; 2238 RTSEL uSelFS = 0; 2239 RTSEL uSelGS = 0; 2240 #endif 2241 2242 /* Recalculate which host-state bits need to be manually restored. */ 2236 2243 pVCpu->hm.s.vmx.fRestoreHostFlags = 0; 2237 uSelDS = ASMGetDS();2238 uSelES = ASMGetES();2239 uSelFS = ASMGetFS();2240 uSelGS = ASMGetGS();2241 #endif2242 2244 2243 2245 /* 2244 2246 * Host CS and SS segment registers. 2245 2247 */ 2248 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL 2246 2249 RTSEL uSelCS; 2247 2250 RTSEL uSelSS; 2248 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL2249 2251 if (HMVMX_IS_64BIT_HOST_MODE()) 2250 2252 { … … 2259 2261 } 2260 2262 #else 2261 uSelCS = ASMGetCS();2262 uSelSS = ASMGetSS();2263 RTSEL uSelCS = ASMGetCS(); 2264 RTSEL uSelSS = ASMGetSS(); 2263 2265 #endif 2264 2266 … … 2266 2268 * Host TR segment register. 2267 2269 */ 2268 uSelTR = ASMGetTR();2270 RTSEL uSelTR = ASMGetTR(); 2269 2271 2270 2272 #if HC_ARCH_BITS == 64 … … 6127 6129 Assert(!CPUMIsHyperDebugStateActive(pVCpu)); 6128 6130 6131 #if HC_ARCH_BITS == 64 6129 6132 /* Restore host-state bits that VT-x only restores partially. */ 6130 6133 if ( (pVCpu->hm.s.vmx.fRestoreHostFlags & VMX_RESTORE_HOST_REQUIRED) … … 6135 6138 pVCpu->hm.s.vmx.fRestoreHostFlags = 0; 6136 6139 } 6140 #endif 6137 6141 6138 6142 STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatEntry); -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.h
r48218 r48369 51 51 # endif 52 52 53 /* Cached VMCS accesses -- defined only for 32 hosts (with 64-bit guest support). */53 /* Cached VMCS accesses -- defined only for 32-bit hosts (with 64-bit guest support). */ 54 54 # ifdef VMX_USE_CACHED_VMCS_ACCESSES 55 55 VMMR0DECL(int) VMXWriteCachedVmcsEx(PVMCPU pVCpu, uint32_t idxField, uint64_t u64Val); … … 64 64 65 65 # ifdef VBOX_WITH_HYBRID_32BIT_KERNEL 66 /* Don't use fAllow64BitGuests for VMXReadVmcsGstN() even though it looks right, as it can be forced to 'true'. 67 HMVMX_IS_64BIT_HOST_MODE() is what we need. */ 66 68 # define VMXReadVmcsHstN(idxField, p64Val) HMVMX_IS_64BIT_HOST_MODE() ? \ 67 69 VMXReadVmcs64(idxField, p64Val) \ 68 70 : (*(p64Val) &= UINT64_C(0xffffffff), \ 69 71 VMXReadVmcs32(idxField, (uint32_t *)(p64Val))) 70 /* Don't use fAllow64BitGuests for VMXReadVmcsGstN() even though it looks right, as it can be forced to 'true'.71 HMVMX_IS_64BIT_HOST_MODE() is what we need. */72 72 # define VMXReadVmcsGstN VMXReadVmcsHstN 73 73 # define VMXReadVmcsGstNByIdxVal VMXReadVmcsGstN
Note:
See TracChangeset
for help on using the changeset viewer.