Changeset 41908 in vbox
- Timestamp:
- Jun 25, 2012 1:19:18 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpumctx.h
r41906 r41908 236 236 /** @name General Register. 237 237 * @note These follow the encoding order (X86_GREG_XXX) and can be accessed as 238 * an array starting a rax.238 * an array starting at rax. 239 239 * @{ */ 240 240 union … … 304 304 /** @name Segment registers. 305 305 * @note These follow the encoding order (X86_SREG_XXX) and can be accessed as 306 * an array starting a es.306 * an array starting at es. 307 307 * @{ */ 308 308 CPUMSELREG es; -
trunk/src/VBox/VMM/VMMRC/SELMRC.cpp
r41906 r41908 132 132 *pShadowDescr = Desc; 133 133 134 /* Check if we change the LDT selector */ 134 /* 135 * Detect and mark stale registers. 136 */ 137 PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu); 138 PCPUMSELREG paSRegCtx = &pCtx->es; 139 PCPUMSELREG paSRegFrm = &pRegFrame->es; 140 for (unsigned i = 0; i <= X86_SREG_GS; i++) 141 if (Sel == (paSRegFrm[i].Sel & X86_SEL_MASK)) 142 { 143 /** @todo we clear the valid flag here, maybe we shouldn't... but that would 144 * require implementing handling of stale registers in raw-mode. 145 * Tricky, at least for SS and CS. */ 146 paSRegFrm[i].fFlags = CPUMSELREG_FLAGS_STALE; 147 paSRegCtx[i].fFlags = CPUMSELREG_FLAGS_STALE; 148 } 149 150 /* 151 * Check if we change the LDT selector. 152 */ 135 153 if (Sel == CPUMGetGuestLDTR(pVCpu)) /** @todo this isn't correct in two(+) ways! 1. It shouldn't be done until the LDTR is reloaded. 2. It caused the next instruction to be emulated. */ 136 154 { … … 153 171 Log(("GDT write to selector in SS register %04X\n", pRegFrame->ss.Sel)); 154 172 #endif 173 155 174 return VINF_SUCCESS; 156 175 }
Note:
See TracChangeset
for help on using the changeset viewer.