- Timestamp:
- Mar 12, 2007 9:51:47 AM (18 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/SELM.cpp
r1335 r1408 100 100 */ 101 101 AssertRelease(!(RT_OFFSETOF(VM, selm.s) & 31)); 102 AssertRelease(!(RT_OFFSETOF(VM, selm.s. Tss) & 15));102 AssertRelease(!(RT_OFFSETOF(VM, selm.s.aHyperSel[SELM_HYPER_SEL_TSS]) & 15)); 103 103 AssertRelease(sizeof(pVM->selm.s) <= sizeof(pVM->selm.padding)); 104 104 … … 106 106 * Init the structure. 107 107 */ 108 pVM->selm.s.offVM = RT_OFFSETOF(VM, selm);109 pVM->selm.s. SelCS= (SELM_GDT_ELEMENTS - 0x1) << 3;110 pVM->selm.s. SelDS= (SELM_GDT_ELEMENTS - 0x2) << 3;111 pVM->selm.s. SelCS64= (SELM_GDT_ELEMENTS - 0x3) << 3;112 pVM->selm.s. SelTSS= (SELM_GDT_ELEMENTS - 0x4) << 3;113 pVM->selm.s. SelTSSTrap08= (SELM_GDT_ELEMENTS - 0x5) << 3;108 pVM->selm.s.offVM = RT_OFFSETOF(VM, selm); 109 pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS] = (SELM_GDT_ELEMENTS - 0x1) << 3; 110 pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS] = (SELM_GDT_ELEMENTS - 0x2) << 3; 111 pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64] = (SELM_GDT_ELEMENTS - 0x3) << 3; 112 pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] = (SELM_GDT_ELEMENTS - 0x4) << 3; 113 pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] = (SELM_GDT_ELEMENTS - 0x5) << 3; 114 114 115 115 /* … … 208 208 { 209 209 PVBOXDESC paGdt = pVM->selm.s.paGdtHC; 210 rc = PGMMapSetPage(pVM, MMHyperHC2GC(pVM, &paGdt[pVM->selm.s. SelTSSTrap08>> 3]), sizeof(paGdt[0]),210 rc = PGMMapSetPage(pVM, MMHyperHC2GC(pVM, &paGdt[pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] >> 3]), sizeof(paGdt[0]), 211 211 X86_PTE_RW | X86_PTE_P | X86_PTE_A | X86_PTE_D); 212 212 AssertRC(rc); 213 rc = PGMMapSetPage(pVM, MMHyperHC2GC(pVM, &paGdt[pVM->selm.s. SelTSS>> 3]), sizeof(paGdt[0]),213 rc = PGMMapSetPage(pVM, MMHyperHC2GC(pVM, &paGdt[pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] >> 3]), sizeof(paGdt[0]), 214 214 X86_PTE_RW | X86_PTE_P | X86_PTE_A | X86_PTE_D); 215 215 AssertRC(rc); 216 rc = PGMMapSetPage(pVM, VM_GUEST_ADDR(pVM, &pVM->selm.s. Tss), sizeof(pVM->selm.s.Tss),216 rc = PGMMapSetPage(pVM, VM_GUEST_ADDR(pVM, &pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS]), sizeof(pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS]), 217 217 X86_PTE_RW | X86_PTE_P | X86_PTE_A | X86_PTE_D); 218 218 AssertRC(rc); 219 rc = PGMMapSetPage(pVM, VM_GUEST_ADDR(pVM, &pVM->selm.s. TssTrap08), sizeof(pVM->selm.s.TssTrap08),219 rc = PGMMapSetPage(pVM, VM_GUEST_ADDR(pVM, &pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08]), sizeof(pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08]), 220 220 X86_PTE_RW | X86_PTE_P | X86_PTE_A | X86_PTE_D); 221 221 AssertRC(rc); … … 243 243 244 244 /** @todo selector relocations should be a seperate operation? */ 245 CPUMSetHyperCS(pVM, pVM->selm.s. SelCS);246 CPUMSetHyperDS(pVM, pVM->selm.s. SelDS);247 CPUMSetHyperES(pVM, pVM->selm.s. SelDS);248 CPUMSetHyperSS(pVM, pVM->selm.s. SelDS);249 CPUMSetHyperTR(pVM, pVM->selm.s. SelTSS);245 CPUMSetHyperCS(pVM, pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS]); 246 CPUMSetHyperDS(pVM, pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]); 247 CPUMSetHyperES(pVM, pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]); 248 CPUMSetHyperSS(pVM, pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]); 249 CPUMSetHyperTR(pVM, pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS]); 250 250 251 251 /* … … 253 253 * Both are wide open (base 0, limit 4GB) 254 254 */ 255 PVBOXDESC pDesc = &paGdt[pVM->selm.s. SelCS>> 3];255 PVBOXDESC pDesc = &paGdt[pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS] >> 3]; 256 256 pDesc->Gen.u16LimitLow = 0xffff; 257 257 pDesc->Gen.u4LimitHigh = 0xf; … … 269 269 270 270 /* data */ 271 pDesc = &paGdt[pVM->selm.s. SelDS>> 3];271 pDesc = &paGdt[pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS] >> 3]; 272 272 pDesc->Gen.u16LimitLow = 0xffff; 273 273 pDesc->Gen.u4LimitHigh = 0xf; … … 285 285 286 286 /* 64-bit mode code (& data?) */ 287 pDesc = &paGdt[pVM->selm.s. SelCS64>> 3];287 pDesc = &paGdt[pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64] >> 3]; 288 288 pDesc->Gen.u16LimitLow = 0xffff; 289 289 pDesc->Gen.u4LimitHigh = 0xf; … … 303 303 * TSS descriptor 304 304 */ 305 pDesc = &paGdt[pVM->selm.s. SelTSS>> 3];305 pDesc = &paGdt[pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] >> 3]; 306 306 RTGCPTR pGCTSS = VM_GUEST_ADDR(pVM, &pVM->selm.s.Tss); 307 307 pDesc->Gen.u16BaseLow = RT_LOWORD(pGCTSS); … … 322 322 * TSS descriptor for trap 08 323 323 */ 324 pDesc = &paGdt[pVM->selm.s. SelTSSTrap08>> 3];324 pDesc = &paGdt[pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] >> 3]; 325 325 pDesc->Gen.u16LimitLow = sizeof(VBOXTSS) - 1; 326 326 pDesc->Gen.u4LimitHigh = 0; … … 345 345 /* Current TSS */ 346 346 pVM->selm.s.Tss.cr3 = PGMGetHyperCR3(pVM); 347 pVM->selm.s.Tss.ss0 = pVM->selm.s. SelDS;347 pVM->selm.s.Tss.ss0 = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]; 348 348 pVM->selm.s.Tss.esp0 = VMMGetStackGC(pVM); 349 pVM->selm.s.Tss.cs = pVM->selm.s. SelCS;350 pVM->selm.s.Tss.ds = pVM->selm.s. SelDS;351 pVM->selm.s.Tss.es = pVM->selm.s. SelDS;349 pVM->selm.s.Tss.cs = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS]; 350 pVM->selm.s.Tss.ds = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]; 351 pVM->selm.s.Tss.es = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]; 352 352 pVM->selm.s.Tss.offIoBitmap = sizeof(VBOXTSS); 353 353 354 354 /* trap 08 */ 355 355 pVM->selm.s.TssTrap08.cr3 = PGMGetInterGCCR3(pVM); /* this should give use better survival chances. */ 356 pVM->selm.s.TssTrap08.ss0 = pVM->selm.s. SelDS;357 pVM->selm.s.TssTrap08.ss = pVM->selm.s. SelDS;356 pVM->selm.s.TssTrap08.ss0 = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]; 357 pVM->selm.s.TssTrap08.ss = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]; 358 358 pVM->selm.s.TssTrap08.esp0 = VMMGetStackGC(pVM) - PAGE_SIZE / 2; /* upper half can be analysed this way. */ 359 359 pVM->selm.s.TssTrap08.esp = pVM->selm.s.TssTrap08.esp0; 360 360 pVM->selm.s.TssTrap08.ebp = pVM->selm.s.TssTrap08.esp0; 361 pVM->selm.s.TssTrap08.cs = pVM->selm.s. SelCS;362 pVM->selm.s.TssTrap08.ds = pVM->selm.s. SelDS;363 pVM->selm.s.TssTrap08.es = pVM->selm.s. SelDS;361 pVM->selm.s.TssTrap08.cs = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS]; 362 pVM->selm.s.TssTrap08.ds = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]; 363 pVM->selm.s.TssTrap08.es = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]; 364 364 pVM->selm.s.TssTrap08.fs = 0; 365 365 pVM->selm.s.TssTrap08.gs = 0; … … 610 610 SSMR3PutBool(pSSM, pSelm->fDisableMonitoring); 611 611 SSMR3PutBool(pSSM, pSelm->fSyncTSSRing0Stack); 612 SSMR3PutSel(pSSM, pSelm-> SelCS);613 SSMR3PutSel(pSSM, pSelm-> SelDS);614 SSMR3PutSel(pSSM, pSelm-> SelCS64);615 SSMR3PutSel(pSSM, pSelm-> SelCS64); //reserved for DS64.616 SSMR3PutSel(pSSM, pSelm-> SelTSS);617 return SSMR3PutSel(pSSM, pSelm-> SelTSSTrap08);612 SSMR3PutSel(pSSM, pSelm->aHyperSel[SELM_HYPER_SEL_CS]); 613 SSMR3PutSel(pSSM, pSelm->aHyperSel[SELM_HYPER_SEL_DS]); 614 SSMR3PutSel(pSSM, pSelm->aHyperSel[SELM_HYPER_SEL_CS64]); 615 SSMR3PutSel(pSSM, pSelm->aHyperSel[SELM_HYPER_SEL_CS64]); //reserved for DS64. 616 SSMR3PutSel(pSSM, pSelm->aHyperSel[SELM_HYPER_SEL_TSS]); 617 return SSMR3PutSel(pSSM, pSelm->aHyperSel[SELM_HYPER_SEL_TSS_TRAP08]); 618 618 } 619 619 … … 676 676 /* Check that no selectors have be relocated. */ 677 677 PSELM pSelm = &pVM->selm.s; 678 if ( SelCS != pSelm-> SelCS679 || SelDS != pSelm-> SelDS680 || SelCS64 != pSelm-> SelCS64681 || SelDS64 != pSelm-> SelCS64682 || SelTSS != pSelm-> SelTSS683 || SelTSSTrap08 != pSelm-> SelTSSTrap08)678 if ( SelCS != pSelm->aHyperSel[SELM_HYPER_SEL_CS] 679 || SelDS != pSelm->aHyperSel[SELM_HYPER_SEL_DS] 680 || SelCS64 != pSelm->aHyperSel[SELM_HYPER_SEL_CS64] 681 || SelDS64 != pSelm->aHyperSel[SELM_HYPER_SEL_CS64] 682 || SelTSS != pSelm->aHyperSel[SELM_HYPER_SEL_TSS] 683 || SelTSSTrap08 != pSelm->aHyperSel[SELM_HYPER_SEL_TSS_TRAP08]) 684 684 { 685 685 AssertMsgFailed(("Some selector have been relocated - this cannot happen!\n")); … … 744 744 SELMR3DECL(int) SELMR3GdtSetup(PVM pVM, PCVBOXDESC paGDTEs, unsigned cGDTEs) 745 745 { 746 AssertMsg(cGDTEs <= (unsigned)(pVM->selm.s. SelTSSTrap08>> 3), ("Oops! the loaded GDT is as large as our.. we assume no clashes!!!\n"));746 AssertMsg(cGDTEs <= (unsigned)(pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] >> 3), ("Oops! the loaded GDT is as large as our.. we assume no clashes!!!\n")); 747 747 748 748 /* … … 895 895 */ 896 896 // RTSEL aHyperGDT[MAX_NEEDED_HYPERVISOR_GDTS]; 897 if (cbEffLimit >= pVM->selm.s. SelTSSTrap08)897 if (cbEffLimit >= pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08]) 898 898 { 899 899 #if 0 … … 976 976 * Check if the Guest GDT intrudes on our GDT entries. 977 977 */ 978 if (cbEffLimit >= pVM->selm.s. SelTSSTrap08)978 if (cbEffLimit >= pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08]) 979 979 { 980 980 /* Reinitialize our hypervisor GDTs */ 981 pVM->selm.s. SelCS= aHyperGDT[0];982 pVM->selm.s. SelDS= aHyperGDT[1];983 pVM->selm.s. SelCS64= aHyperGDT[2];984 pVM->selm.s. SelTSS= aHyperGDT[3];985 pVM->selm.s. SelTSSTrap08= aHyperGDT[4];981 pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS] = aHyperGDT[0]; 982 pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS] = aHyperGDT[1]; 983 pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64] = aHyperGDT[2]; 984 pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] = aHyperGDT[3]; 985 pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] = aHyperGDT[4]; 986 986 SELMR3Relocate(pVM); /** @todo r=bird: Must call VMR3Relocate! */ 987 987 } … … 1545 1545 1546 1546 #if 0 1547 if (GDTR.cbGdt >= (unsigned)(pVM->selm.s. SelTSSTrap08>> X86_SEL_SHIFT))1547 if (GDTR.cbGdt >= (unsigned)(pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] >> X86_SEL_SHIFT)) 1548 1548 { 1549 1549 AssertReleaseMsgFailed(("Internal SELM GDT conflict.\n")); … … 1831 1831 VBOXDESC Desc; 1832 1832 if ( !(Sel & X86_SEL_LDT) 1833 && ( pVM->selm.s. SelCS== (Sel & X86_SEL_MASK)1834 || pVM->selm.s. SelDS== (Sel & X86_SEL_MASK)1835 || pVM->selm.s. SelCS64== (Sel & X86_SEL_MASK)1836 || pVM->selm.s. SelTSS== (Sel & X86_SEL_MASK)1837 || pVM->selm.s. SelTSSTrap08== (Sel & X86_SEL_MASK))1833 && ( pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS] == (Sel & X86_SEL_MASK) 1834 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS] == (Sel & X86_SEL_MASK) 1835 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64] == (Sel & X86_SEL_MASK) 1836 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] == (Sel & X86_SEL_MASK) 1837 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] == (Sel & X86_SEL_MASK)) 1838 1838 ) 1839 1839 { … … 1962 1962 */ 1963 1963 Desc = pVM->selm.s.paGdtHC[Sel >> X86_SEL_SHIFT]; 1964 pSelInfo->fHyper = pVM->selm.s. SelCS== (Sel & X86_SEL_MASK)1965 || pVM->selm.s. SelDS== (Sel & X86_SEL_MASK)1966 || pVM->selm.s. SelCS64== (Sel & X86_SEL_MASK)1967 || pVM->selm.s. SelTSS== (Sel & X86_SEL_MASK)1968 || pVM->selm.s. SelTSSTrap08== (Sel & X86_SEL_MASK);1964 pSelInfo->fHyper = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS] == (Sel & X86_SEL_MASK) 1965 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS] == (Sel & X86_SEL_MASK) 1966 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64] == (Sel & X86_SEL_MASK) 1967 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] == (Sel & X86_SEL_MASK) 1968 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] == (Sel & X86_SEL_MASK); 1969 1969 /** @todo check that the GDT offset is valid. */ 1970 1970 } … … 2120 2120 selmR3FormatDescriptor(pVM->selm.s.paGdtHC[iGDT], iGDT << X86_SEL_SHIFT, &szOutput[0], sizeof(szOutput)); 2121 2121 const char *psz = ""; 2122 if (iGDT == ((unsigned)pVM->selm.s. SelCS>> X86_SEL_SHIFT))2122 if (iGDT == ((unsigned)pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS] >> X86_SEL_SHIFT)) 2123 2123 psz = " HyperCS"; 2124 else if (iGDT == ((unsigned)pVM->selm.s. SelDS>> X86_SEL_SHIFT))2124 else if (iGDT == ((unsigned)pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS] >> X86_SEL_SHIFT)) 2125 2125 psz = " HyperDS"; 2126 else if (iGDT == ((unsigned)pVM->selm.s. SelCS64>> X86_SEL_SHIFT))2126 else if (iGDT == ((unsigned)pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64] >> X86_SEL_SHIFT)) 2127 2127 psz = " HyperCS64"; 2128 else if (iGDT == ((unsigned)pVM->selm.s. SelTSS>> X86_SEL_SHIFT))2128 else if (iGDT == ((unsigned)pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] >> X86_SEL_SHIFT)) 2129 2129 psz = " HyperTSS"; 2130 else if (iGDT == ((unsigned)pVM->selm.s. SelTSSTrap08>> X86_SEL_SHIFT))2130 else if (iGDT == ((unsigned)pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] >> X86_SEL_SHIFT)) 2131 2131 psz = " HyperTSSTrap08"; 2132 2132 pHlp->pfnPrintf(pHlp, "%s%s\n", szOutput, psz); -
trunk/src/VBox/VMM/SELMInternal.h
r161 r1408 40 40 41 41 /** Number of GDTs we need for internal use */ 42 #define MAX_NEEDED_HYPERVISOR_GDTS 542 #define MAX_NEEDED_HYPERVISOR_GDTS 5 43 43 44 44 /** The number of GDTS allocated for our GDT. (full size) */ 45 #define SELM_GDT_ELEMENTS 8192 45 #define SELM_GDT_ELEMENTS 8192 46 47 /** aHyperSel index to retrieve hypervisor selectors */ 48 /** The Flat CS selector used by the VMM inside the GC. */ 49 #define SELM_HYPER_SEL_CS 0 50 /** The Flat DS selector used by the VMM inside the GC. */ 51 #define SELM_HYPER_SEL_DS 1 52 /** The 64-bit mode CS selector used by the VMM inside the GC. */ 53 #define SELM_HYPER_SEL_CS64 2 54 /** The TSS selector used by the VMM inside the GC. */ 55 #define SELM_HYPER_SEL_TSS 3 56 /** The TSS selector for taking trap 08 (\#DF). */ 57 #define SELM_HYPER_SEL_TSS_TRAP08 4 58 #define SELM_HYPER_SEL_MAX (SELM_HYPER_SEL_TSS_TRAP08+1) 46 59 47 60 /** … … 63 76 RTINT offVM; 64 77 65 /** The Flat CS selector used by the VMM inside the GC. */ 66 RTSEL SelCS; 67 /** The Flat DS selector used by the VMM inside the GC. */ 68 RTSEL SelDS; 69 /** The 64-bit mode CS selector used by the VMM inside the GC. */ 70 RTSEL SelCS64; 71 /** The TSS selector used by the VMM inside the GC. */ 72 RTSEL SelTSS; 73 /** The TSS selector for taking trap 08 (\#DF). */ 74 RTSEL SelTSSTrap08; 78 /* Flat CS, DS, 64 bit mode CS, TSS & trap 8 TSS */ 79 RTSEL aHyperSel[SELM_HYPER_SEL_MAX]; 75 80 76 81 /** Pointer to the GCs - HC Ptr. -
trunk/src/VBox/VMM/TRPM.cpp
r1328 r1408 621 621 for (uint32_t iTrap = 0; iTrap < ELEMENTS(pVM->trpm.s.aGuestTrapHandler); iTrap++) 622 622 { 623 if (pVM->trpm.s.aGuestTrapHandler[iTrap] )623 if (pVM->trpm.s.aGuestTrapHandler[iTrap] != TRPM_INVALID_HANDLER) 624 624 { 625 625 Log(("TRPMR3Relocate: iGate=%2X Handler %VGv -> %VGv\n", iTrap, pVM->trpm.s.aGuestTrapHandler[iTrap], pVM->trpm.s.aGuestTrapHandler[iTrap] + offDelta)); -
trunk/src/VBox/VMM/VMMAll/SELMAll.cpp
r1361 r1408 496 496 SELMDECL(RTSEL) SELMGetTrap8Selector(PVM pVM) 497 497 { 498 return pVM->selm.s. SelTSSTrap08;498 return pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08]; 499 499 } 500 500 … … 657 657 SELMDECL(RTSEL) SELMGetHyperCS(PVM pVM) 658 658 { 659 return pVM->selm.s. SelCS;659 return pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS]; 660 660 } 661 661 … … 668 668 SELMDECL(RTSEL) SELMGetHyperCS64(PVM pVM) 669 669 { 670 return pVM->selm.s. SelCS64;670 return pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64]; 671 671 } 672 672 … … 679 679 SELMDECL(RTSEL) SELMGetHyperDS(PVM pVM) 680 680 { 681 return pVM->selm.s. SelDS;681 return pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS]; 682 682 } 683 683 … … 690 690 SELMDECL(RTSEL) SELMGetHyperTSS(PVM pVM) 691 691 { 692 return pVM->selm.s. SelTSS;692 return pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS]; 693 693 } 694 694 … … 701 701 SELMDECL(RTSEL) SELMGetHyperTSSTrap08(PVM pVM) 702 702 { 703 return pVM->selm.s. SelTSSTrap08;703 return pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08]; 704 704 } 705 705 -
trunk/src/VBox/VMM/VMMGC/SELMGC.cpp
r1327 r1408 76 76 */ 77 77 RTSEL Sel = iGDTEntry << X86_SEL_SHIFT; 78 Assert( !(pVM->selm.s. SelCS& ~X86_SEL_MASK)79 && !(pVM->selm.s. SelDS& ~X86_SEL_MASK)80 && !(pVM->selm.s. SelCS64& ~X86_SEL_MASK)81 && !(pVM->selm.s. SelTSS& ~X86_SEL_MASK)82 && !(pVM->selm.s. SelTSSTrap08& ~X86_SEL_MASK));83 if ( pVM->selm.s. SelCS== Sel84 || pVM->selm.s. SelDS== Sel85 || pVM->selm.s. SelCS64== Sel86 || pVM->selm.s. SelTSS== Sel87 || pVM->selm.s. SelTSSTrap08== Sel)78 Assert( !(pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS] & ~X86_SEL_MASK) 79 && !(pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS] & ~X86_SEL_MASK) 80 && !(pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64] & ~X86_SEL_MASK) 81 && !(pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] & ~X86_SEL_MASK) 82 && !(pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] & ~X86_SEL_MASK)); 83 if ( pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS] == Sel 84 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS] == Sel 85 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64] == Sel 86 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] == Sel 87 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] == Sel) 88 88 { 89 89 if (Desc.Gen.u1Present) -
trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp
r1278 r1408 549 549 GEN_CHECK_SIZE(SELM); 550 550 GEN_CHECK_OFF(SELM, offVM); 551 GEN_CHECK_OFF(SELM, SelCS);552 GEN_CHECK_OFF(SELM, SelDS);553 GEN_CHECK_OFF(SELM, SelCS64);554 GEN_CHECK_OFF(SELM, SelTSS);555 GEN_CHECK_OFF(SELM, SelTSSTrap08);551 GEN_CHECK_OFF(SELM, aHyperSel[SELM_HYPER_SEL_CS]); 552 GEN_CHECK_OFF(SELM, aHyperSel[SELM_HYPER_SEL_DS]); 553 GEN_CHECK_OFF(SELM, aHyperSel[SELM_HYPER_SEL_CS64]); 554 GEN_CHECK_OFF(SELM, aHyperSel[SELM_HYPER_SEL_TSS]); 555 GEN_CHECK_OFF(SELM, aHyperSel[SELM_HYPER_SEL_TSS_TRAP08]); 556 556 GEN_CHECK_OFF(SELM, paGdtHC); 557 557 GEN_CHECK_OFF(SELM, paGdtGC);
Note:
See TracChangeset
for help on using the changeset viewer.