On Sat, Mar 10, 2012 at 9:50 AM, Brandon Gooch <[email protected]> wrote: > On Sat, Mar 10, 2012 at 3:00 AM, Bernhard Froehlich <[email protected]> wrote: >> 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. However, 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 2011-12-19 >>> 07:01:06.000000000 -0600 >>> +++ src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c 2011-12-26 >>> 14:54:27.000000000 -0600 >>> @@ -1189,6 +1189,7 @@ >>> int vboxNetAdpInit(void) >>> { >>> unsigned i; >>> + PVBOXNETADP pVboxnet0; >>> /* >>> * Init common members and call OS-specific init. >>> */ >>> @@ -1201,7 +1202,8 @@ >>> vboxNetAdpOsInit(&g_aAdapters[i]); >>> } >>> >>> - return VINF_SUCCESS; >>> + /* Create vboxnet0 */ >>> + return vboxNetAdpCreate(&pVboxnet0, NULL); >>> } >>> >>> /** >>> >>> 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/VBoxNetAdp/VBoxNetAdp.c?rev=35785 > > 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/
Y'know, I think the real problem is that a VIMAGE-enabled kernel doesn't allow for the creation of new interfaces after boot. At least it was that way back in late 2010 when I was using a USB network device... So this is at BEST an attempt at a work-around, which I suspect will fail in any case more complicated than VirtualBox running in vnet0 with 1 network interface -- but I'm not totally sure I even understand the way the VBoxNetFlt and VBoxNetAdp drivers work! -Brandon _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "[email protected]"
