From 671e36bc45b0dd353d49851aa3a7665748cc99d0 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 17 Jun 2014 21:34:42 +0200 Subject: [PATCH] vbox: disable ioapic support by default and add xml configuration option to switch it on if required. Avoids trouble on Windows 7 guest where IRQ injected by VMMDev PCI device is not delivered. If ioapic is required and Windows guest addition "hangs", look in file DevPCI.cpp, function pciSetIrqInternal, variable fIsApicEnabled. If config[0xde] == 0xbe config[0xad] == 0xef it works. "Deadbeaf" seems to/should be set in ACPI file vbox.dsl. Happens for unknown reason not on Genode/Nova. Fixes #1188 --- repos/ports/ports/virtualbox.hash | 2 +- repos/ports/run/virtualbox.run | 1 + repos/ports/src/virtualbox/hgcm_sync.patch | 34 ---------------------- repos/ports/src/virtualbox/main.cc | 7 ++++- 4 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 repos/ports/src/virtualbox/hgcm_sync.patch diff --git a/repos/ports/ports/virtualbox.hash b/repos/ports/ports/virtualbox.hash index 8604adbb4d..4c78bf933e 100644 --- a/repos/ports/ports/virtualbox.hash +++ b/repos/ports/ports/virtualbox.hash @@ -1 +1 @@ -13aca05c49d35f7ce7a2cfd25d2751d9d6de9019 +8c27e2319a0ff50a02d4555148eccc829f77b4fc diff --git a/repos/ports/run/virtualbox.run b/repos/ports/run/virtualbox.run index b345fadb41..482a3e1a92 100644 --- a/repos/ports/run/virtualbox.run +++ b/repos/ports/run/virtualbox.run @@ -90,6 +90,7 @@ append config { + diff --git a/repos/ports/src/virtualbox/hgcm_sync.patch b/repos/ports/src/virtualbox/hgcm_sync.patch deleted file mode 100644 index 49725aa513..0000000000 --- a/repos/ports/src/virtualbox/hgcm_sync.patch +++ /dev/null @@ -1,34 +0,0 @@ -+++ src/app/virtualbox/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp -@@ -39,6 +39,12 @@ - # define VBOXDD_HGCMCALL_COMPLETED_DONE(a,b,c,d) do { } while (0) - #endif - -+#include -+ -+ -+static Genode::Lock w4c(Genode::Lock::LOCKED); -+ -+ - typedef enum _VBOXHGCMCMDTYPE - { - VBOXHGCMCMDTYPE_LOADSTATE = 0, -@@ -1147,6 +1153,9 @@ int vmmdevHGCMCall (VMMDevState *pVMMDevState, VMMDevHGCMCall *pHGCMCall, uint32 - RTMemFree (pCmd); - } - -+ /* wait for completion */ -+ w4c.lock(); -+ - return rc; - } - -@@ -2382,6 +2391,9 @@ DECLCALLBACK(void) hgcmCompleted (PPDMIHGCMPORT pInterface, int32_t result, PVBO - int rc = VMR3ReqCallVoidNoWait(PDMDevHlpGetVM(pVMMDevState->pDevIns), VMCPUID_ANY, - (PFNRT)hgcmCompletedWorker, 3, pInterface, result, pCmd); - AssertRC(rc); -+ -+ /* signal completion */ -+ w4c.unlock(); - } - - /* @thread EMT */ diff --git a/repos/ports/src/virtualbox/main.cc b/repos/ports/src/virtualbox/main.cc index 72bce4603f..c034eeedd3 100644 --- a/repos/ports/src/virtualbox/main.cc +++ b/repos/ports/src/virtualbox/main.cc @@ -202,11 +202,16 @@ int main() } args.add(c_file); - args.add("-ioapic"); if (bOverlay) args.add("-overlay"); + /* ioapic support */ + try { + Genode::Xml_node node = Genode::config()->xml_node().sub_node("ioapic"); + args.add("-ioapic"); + } catch (...) { } + /* shared folder setup */ unsigned shares = 0; try {