vbox的更動 55312 路徑 trunk/src/VBox/VMM/VMMAll
- 時間撮記:
- 2015-4-16 下午03:29:17 (10 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r55292 r55312 2143 2143 * Set the guest XCR0 register. 2144 2144 * 2145 * Will load additional state if the FPU state is already loaded (in ring-0 & 2146 * raw-mode context). 2147 * 2145 2148 * @returns VINF_SUCCESS on success, VERR_CPUM_RAISE_GP_0 on invalid input 2146 2149 * value. … … 2164 2167 { 2165 2168 pVCpu->cpum.s.Guest.aXcr[0] = uNewValue; 2166 pVCpu->cpum.s.Guest.fXStateMask |= uNewValue; 2169 2170 /* If more state components are enabled, we need to take care to load 2171 them if the FPU/SSE state is already loaded. May otherwise leak 2172 host state to the guest. */ 2173 uint64_t fNewComponents = ~pVCpu->cpum.s.Guest.fXStateMask & uNewValue; 2174 if (fNewComponents) 2175 { 2176 #if defined(IN_RING0) || defined(IN_RC) 2177 if (pVCpu->cpum.s.fUseFlags & CPUM_USED_FPU) 2178 { 2179 if (pVCpu->cpum.s.Guest.fXStateMask != 0) 2180 /* Adding more components. */ 2181 ASMXRstor(pVCpu->cpum.s.Guest.CTX_SUFF(pXState), fNewComponents); 2182 else 2183 { 2184 /* We're switching from FXSAVE/FXRSTOR to XSAVE/XRSTOR. */ 2185 pVCpu->cpum.s.Guest.fXStateMask |= XSAVE_C_X87 | XSAVE_C_SSE; 2186 if (uNewValue & ~(XSAVE_C_X87 | XSAVE_C_SSE)) 2187 ASMXRstor(pVCpu->cpum.s.Guest.CTX_SUFF(pXState), uNewValue & ~(XSAVE_C_X87 | XSAVE_C_SSE)); 2188 } 2189 } 2190 #endif 2191 pVCpu->cpum.s.Guest.fXStateMask |= uNewValue; 2192 } 2167 2193 return VINF_SUCCESS; 2168 2194 } … … 2623 2649 { 2624 2650 return RT_BOOL(pVCpu->cpum.s.fUseFlags & CPUM_USED_FPU); 2625 }2626 2627 2628 /**2629 * Deactivate the FPU/XMM state of the guest OS.2630 * @param pVCpu Pointer to the VMCPU.2631 *2632 * @todo r=bird: Why is this needed? Looks like a workaround for mishandled2633 * FPU state management.2634 */2635 VMMDECL(void) CPUMDeactivateGuestFPUState(PVMCPU pVCpu)2636 {2637 Assert(!(pVCpu->cpum.s.fUseFlags & CPUM_USED_FPU));2638 pVCpu->cpum.s.fUseFlags &= ~CPUM_USED_FPU;2639 2651 } 2640 2652
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器