Date: Sat, 10 Mar 2012 09:50:28 -0600 From: Brandon Gooch <jamesbrandongooch@gmail.com> To: Bernhard Froehlich <decke@freebsd.org> Cc: freebsd-emulation@freebsd.org Subject: Re: [PATCH] VirtualBox 4.1.8 kmod panic with VIMAGE kernel Message-ID: <CALBk6yJB4RrRSPycOzjx_cWdg5-6byyd2tbGt%2BgObcn_VZg9Jw@mail.gmail.com> In-Reply-To: <9e02ac1bc0f7a8043f28ced31e319a20@bluelife.at> References: <CALBk6yK7=59ZMZ%2BbEurqP_9tDT2OAu4a653N8s2FKKrUTp8L6Q@mail.gmail.com> <9e02ac1bc0f7a8043f28ced31e319a20@bluelife.at>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 10, 2012 at 3:00 AM, Bernhard Froehlich <decke@freebsd.org> wro= te: > On 10.03.2012 05:42, Brandon Gooch wrote: >> >> It's my guess that not many people are running VirtualBox on a >> VIMAGE-enabled kernel. =A0However, for those of us who do (just me?), >> the attached patch is required to prevent a panic when running >> VirtualBox in such an environment. The patch belongs to the >> emulators/virtualbox-ose-kmod port. >> >> --- src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c.orig =A0 2011-12-19 >> 07:01:06.000000000 -0600 >> +++ src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c =A0 =A0 =A0 =A02011-12-= 26 >> 14:54:27.000000000 -0600 >> @@ -1189,6 +1189,7 @@ >> =A0int =A0vboxNetAdpInit(void) >> =A0{ >> =A0 =A0 unsigned i; >> + =A0 =A0PVBOXNETADP pVboxnet0; >> =A0 =A0 /* >> =A0 =A0 =A0* Init common members and call OS-specific init. >> =A0 =A0 =A0*/ >> @@ -1201,7 +1202,8 @@ >> =A0 =A0 =A0 =A0 vboxNetAdpOsInit(&g_aAdapters[i]); >> =A0 =A0 } >> >> - =A0 =A0return VINF_SUCCESS; >> + =A0 =A0/* Create vboxnet0 */ >> + =A0 =A0return vboxNetAdpCreate(&pVboxnet0, NULL); >> =A0} >> >> =A0/** >> >> If there is a more appropriate fix, please help me find it, otherwise, >> it would be great to have this committed! > > > Sorry, that I haven't committed the patch until now. Do you agree that > this patch is licensed under MIT License so I can send it upstream? Yes, absolutely. Do with it as you please... What I found when tracking this down led to this commit: https://www.virtualbox.org/changeset/35785/vbox https://www.virtualbox.org/browser/vbox/trunk/src/VBox/HostDrivers/VBoxNetA= dp/VBoxNetAdp.c?rev=3D35785 I'm not sure how the initial VBox network adapter is supposed to be created; maybe it should be deferred to the OS-specific init process (in VBoxNetAdp-freebsd.c)? Trouble is, not sure how to do that exactly, but anyway it seems more like a bug that was introduced. Attempting to push this upstream will reveal something I imagine :) > Current VIMAGE support is only for vboxnetflt and you are touching > vboxnetadp so that is probably why nobody used it before. Have you > tested it with a non VIMAGE kernel? I tested it with GENERIC, a custom kernel WITHOUT VIMAGE, and a custom kernel WITH VIMAGE. I tested on 9-STABLE (from this month) and now 10-CURRENT. > -- > Bernhard Froehlich > http://www.bluelife.at/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALBk6yJB4RrRSPycOzjx_cWdg5-6byyd2tbGt%2BgObcn_VZg9Jw>