- Timestamp:
- Mar 12, 2010 7:17:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevAPIC.cpp
r27305 r27341 2163 2163 } 2164 2164 2165 /** 2166 * This function is a hack, intended to minimize impact of not fully implemented power management support 2167 * on OSX guests. We do nothing smarter than make access to certain register (ISR status for LVT[6]) 2168 * rather long operation from the guest's perspective. 2169 * To be removed once real reasons why power saving states not reached by OSX will be figured out. 2170 * Hack seems to be safe, as guests rarely access this particular register. 2171 */ 2172 int checkHeavyRegistersPolling(APICDeviceInfo * pThis, RTGCPHYS GCPhysAddr) 2173 { 2174 int index = (GCPhysAddr >> 4) & 0xff; 2175 2176 /* We pick up rarely accessed IRR status register for this check */ 2177 if (index != 0x26) 2178 return VINF_SUCCESS; 2179 2180 #ifdef IN_RING3 2181 RTThreadSleep(10); 2182 return VINF_SUCCESS; 2183 #else 2184 return VINF_IOM_HC_MMIO_READ; 2185 #endif 2186 } 2187 2165 2188 #ifdef VBOX 2166 2189 static … … 2428 2451 #endif 2429 2452 #endif /* experimental */ 2453 int rc = checkHeavyRegistersPolling(dev, GCPhysAddr); 2454 if (rc != VINF_SUCCESS) 2455 return rc; 2430 2456 APIC_LOCK(dev, VINF_IOM_HC_MMIO_READ); 2431 2457 *(uint32_t *)pv = apic_mem_readl(dev, s, GCPhysAddr);
Note:
See TracChangeset
for help on using the changeset viewer.