From 22ac5f2ffa12fc726b0638a0374d5f2ccf06f837 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 23 May 2020 14:56:53 +0530 Subject: [PATCH] vbox debugging --- packages/genodelabs/vbox-debug.patch | 32 ++++++++++++++++++---------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/packages/genodelabs/vbox-debug.patch b/packages/genodelabs/vbox-debug.patch index 705c773..69eb920 100644 --- a/packages/genodelabs/vbox-debug.patch +++ b/packages/genodelabs/vbox-debug.patch @@ -1,4 +1,4 @@ -commit 38f6a1371da1b63fba5540e2332d627ea6037b75 +commit 3fac0bab167664f7097dd09a5124f107336dd843 Author: Emery Hemingway Date: Sat May 23 01:54:45 2020 +0530 @@ -52,7 +52,7 @@ index bf2d65d7c1..ed7adfbe45 100644 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 +index ed4b249ac1..d6e6292023 100644 --- a/repos/ports/src/virtualbox5/frontend/main.cc +++ b/repos/ports/src/virtualbox5/frontend/main.cc @@ -1,3 +1,5 @@ @@ -61,7 +61,7 @@ index ed4b249ac1..d1997005d3 100644 /* * \brief Port of VirtualBox to Genode * \author Norman Feske -@@ -117,19 +119,23 @@ HRESULT setupmachine(Genode::Env &env) +@@ -117,35 +119,46 @@ HRESULT setupmachine(Genode::Env &env) */ genode_global_vbox_pointer = virtualbox; @@ -84,9 +84,19 @@ index ed4b249ac1..d1997005d3 100644 + PDBG("open a session"); static ComObjPtr session; rc = session.createObject(); - if (FAILED(rc)) -@@ -140,12 +146,14 @@ HRESULT setupmachine(Genode::Env &env) +- if (FAILED(rc)) ++ if (FAILED(rc)) { ++ Genode::error("session.createObject FAILED"); return rc; ++ } + ++ PDBG("LockMachine"); + rc = machine->LockMachine(session, LockType_VM); +- if (FAILED(rc)) ++ if (FAILED(rc)) { ++ Genode::error("machine->LockMachine FAILED"); + return rc; ++ } /* Validate configured memory of vbox file and Genode config */ + PDBG("Validate configured memory of vbox file and Genode config"); @@ -100,7 +110,7 @@ index ed4b249ac1..d1997005d3 100644 static ComPtr gConsole; rc = session->COMGETTER(Console)(gConsole.asOutParam()); -@@ -155,6 +163,7 @@ HRESULT setupmachine(Genode::Env &env) +@@ -155,6 +168,7 @@ HRESULT setupmachine(Genode::Env &env) genodeConsole->init_clipboard(); /* Display object */ @@ -108,7 +118,7 @@ index ed4b249ac1..d1997005d3 100644 static ComPtr display; rc = gConsole->COMGETTER(Display)(display.asOutParam()); if (FAILED(rc)) -@@ -176,12 +185,14 @@ HRESULT setupmachine(Genode::Env &env) +@@ -176,12 +190,14 @@ HRESULT setupmachine(Genode::Env &env) } /* Power up the VMM */ @@ -123,7 +133,7 @@ index ed4b249ac1..d1997005d3 100644 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) +@@ -190,6 +206,7 @@ HRESULT setupmachine(Genode::Env &env) /* wait until VM is up */ MachineState_T machineState = MachineState_Null; do { @@ -131,7 +141,7 @@ index ed4b249ac1..d1997005d3 100644 if (machineState != MachineState_Null) RTThreadSleep(1000); -@@ -199,6 +211,7 @@ HRESULT setupmachine(Genode::Env &env) +@@ -199,6 +216,7 @@ HRESULT setupmachine(Genode::Env &env) return E_FAIL; /* request mouse object */ @@ -139,7 +149,7 @@ index ed4b249ac1..d1997005d3 100644 static ComPtr gMouse; rc = gConsole->COMGETTER(Mouse)(gMouse.asOutParam()); if (FAILED(rc)) -@@ -206,6 +219,7 @@ HRESULT setupmachine(Genode::Env &env) +@@ -206,6 +224,7 @@ HRESULT setupmachine(Genode::Env &env) Assert (&*gMouse); /* request keyboard object */ @@ -147,7 +157,7 @@ index ed4b249ac1..d1997005d3 100644 static ComPtr gKeyboard; rc = gConsole->COMGETTER(Keyboard)(gKeyboard.asOutParam()); if (FAILED(rc)) -@@ -215,6 +229,7 @@ HRESULT setupmachine(Genode::Env &env) +@@ -215,6 +234,7 @@ HRESULT setupmachine(Genode::Env &env) genodeConsole->init_backends(gKeyboard, gMouse); /* check whether enough memory for the fb is available */