Changeset 41908 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 25, 2012 1:19:18 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.