From owner-freebsd-emulation@FreeBSD.ORG Wed Jan 26 09:37:48 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86AB41065787; Wed, 26 Jan 2011 09:37:48 +0000 (UTC) (envelope-from decke@FreeBSD.org) Received: from groupware.itac.at (groupware.itac.at [91.205.172.99]) by mx1.freebsd.org (Postfix) with ESMTP id E52FB8FC1F; Wed, 26 Jan 2011 09:37:46 +0000 (UTC) Received: from home.bluelife.at (93.104.210.95) by groupware.itac.at (Axigen) with (AES256-SHA encrypted) ESMTPSA id 2FD27A; Wed, 26 Jan 2011 10:24:42 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Date: Wed, 26 Jan 2011 10:22:40 +0100 From: Bernhard Froehlich To: Julian Elischer In-Reply-To: <4D3F8357.2070005@freebsd.org> References: <86oc77heqk.fsf@kopusha.home.net> <4D3D2DE9.2060004@freebsd.org> <86tygwy9p0.fsf@kopusha.home.net> <4D3F8357.2070005@freebsd.org> Message-ID: <62fcd16074e526547c3417a8f259174e@bluelife.at> X-Sender: decke@FreeBSD.org User-Agent: Roundcube Webmail/0.5-rc X-AxigenSpam-Level: 1 X-CTCH-RefID: str=0001.0A0B0205.4D3FE7DF.02A9,ss=1,fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Cc: freebsd-emulation@freebsd.org, freebsd-virtualization@freebsd.org Subject: Re: VirtualBox + VIMAGE X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2011 09:37:48 -0000 On Tue, 25 Jan 2011 18:13:43 -0800, Julian Elischer wrote: > On 1/25/11 1:06 PM, Mikolaj Golub wrote: >> On Sun, 23 Jan 2011 23:44:41 -0800 Julian Elischer wrote: >> >> JE> On 1/23/11 6:33 AM, Mikolaj Golub wrote: >> >> >> As a quick fix I added in VBoxNetFlt-freebsd.c in all "problem" functions >> >> CURVNET_SET_QUIET(vnet0) macro, which sets td->td_vnet to default vnet (see the >> >> attached patch). This has fixed the issue for me and now I am happily running >> >> both VNET jails and VirtualBox machines on my desktop. >> >> >> >> But the way I fixed the issue looks hackish for me. Could someone suggest a >> >> better solution? >> JE> this is probably at east partially the correct solution. >> JE> Usually you should also set the value back to its previous value when >> JE> you leave that code as well. >> >> Thank you for the comments. Actually the patch contained CURVNET_RESTORE() >> too. I just did not mentioned it :-). So if it looks like right solution here >> is an "improved" version of the patch: vnet to switch is taken from thread's >> ucred (on interface initialization) or from ifp->if_vnet. > > yes I like it.. Now you just need a port person to patch the port :-) Sounds like it's my turn now. Which FreeBSD version is required to be able to use it? Is VIMAGE enabled per default and what happens if VIMAGE is disabled - does it at least build fine with that patch? For Mikolaj Golub to get this patch upstream we need that you either agree that his patch is under the MIT License or sign a Sun Contributors Agreement. Then we can submit that patch upstream or you can do it yourself if you prefer. Read here: http://www.virtualbox.org/wiki/Contributor_information -- Bernhard Froehlich http://www.bluelife.at/