Changeset 45885 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 2, 2013 10:58:28 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 85488
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r45884 r45885 3144 3144 /** 3145 3145 * Strict function to validate segment registers. 3146 * 3147 * @remarks Requires CR0. 3146 3148 */ 3147 3149 static void hmR0VmxValidateSegmentRegs(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx) … … 3184 3186 } 3185 3187 Assert(pCtx->ss.Attr.n.u2Dpl == (pCtx->ss.Sel & X86_SEL_RPL)); 3186 /* CR0 might not be up-to-date here always, hence disabled. */ 3187 #if 0 3188 Assert(!(pVCpu->hm.s.fContextUseFlags & HM_CHANGED_GUEST_CR0)); 3188 3189 if (!pCtx->cr0 & X86_CR0_PE) 3189 3190 Assert(!pCtx->ss.Attr.n.u2Dpl); 3190 #endif3191 3191 /* DS, ES, FS, GS - only check for usable selectors, see hmR0VmxWriteSegmentReg(). */ 3192 3192 if (pCtx->ds.Attr.u && pCtx->ds.Attr.u != HMVMX_SEL_UNUSABLE) … … 3371 3371 * before using them. 3372 3372 * 3373 * @remarks Requires CR0 (strict builds validation). 3373 3374 * @remarks No-long-jump zone!!! 3374 3375 */ … … 6394 6395 } 6395 6396 6396 /** @todo if the order of loading is important, inform it via comments here */ 6397 /* 6398 * Load the guest-state into the VMCS. 6399 * Any ordering dependency among the sub-functions below must be explicitly stated using comments. 6400 * Ideally, assert that the cross-dependent bits are up to date at the point of using it. 6401 */ 6397 6402 int rc = hmR0VmxLoadGuestEntryCtls(pVCpu, pMixedCtx); 6398 6403 AssertLogRelMsgRCReturn(rc, ("hmR0VmxLoadGuestEntryCtls! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); … … 6407 6412 AssertLogRelMsgRCReturn(rc, ("hmR0VmxLoadGuestControlRegs: rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); 6408 6413 6414 /* Must be done after CR0 is loaded (strict builds require CR0 for segment register validation checks). */ 6409 6415 rc = hmR0VmxLoadGuestSegmentRegs(pVCpu, pMixedCtx); 6410 6416 AssertLogRelMsgRCReturn(rc, ("hmR0VmxLoadGuestSegmentRegs: rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc);
Note:
See TracChangeset
for help on using the changeset viewer.