diff --git a/nixos-modules/dhall/vbox-host.dhall b/nixos-modules/dhall/vbox-host.dhall index 1d76f97..a3039b2 100644 --- a/nixos-modules/dhall/vbox-host.dhall +++ b/nixos-modules/dhall/vbox-host.dhall @@ -265,7 +265,10 @@ let rootInit = ] } , provides = [ "Nitpicker" ] - , resources = Resources::{ ram = Genode.units.MiB 32 } + , resources = Resources::{ + , caps = 256 + , ram = Genode.units.MiB 64 + } , routes = [ ServiceRoute.child "Framebuffer" "framebuffer" , ServiceRoute.child "Input" "input_filter" @@ -283,12 +286,7 @@ let rootInit = Child.Attributes::{ , binary = "nit_fb" , config = Init.Config::{ - , attributes = toMap - { origin = "top_right" - , xpos = "-600" - , width = "600" - , height = "-20" - } + , attributes = toMap { xpos = "600", width = "600" } } , provides = [ "Framebuffer", "Input" ] , resources = Resources::{ ram = Genode.units.MiB 8 } diff --git a/packages/genodelabs/vbox-debug.patch b/packages/genodelabs/vbox-debug.patch new file mode 100644 index 0000000..cd4e288 --- /dev/null +++ b/packages/genodelabs/vbox-debug.patch @@ -0,0 +1,169 @@ +commit a651105a412ec6f136faddfe7d27dabf8bc2354e +Author: Emery Hemingway +Date: Sat May 23 01:54:45 2020 +0530 + + virtualbox debugging + +diff --git a/repos/ports/src/virtualbox5/frontend/fb.h b/repos/ports/src/virtualbox5/frontend/fb.h +index bf2d65d7c1..ed7adfbe45 100644 +--- a/repos/ports/src/virtualbox5/frontend/fb.h ++++ b/repos/ports/src/virtualbox5/frontend/fb.h +@@ -1,3 +1,5 @@ ++#include ++ + /* + * \brief Virtualbox framebuffer implementation for Genode + * \author Alexander Boettcher +@@ -63,6 +65,7 @@ class Genodefb : + + void _adjust_buffer() + { ++ PDBG("request ", _fb_mode, " buffer from nitpicker"); + _nitpicker.buffer(Fb_Genode::Mode(_fb_mode.width(), _fb_mode.height(), + Fb_Genode::Mode::RGB565), false); + +@@ -73,10 +76,12 @@ class Genodefb : + + _nitpicker.enqueue(_view, rect); + _nitpicker.execute(); ++ PDBG("done"); + } + + Fb_Genode::Mode _initial_setup() + { ++ PDBG(); + typedef Nitpicker::Session::Command Command; + + _view = _nitpicker.create_view(); +@@ -86,6 +91,7 @@ class Genodefb : + _nitpicker.enqueue(_view, View_handle()); + _nitpicker.execute(); + ++ PDBG(_fb_mode); + return _fb_mode; + } + +@@ -98,6 +104,7 @@ class Genodefb : + { + int rc = RTCritSectInit(&_fb_lock); + Assert(rc == VINF_SUCCESS); ++ PDBG("VINF_SUCCESS"); + } + + int w() const { return _fb_mode.width(); } +diff --git a/repos/ports/src/virtualbox5/frontend/main.cc b/repos/ports/src/virtualbox5/frontend/main.cc +index ed4b249ac1..d1997005d3 100644 +--- a/repos/ports/src/virtualbox5/frontend/main.cc ++++ b/repos/ports/src/virtualbox5/frontend/main.cc +@@ -1,3 +1,5 @@ ++#include ++ + /* + * \brief Port of VirtualBox to Genode + * \author Norman Feske +@@ -117,19 +119,23 @@ HRESULT setupmachine(Genode::Env &env) + */ + genode_global_vbox_pointer = virtualbox; + ++ PDBG("initFromSettings"); + rc = machine->initFromSettings(virtualbox, vm_config, nullptr); + if (FAILED(rc)) + return rc; + ++ PDBG("genode_setup_machine"); + rc = genode_setup_machine(machine); + if (FAILED(rc)) + return rc; + ++ PDBG("RegisterMachine"); + rc = virtualbox->RegisterMachine(machine); + if (FAILED(rc)) + return rc; + + // open a session ++ PDBG("open a session"); + static ComObjPtr session; + rc = session.createObject(); + if (FAILED(rc)) +@@ -140,12 +146,14 @@ HRESULT setupmachine(Genode::Env &env) + return rc; + + /* Validate configured memory of vbox file and Genode config */ ++ PDBG("Validate configured memory of vbox file and Genode config"); + ULONG memory_vbox; + rc = machine->COMGETTER(MemorySize)(&memory_vbox); + if (FAILED(rc)) + return rc; + + /* Console object */ ++ PDBG("Console object"); + static ComPtr gConsole; + rc = session->COMGETTER(Console)(gConsole.asOutParam()); + +@@ -155,6 +163,7 @@ HRESULT setupmachine(Genode::Env &env) + genodeConsole->init_clipboard(); + + /* Display object */ ++ PDBG("Display object"); + static ComPtr display; + rc = gConsole->COMGETTER(Display)(display.asOutParam()); + if (FAILED(rc)) +@@ -176,12 +185,14 @@ HRESULT setupmachine(Genode::Env &env) + } + + /* Power up the VMM */ ++ PDBG("Power up the VMM"); + ComPtr progress; + rc = gConsole->PowerUp(progress.asOutParam()); + if (FAILED(rc)) + return rc; + + /* check whether enough memory is available for VM + VMM */ ++ PDBG("check whether enough memory is available for VM + VMM"); + ULONG const required_memory_vm = (13 * 1024 + 6 * memory_vbox) << 10; + rc = genode_check_memory_config(machine, required_memory_vm); + if (FAILED(rc)) +@@ -190,6 +201,7 @@ HRESULT setupmachine(Genode::Env &env) + /* wait until VM is up */ + MachineState_T machineState = MachineState_Null; + do { ++ PDBG("wait until VM is up"); + if (machineState != MachineState_Null) + RTThreadSleep(1000); + +@@ -199,6 +211,7 @@ HRESULT setupmachine(Genode::Env &env) + return E_FAIL; + + /* request mouse object */ ++ PDBG("request mouse object"); + static ComPtr gMouse; + rc = gConsole->COMGETTER(Mouse)(gMouse.asOutParam()); + if (FAILED(rc)) +@@ -206,6 +219,7 @@ HRESULT setupmachine(Genode::Env &env) + Assert (&*gMouse); + + /* request keyboard object */ ++ PDBG("request keyboard object"); + static ComPtr gKeyboard; + rc = gConsole->COMGETTER(Keyboard)(gKeyboard.asOutParam()); + if (FAILED(rc)) +@@ -215,6 +229,7 @@ HRESULT setupmachine(Genode::Env &env) + genodeConsole->init_backends(gKeyboard, gMouse); + + /* check whether enough memory for the fb is available */ ++ PDBG("check whether enough memory for the fb is available"); + ULONG required_memory_fb = 0; + for (unsigned uScreenId = 0; uScreenId < cMonitors; uScreenId++) + { +diff --git a/repos/ports/src/virtualbox5/network.cpp b/repos/ports/src/virtualbox5/network.cpp +index f743e64104..4a32348568 100644 +--- a/repos/ports/src/virtualbox5/network.cpp ++++ b/repos/ports/src/virtualbox5/network.cpp +@@ -519,6 +519,7 @@ static DECLCALLBACK(int) drvNicConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uin + * Setup Genode nic_session connection + */ + try { ++ Genode::log("initialize Nic session ", label); + pThis->nic_client = new (vmm_heap()) Nic_client(genode_env(), pThis, label); + } catch (...) { + return VERR_HOSTIF_INIT_FAILED;