Changeset 16021 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jan 19, 2009 12:34:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDM.cpp
r14072 r16021 976 976 for (PPDMDEVINS pDevIns = pVM->pdm.s.pDevInstances; pDevIns; pDevIns = pDevIns->Internal.s.pNextR3) 977 977 { 978 /* 979 * Some devices need to be notified first that the VM is suspended to ensure that that there are no pending 980 * requests from the guest which are still processed. Calling the drivers before these requests are finished 981 * might lead to errors otherwise. One example is the SATA controller which might still have I/O requests 982 * pending. But DrvVD sets the files into readonly mode and every request will fail then. 983 */ 984 if (pDevIns->pDevReg->pfnSuspend && (pDevIns->pDevReg->fFlags & PDM_DEVREG_FLAGS_FIRST_SUSPEND_NOTIFICATION)) 985 { 986 LogFlow(("PDMR3Suspend: Notifying - device '%s'/%d\n", 987 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance)); 988 pDevIns->pDevReg->pfnSuspend(pDevIns); 989 } 990 978 991 for (PPDMLUN pLun = pDevIns->Internal.s.pLunsR3; pLun; pLun = pLun->pNext) 979 992 for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown) … … 985 998 } 986 999 987 if (pDevIns->pDevReg->pfnSuspend) 1000 /* Don't call the suspend notification again if it was already called. */ 1001 if (pDevIns->pDevReg->pfnSuspend && !(pDevIns->pDevReg->fFlags & PDM_DEVREG_FLAGS_FIRST_SUSPEND_NOTIFICATION)) 988 1002 { 989 1003 LogFlow(("PDMR3Suspend: Notifying - device '%s'/%d\n", … … 1102 1116 for (PPDMDEVINS pDevIns = pVM->pdm.s.pDevInstances; pDevIns; pDevIns = pDevIns->Internal.s.pNextR3) 1103 1117 { 1118 1119 if (pDevIns->pDevReg->pfnPowerOff && (pDevIns->pDevReg->fFlags & PDM_DEVREG_FLAGS_FIRST_POWEROFF_NOTIFICATION)) 1120 { 1121 LogFlow(("PDMR3PowerOff: Notifying - device '%s'/%d\n", 1122 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance)); 1123 pDevIns->pDevReg->pfnPowerOff(pDevIns); 1124 } 1125 1104 1126 for (PPDMLUN pLun = pDevIns->Internal.s.pLunsR3; pLun; pLun = pLun->pNext) 1105 1127 for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown) … … 1111 1133 } 1112 1134 1113 if (pDevIns->pDevReg->pfnPowerOff )1135 if (pDevIns->pDevReg->pfnPowerOff && !(pDevIns->pDevReg->fFlags & PDM_DEVREG_FLAGS_FIRST_POWEROFF_NOTIFICATION)) 1114 1136 { 1115 1137 LogFlow(("PDMR3PowerOff: Notifying - device '%s'/%d\n",
Note:
See TracChangeset
for help on using the changeset viewer.