- Timestamp:
- Jul 19, 2013 12:44:53 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r47202 r47243 5435 5435 * 5436 5436 * See Intel spec. 27.3.2 "Saving Segment Registers and Descriptor-Table Registers". 5437 * 5438 * bird: This isn't quite as simple. VT-x and VBox(!) requires the DPL for SS to be the the same as CPL. In 64-bit mode it 5439 * is possible (int/trap/xxx injects does this when switching rings) to load SS with a NULL selector and RPL=CPL. 5440 * The Attr.u = HMVMX_SEL_UNUSABLE works fine as long as nobody uses ring-1 or ring-2. VT-x seems to set the DPL 5441 * correctly in the attributes even when the unusable bit is set, we need to preseve the DPL or we get invalid guest 5442 * state trouble. Try bs2-cpu-hidden-regs-1. 5437 5443 */ 5438 5444 if (pSelReg->Attr.u & HMVMX_SEL_UNUSABLE) 5439 5445 { 5440 5446 Assert(idxSel != VMX_VMCS16_GUEST_FIELD_TR); /* TR is the only selector that can never be unusable. */ 5447 Log(("idxSel=%#x attr=%#x\n", idxSel, pSelReg->Attr.u)); 5448 5449 #if 0 /** @todo Is there any code which will freak out if we do this for all? Better track it down and fix. */ 5450 pSelReg->Attr.u &= HMVMX_SEL_UNUSABLE | (UINT32_C(3) << 5); 5451 #else 5441 5452 pSelReg->Attr.u = HMVMX_SEL_UNUSABLE; 5453 #endif 5442 5454 } 5443 5455 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.