Changeset 9760 in vbox
- Timestamp:
- Jun 17, 2008 12:09:03 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 32117
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CPUM.cpp
r9661 r9760 1799 1799 /** Whether the PageMapLock is valid or not. */ 1800 1800 bool fLocked; 1801 /** 64 bits mode or not. */ 1802 bool f64Bits; 1801 1803 } CPUMDISASSTATE, *PCPUMDISASSTATE; 1802 1804 … … 1852 1854 1853 1855 /* check the segemnt limit */ 1854 if ( PtrSrc > pState->cbSegLimit)1856 if (!pState->f64Bits && PtrSrc > pState->cbSegLimit) 1855 1857 return VERR_OUT_OF_SELECTOR_BOUNDS; 1856 1858 1857 1859 /* calc how much we can read */ 1858 1860 uint32_t cb = PAGE_SIZE - (GCPtr & PAGE_OFFSET_MASK); 1859 RTGCUINTPTR cbSeg = pState->GCPtrSegEnd - GCPtr; 1860 if (cb > cbSeg && !cbSeg) 1861 cb = cbSeg; 1861 if (!pState->f64Bits) 1862 { 1863 RTGCUINTPTR cbSeg = pState->GCPtrSegEnd - GCPtr; 1864 if (cb > cbSeg && cbSeg) 1865 cb = cbSeg; 1866 } 1862 1867 if (cb > cbRead) 1863 1868 cb = cbRead; … … 1890 1895 int rc; 1891 1896 1897 const PGMMODE enmMode = PGMGetGuestMode(pVM); 1892 1898 State.pCpu = pCpu; 1893 1899 State.pvPageGC = 0; … … 1895 1901 State.pVM = pVM; 1896 1902 State.fLocked = false; 1903 State.f64Bits = false; 1897 1904 1898 1905 /* … … 1904 1911 if (CPUMAreHiddenSelRegsValid(pVM)) 1905 1912 { 1913 State.f64Bits = enmMode >= PGMMODE_AMD64 && pCtx->csHid.Attr.n.u1Long; 1906 1914 State.GCPtrSegBase = pCtx->csHid.u64Base; 1907 1915 State.GCPtrSegEnd = pCtx->csHid.u32Limit + 1 + (RTGCUINTPTR)pCtx->csHid.u64Base; 1908 1916 State.cbSegLimit = pCtx->csHid.u32Limit; 1909 pCpu->mode = pCtx->csHid.Attr.n.u1DefBig ? CPUMODE_32BIT : CPUMODE_16BIT; 1917 pCpu->mode = (State.f64Bits) 1918 ? CPUMODE_64BIT 1919 : pCtx->csHid.Attr.n.u1DefBig 1920 ? CPUMODE_32BIT 1921 : CPUMODE_16BIT; 1910 1922 } 1911 1923 else
Note:
See TracChangeset
for help on using the changeset viewer.