- Timestamp:
- Jun 4, 2008 4:22:54 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/SELM.cpp
r9394 r9395 1083 1083 */ 1084 1084 PVBOXDESC pDesc = &pVM->selm.s.paGdtHC[SelLdt >> X86_SEL_SHIFT]; 1085 RTGCPTR GCPtrLdt = pDesc->Gen.u16BaseLow | (pDesc->Gen.u8BaseHigh1 << 16) | ( pDesc->Gen.u8BaseHigh2 << 24);1085 RTGCPTR GCPtrLdt = pDesc->Gen.u16BaseLow | (pDesc->Gen.u8BaseHigh1 << 16) | ((RTGCPTR)pDesc->Gen.u8BaseHigh2 << 24); 1086 1086 unsigned cbLdt = pDesc->Gen.u16LimitLow | (pDesc->Gen.u4LimitHigh << 16); 1087 1087 if (pDesc->Gen.u1Granularity) … … 1420 1420 */ 1421 1421 PVBOXDESC pDesc = &pVM->selm.s.paGdtHC[SelTss >> X86_SEL_SHIFT]; 1422 RTGCPTR GCPtrTss = pDesc->Gen.u16BaseLow | (pDesc->Gen.u8BaseHigh1 << 16) | (( pDesc->Gen.u8BaseHigh2 << 24) & 0xff000000);1422 RTGCPTR GCPtrTss = pDesc->Gen.u16BaseLow | (pDesc->Gen.u8BaseHigh1 << 16) | ((RTGCPTR)pDesc->Gen.u8BaseHigh2 << 24); 1423 1423 unsigned cbTss = pDesc->Gen.u16LimitLow | (pDesc->Gen.u4LimitHigh << 16); 1424 1424 if (pDesc->Gen.u1Granularity) … … 1625 1625 return rc; 1626 1626 } 1627 RTGCPTR GCPtrLDTEGuest = LDTDesc.Gen.u16BaseLow | (LDTDesc.Gen.u8BaseHigh1 << 16) | ( LDTDesc.Gen.u8BaseHigh2 << 24);1627 RTGCPTR GCPtrLDTEGuest = LDTDesc.Gen.u16BaseLow | (LDTDesc.Gen.u8BaseHigh1 << 16) | ((RTGCPTR)LDTDesc.Gen.u8BaseHigh2 << 24); 1628 1628 unsigned cbLdt = LDTDesc.Gen.u16LimitLow | (LDTDesc.Gen.u4LimitHigh << 16); 1629 1629 if (LDTDesc.Gen.u1Granularity) … … 1704 1704 */ 1705 1705 PVBOXDESC pDesc = &pVM->selm.s.paGdtHC[SelTss >> X86_SEL_SHIFT]; 1706 RTGCPTR GCPtrTss = pDesc->Gen.u16BaseLow | (pDesc->Gen.u8BaseHigh1 << 16) | ( pDesc->Gen.u8BaseHigh2 << 24);1706 RTGCPTR GCPtrTss = pDesc->Gen.u16BaseLow | (pDesc->Gen.u8BaseHigh1 << 16) | ((RTGCPTR)pDesc->Gen.u8BaseHigh2 << 24); 1707 1707 unsigned cbTss = pDesc->Gen.u16LimitLow | (pDesc->Gen.u4LimitHigh << 16); 1708 1708 if (pDesc->Gen.u1Granularity) … … 1816 1816 if (ppvLdt) 1817 1817 { 1818 *ppvLdt = (RTGCPTR)( (Desc.Gen.u8BaseHigh2 << 24)1818 *ppvLdt = (RTGCPTR)( ((RTGCPTR)Desc.Gen.u8BaseHigh2 << 24) 1819 1819 | (Desc.Gen.u8BaseHigh1 << 16) 1820 1820 | Desc.Gen.u16BaseLow); … … 1908 1908 1909 1909 /* calc the descriptor location. */ 1910 GCPtrDesc = ( Desc.Gen.u8BaseHigh2 << 24)1910 GCPtrDesc = ((RTGCPTR)Desc.Gen.u8BaseHigh2 << 24) 1911 1911 | (Desc.Gen.u8BaseHigh1 << 16) 1912 1912 | Desc.Gen.u16BaseLow; … … 1941 1941 if (Desc.Gen.u1Granularity) 1942 1942 pSelInfo->cbLimit = (pSelInfo->cbLimit << PAGE_SHIFT) | PAGE_OFFSET_MASK; 1943 pSelInfo->GCPtrBase = ( Desc.Gen.u8BaseHigh2 << 24)1943 pSelInfo->GCPtrBase = ((RTGCPTR)Desc.Gen.u8BaseHigh2 << 24) 1944 1944 | (Desc.Gen.u8BaseHigh1 << 16) 1945 1945 | Desc.Gen.u16BaseLow; … … 2008 2008 if (Desc.Gen.u1Granularity) 2009 2009 pSelInfo->cbLimit = (pSelInfo->cbLimit << PAGE_SHIFT) | PAGE_OFFSET_MASK; 2010 pSelInfo->GCPtrBase = ( Desc.Gen.u8BaseHigh2 << 24)2010 pSelInfo->GCPtrBase = ((RTGCPTR)Desc.Gen.u8BaseHigh2 << 24) 2011 2011 | (Desc.Gen.u8BaseHigh1 << 16) 2012 2012 | Desc.Gen.u16BaseLow; -
trunk/src/VBox/VMM/VMMAll/SELMAll.cpp
r9212 r9395 70 70 71 71 return (RTGCPTR)( (RTGCUINTPTR)Addr 72 + ( ( Desc.Gen.u8BaseHigh2 << 24)72 + ( ((RTGCPTR)Desc.Gen.u8BaseHigh2 << 24) 73 73 | (Desc.Gen.u8BaseHigh1 << 16) 74 74 | Desc.Gen.u16BaseLow)); … … 203 203 /* calc address assuming straight stuff. */ 204 204 pvFlat = (RTGCPTR)( (RTGCUINTPTR)Addr 205 + ( ( Desc.Gen.u8BaseHigh2 << 24)205 + ( ((RTGCPTR)Desc.Gen.u8BaseHigh2 << 24) 206 206 | (Desc.Gen.u8BaseHigh1 << 16) 207 207 | Desc.Gen.u16BaseLow ) … … 408 408 { 409 409 *ppvFlat = (RTGCPTR)( (RTGCUINTPTR)Addr 410 + ( ( Desc.Gen.u8BaseHigh2 << 24)410 + ( ((RTGCPTR)Desc.Gen.u8BaseHigh2 << 24) 411 411 | (Desc.Gen.u8BaseHigh1 << 16) 412 412 | Desc.Gen.u16BaseLow)
Note:
See TracChangeset
for help on using the changeset viewer.