genode/repos/ports/src/virtualbox/vmmdev.patch

40 lines
1.0 KiB
Diff

+++ src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDev.cpp
@@ -770,6 +770,10 @@
("%u\n", pReq->header.size), VERR_INVALID_PARAMETER);
pReq->fEnabled = false;
+
+ if (!pThis || !pThis->pDrv || !pThis->pDrv->pfnIsPageFusionEnabled)
+ return VINF_SUCCESS;
+
int rc = pThis->pDrv->pfnIsPageFusionEnabled(pThis->pDrv, &pReq->fEnabled);
if (RT_FAILURE(rc))
pReq->fEnabled = false;
@@ -1854,7 +1858,6 @@
}
break;
}
-#endif /* VBOX_WITH_HGCM */
case VMMDevReq_HGCMCancel:
{
@@ -1899,6 +1902,7 @@
}
break;
}
+#endif /* VBOX_WITH_HGCM */
case VMMDevReq_VideoAccelEnable:
{
@@ -3341,8 +3345,10 @@
/* disabled statistics updating */
pThis->u32LastStatIntervalSize = 0;
+#ifdef VBOX_WITH_HGCM
/* Clear the "HGCM event enabled" flag so the event can be automatically reenabled. */
pThis->u32HGCMEnabled = 0;
+#endif
/*
* Clear the event variables.