From owner-freebsd-emulation@FreeBSD.ORG Wed Jan 26 09:04:02 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 CBB2D1065674; Wed, 26 Jan 2011 09:04:02 +0000 (UTC) (envelope-from fli@shapeshifter.se) Received: from mx1.h3q.net (mx1.h3q.net [IPv6:2001:16d8:ffe5:1::f1]) by mx1.freebsd.org (Postfix) with ESMTP id 8C24C8FC0A; Wed, 26 Jan 2011 09:04:02 +0000 (UTC) Received: from smtp-auth.h3q.net (smtp-auth.h3q.net [127.0.0.1]) (Authenticated sender: hidden) by mx1.h3q.net (Postfix) with ESMTPSA id D36F533C57 ; Wed, 26 Jan 2011 10:04:00 +0100 (CET) Message-ID: <4D3FE380.2020304@shapeshifter.se> Date: Wed, 26 Jan 2011 10:04:00 +0100 From: Fredrik Lindberg User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Mikolaj Golub References: <86oc77heqk.fsf@kopusha.home.net> <4D3D2DE9.2060004@freebsd.org> <86tygwy9p0.fsf@kopusha.home.net> <4D3F8357.2070005@freebsd.org> In-Reply-To: <4D3F8357.2070005@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org, Julian Elischer , 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:04:02 -0000 On 01/26/2011 03:13 AM, 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 :-) > You should make sure it gets merged with the upstream source too. Fredrik