Changeset 24959 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Nov 25, 2009 3:31:10 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 55257
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CPUM.cpp
r24852 r24959 1948 1948 if (uVersion >= CPUM_SAVED_STATE_VERSION_VER3_0) 1949 1949 SSMR3GetMem(pSSM, &pVM->aCpus[i].cpum.s.GuestMsr, sizeof(pVM->aCpus[i].cpum.s.GuestMsr)); 1950 1951 /*1952 * HACK ALERT! Workaround for missing granularity flag in CS on1953 * AMD-v. This will cause trouble if the host now1954 * is using VT-x (teleporting, cold migration).1955 * May consider moving this into SVM_READ_SELREG or there about.1956 */1957 if ( !pVM->aCpus[i].cpum.s.Guest.csHid.Attr.n.u1Granularity1958 && pVM->aCpus[i].cpum.s.Guest.csHid.u32Limit > UINT16_MAX)1959 pVM->aCpus[i].cpum.s.Guest.csHid.Attr.n.u1Granularity = 1;1960 1950 } 1961 1951 } -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r24829 r24959 1435 1435 SVM_READ_SELREG(GS, gs); 1436 1436 1437 /* Correct the hidden CS granularity flag. Haven't seen it being wrong in 1438 any other register (yet). */ 1439 if ( !pCtx->csHid.Attr.n.u1Granularity 1440 && pCtx->csHid.Attr.n.u1Present 1441 && pCtx->csHid.u32Limit > UINT32_C(0xffff)) 1442 { 1443 Assert((pCtx->csHid.u32Limit & 0xfff) == 0xfff); 1444 pCtx->csHid.Attr.n.u1Granularity = 1; 1445 } 1446 #define SVM_ASSERT_SEL_GRANULARITY(reg) \ 1447 AssertMsg(!pCtx->reg##Hid.Attr.n.u1Present \ 1448 || ( pCtx->reg##Hid.Attr.n.u1Granularity \ 1449 ? (pCtx->reg##Hid.u32Limit & 0xfff) == 0xfff \ 1450 : pCtx->reg##Hid.u32Limit <= 0xffff), \ 1451 ("%#x\n", pCtx->reg##Hid.u32Limit)) 1452 SVM_ASSERT_SEL_GRANULARITY(ss); 1453 SVM_ASSERT_SEL_GRANULARITY(cs); 1454 SVM_ASSERT_SEL_GRANULARITY(ds); 1455 SVM_ASSERT_SEL_GRANULARITY(es); 1456 SVM_ASSERT_SEL_GRANULARITY(fs); 1457 SVM_ASSERT_SEL_GRANULARITY(gs); 1458 #undef SVM_ASSERT_SEL_GRANULARITY 1459 1437 1460 /* Remaining guest CPU context: TR, IDTR, GDTR, LDTR; must sync everything otherwise we can get out of sync when jumping to ring 3. */ 1438 1461 SVM_READ_SELREG(LDTR, ldtr);
Note:
See TracChangeset
for help on using the changeset viewer.