Changeset 20722 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jun 19, 2009 12:34:21 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48835
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r20569 r20722 1273 1273 VMMDECL(int) IOMMMIOPhysHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pCtxCore, RTGCPHYS GCPhysFault) 1274 1274 { 1275 return iomMMIOHandler(pVM, uErrorCode, pCtxCore, GCPhysFault, iomMMIOGetRange(&pVM->iom.s, GCPhysFault)); 1275 int rc; 1276 rc = iomLock(pVM); 1277 #ifndef IN_RING3 1278 if (rc == VERR_SEM_BUSY) 1279 return (uErrorCode & X86_TRAP_PF_RW) ? VINF_IOM_HC_MMIO_WRITE : VINF_IOM_HC_MMIO_READ; 1280 #endif 1281 rc = iomMMIOHandler(pVM, uErrorCode, pCtxCore, GCPhysFault, iomMMIOGetRange(&pVM->iom.s, GCPhysFault)); 1282 iomUnlock(pVM); 1283 return rc; 1276 1284 } 1277 1285 … … 1865 1873 VMMDECL(int) IOMMMIOMapMMIO2Page(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysRemapped, uint64_t fPageFlags) 1866 1874 { 1875 /* Currently only called from the VGA device during MMIO. */ 1876 Assert(IOMIsLockOwner(pVM)); 1867 1877 Log(("IOMMMIOMapMMIO2Page %RGp -> %RGp flags=%RX64\n", GCPhys, GCPhysRemapped, fPageFlags)); 1868 1878 … … 1882 1892 PIOMMMIORANGE pRange = iomMMIOGetRange(&pVM->iom.s, GCPhys); 1883 1893 AssertMsgReturn(pRange, 1884 ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys),1885 VERR_IOM_MMIO_RANGE_NOT_FOUND); 1894 ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND); 1895 1886 1896 Assert((pRange->GCPhys & PAGE_OFFSET_MASK) == 0); 1887 1897 Assert((pRange->Core.KeyLast & PAGE_OFFSET_MASK) == PAGE_OFFSET_MASK); … … 1930 1940 VMMDECL(int) IOMMMIOMapMMIOHCPage(PVM pVM, RTGCPHYS GCPhys, RTHCPHYS HCPhys, uint64_t fPageFlags) 1931 1941 { 1942 /* Currently only called from VT-x code during a page fault. */ 1932 1943 Log(("IOMMMIOMapMMIOHCPage %RGp -> %RGp flags=%RX64\n", GCPhys, HCPhys, fPageFlags)); 1933 1944 … … 1940 1951 * Lookup the context range node the page belongs to. 1941 1952 */ 1942 PIOMMMIORANGE pRange = iomMMIOGetRange(&pVM->iom.s, GCPhys); 1953 #ifdef VBOX_STRICT 1954 /* Can't lock IOM here due to potential deadlocks in the VGA device; not safe to access. */ 1955 PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(&pVM->iom.s, GCPhys); 1943 1956 AssertMsgReturn(pRange, 1944 ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), 1945 VERR_IOM_MMIO_RANGE_NOT_FOUND); 1957 ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND); 1946 1958 Assert((pRange->GCPhys & PAGE_OFFSET_MASK) == 0); 1947 1959 Assert((pRange->Core.KeyLast & PAGE_OFFSET_MASK) == PAGE_OFFSET_MASK); 1960 #endif 1948 1961 1949 1962 /* … … 1953 1966 HCPhys &= ~(RTHCPHYS)PAGE_OFFSET_MASK; 1954 1967 1955 int rc = PGMHandlerPhysicalPageAliasHC(pVM, pRange->GCPhys, GCPhys, HCPhys);1968 int rc = PGMHandlerPhysicalPageAliasHC(pVM, GCPhys, GCPhys, HCPhys); 1956 1969 AssertRCReturn(rc, rc); 1957 1970 … … 1990 2003 * Lookup the context range node the page belongs to. 1991 2004 */ 1992 PIOMMMIORANGE pRange = iomMMIOGetRange(&pVM->iom.s, GCPhys); 2005 #ifdef VBOX_STRICT 2006 /* Can't lock IOM here due to potential deadlocks in the VGA device; not safe to access. */ 2007 PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(&pVM->iom.s, GCPhys); 1993 2008 AssertMsgReturn(pRange, 1994 ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), 1995 VERR_IOM_MMIO_RANGE_NOT_FOUND); 2009 ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND); 2010 Assert((pRange->GCPhys & PAGE_OFFSET_MASK) == 0); 2011 Assert((pRange->Core.KeyLast & PAGE_OFFSET_MASK) == PAGE_OFFSET_MASK); 2012 #endif 1996 2013 1997 2014 /* … … 2001 2018 * a page pool flush pending (unlikely). 2002 2019 */ 2003 int rc = PGMHandlerPhysicalReset(pVM, pRange->GCPhys);2020 int rc = PGMHandlerPhysicalReset(pVM, GCPhys); 2004 2021 AssertRC(rc); 2005 2022
Note:
See TracChangeset
for help on using the changeset viewer.