Changeset 41940 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jun 28, 2012 12:07:43 AM (12 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r41939 r41940 2204 2204 * 2205 2205 * @param pVCpu Pointer to the VMCPU. 2206 * @param pCtxCore The context core. 2207 * @param eflags The new EFLAGS value. 2208 */ 2209 VMMDECL(void) CPUMRawSetEFlags(PVMCPU pVCpu, PCPUMCTXCORE pCtxCore, uint32_t eflags) 2210 { 2211 PVM pVM = pVCpu->CTX_SUFF(pVM); 2212 2206 * @param fEfl The new EFLAGS value. 2207 */ 2208 VMMDECL(void) CPUMRawSetEFlags(PVMCPU pVCpu, uint32_t fEfl) 2209 { 2213 2210 if (!pVCpu->cpum.s.fRawEntered) 2214 { 2215 pCtxCore->eflags.u32 = eflags; 2216 return; 2217 } 2218 PATMRawSetEFlags(pVM, pCtxCore, eflags); 2211 pVCpu->cpum.s.Guest.eflags.u32 = fEfl; 2212 else 2213 PATMRawSetEFlags(pVCpu->CTX_SUFF(pVM), CPUMCTX2CORE(&pVCpu->cpum.s.Guest), fEfl); 2219 2214 } 2220 2215 #endif /* !IN_RING0 */ … … 2225 2220 * 2226 2221 * @returns The eflags. 2227 * @param pVCpu Pointer to the VMCPU. 2228 * @param pCtxCore The context core. 2229 */ 2230 VMMDECL(uint32_t) CPUMRawGetEFlags(PVMCPU pVCpu, PCPUMCTXCORE pCtxCore) 2222 * @param pVCpu Pointer to the current virtual CPU. 2223 */ 2224 VMMDECL(uint32_t) CPUMRawGetEFlags(PVMCPU pVCpu) 2231 2225 { 2232 2226 #ifdef IN_RING0 2233 NOREF(pVCpu); 2234 return pCtxCore->eflags.u32; 2227 return pVCpu->cpum.s.Guest.eflags.u32; 2235 2228 #else 2236 PVM pVM = pVCpu->CTX_SUFF(pVM);2237 2229 2238 2230 if (!pVCpu->cpum.s.fRawEntered) 2239 return p CtxCore->eflags.u32;2240 return PATMRawGetEFlags(pV M, pCtxCore);2231 return pVCpu->cpum.s.Guest.eflags.u32; 2232 return PATMRawGetEFlags(pVCpu->CTX_SUFF(pVM), CPUMCTX2CORE(&pVCpu->cpum.s.Guest)); 2241 2233 #endif 2242 2234 } … … 2246 2238 * Sets the specified changed flags (CPUM_CHANGED_*). 2247 2239 * 2248 * @param pVCpu Pointer to the VMCPU.2240 * @param pVCpu Pointer to the current virtual CPU. 2249 2241 */ 2250 2242 VMMDECL(void) CPUMSetChangedFlags(PVMCPU pVCpu, uint32_t fChangedFlags) -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r41939 r41940 636 636 eflags &= uMask; 637 637 638 CPUMRawSetEFlags(pVCpu, pRegFrame,eflags);638 CPUMRawSetEFlags(pVCpu, eflags); 639 639 Assert((pRegFrame->eflags.u32 & (X86_EFL_IF|X86_EFL_IOPL)) == X86_EFL_IF); 640 640 -
trunk/src/VBox/VMM/VMMAll/IOMAll.cpp
r41939 r41940 853 853 * If this isn't ring-0, we have to check for I/O privileges. 854 854 */ 855 uint32_t efl = CPUMRawGetEFlags(pVCpu , pCtxCore);855 uint32_t efl = CPUMRawGetEFlags(pVCpu); 856 856 uint32_t cpl = CPUMGetGuestCPL(pVCpu); 857 857 -
trunk/src/VBox/VMM/VMMAll/TRPMAll.cpp
r41939 r41940 406 406 /* Retrieve the eflags including the virtualized bits. */ 407 407 /* Note: hackish as the cpumctxcore structure doesn't contain the right value */ 408 eflags.u32 = CPUMRawGetEFlags(pVCpu , pRegFrame);408 eflags.u32 = CPUMRawGetEFlags(pVCpu); 409 409 410 410 /* VMCPU_FF_INHIBIT_INTERRUPTS should be cleared upfront or don't call this function at all for dispatching hardware interrupts. */ … … 680 680 /* Turn off interrupts for interrupt gates. */ 681 681 if (GuestIdte.Gen.u5Type2 == VBOX_IDTE_TYPE2_INT_32) 682 CPUMRawSetEFlags(pVCpu, pRegFrame,eflags.u32 & ~X86_EFL_IF);682 CPUMRawSetEFlags(pVCpu, eflags.u32 & ~X86_EFL_IF); 683 683 684 684 /* The virtualized bits must be removed again!! */
Note:
See TracChangeset
for help on using the changeset viewer.