Re: VirtualBox + VIMAGE

2011-03-17 Thread Bernhard Froehlich
On Wed, 2 Mar 2011 15:09:21 -0600, Brandon Gooch wrote: > On Wed, Mar 2, 2011 at 2:52 PM, Bernhard Froehlich wrote: >> On Wed, 02 Mar 2011 21:31:45 +0100, Bernhard Froehlich wrote: >>> On Wed, 2 Mar 2011 08:30:01 -0600, Brandon Gooch wrote: On Wed, Jan 26, 2011 at 5:19 PM, Bernhard Froehlich

Re: VirtualBox + VIMAGE

2011-03-17 Thread Mikolaj Golub
On Thu, 17 Mar 2011 15:01:17 +0100 Bernhard Froehlich wrote: BF> Thanks to everyone involved! I have committed it now to our blueports BF> repository and the patch will come together with the next major BF> VirtualBox update to 4.0.x. BF> http://svn.bluelife.at/index.cgi/blueports/revision/?

Re: VirtualBox + VIMAGE

2011-03-02 Thread Bernhard Froehlich
On Wed, 02 Mar 2011 21:31:45 +0100, Bernhard Froehlich wrote: > On Wed, 2 Mar 2011 08:30:01 -0600, Brandon Gooch wrote: >> On Wed, Jan 26, 2011 at 5:19 PM, Bernhard Froehlich >> wrote: >>> On Wed, 26 Jan 2011 16:25:28 +0200, Mikolaj Golub wrote: On Wed, 26 Jan 2011 10:22:40 +0100 Bernhard Fro

Re: VirtualBox + VIMAGE

2011-03-02 Thread Bernhard Froehlich
On Wed, 2 Mar 2011 08:30:01 -0600, Brandon Gooch wrote: > On Wed, Jan 26, 2011 at 5:19 PM, Bernhard Froehlich > wrote: >> On Wed, 26 Jan 2011 16:25:28 +0200, Mikolaj Golub wrote: >>> On Wed, 26 Jan 2011 10:22:40 +0100 Bernhard Froehlich wrote: >>> >>>  BF> Sounds like it's my turn now. Which FreeB

Re: VirtualBox + VIMAGE

2011-03-02 Thread Brandon Gooch
On Wed, Mar 2, 2011 at 2:52 PM, Bernhard Froehlich wrote: > On Wed, 02 Mar 2011 21:31:45 +0100, Bernhard Froehlich wrote: >> On Wed, 2 Mar 2011 08:30:01 -0600, Brandon Gooch wrote: >>> On Wed, Jan 26, 2011 at 5:19 PM, Bernhard Froehlich >>> wrote: On Wed, 26 Jan 2011 16:25:28 +0200, Mikolaj

Re: VirtualBox + VIMAGE

2011-03-02 Thread Brandon Gooch
On Wed, Jan 26, 2011 at 5:19 PM, Bernhard Froehlich wrote: > On Wed, 26 Jan 2011 16:25:28 +0200, Mikolaj Golub wrote: >> On Wed, 26 Jan 2011 10:22:40 +0100 Bernhard Froehlich wrote: >> >>  BF> Sounds like it's my turn now. Which FreeBSD version is required to be >>  BF> able to use it? >> >> As Bj

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-03 Thread Adrian Penisoara
Hi, Since we're going to see VIMAGE (partly) committed into HEAD anytime now, perhaps it would be a good time to make available some clear developer documentation on how to cope with VIMAGE in the kernel (at kernel build time or building a module separately). 3rd party driver vendors will be mos

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-03 Thread Bjoern A. Zeeb
On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: On Thu, Feb 3, 2011 at 12:18 PM, Bjoern A. Zeeb wrote: On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: On Thu, Feb 3, 2011 at 11:59 AM, Bjoern A. Zeeb wrote: On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: I don't understand why you saw a CRE

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-03 Thread Julian Elischer
On 2/3/11 2:59 AM, Bjoern A. Zeeb wrote: On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: I don't understand why you saw a CRED_TO_VNET of 0 I was under the impression that every process/thread in the system would be on vnet0 in a vimage kernel. This is how my printf looks like: struct thread

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-03 Thread Monthadar Al Jaberi
On Thu, Feb 3, 2011 at 12:18 PM, Bjoern A. Zeeb wrote: > On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: > >> On Thu, Feb 3, 2011 at 11:59 AM, Bjoern A. Zeeb >> wrote: >>> >>> On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: >>> >>> I don't understand why you saw a CRED_TO_VNET of 0 >>> I wa

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-03 Thread Bjoern A. Zeeb
On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: On Thu, Feb 3, 2011 at 11:59 AM, Bjoern A. Zeeb wrote: On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: I don't understand why you saw a CRED_TO_VNET of 0 I was under the impression that every process/thread in the system would be on vnet0 in a vi

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-03 Thread Monthadar Al Jaberi
On Thu, Feb 3, 2011 at 11:59 AM, Bjoern A. Zeeb wrote: > On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: > > I don't understand why you saw a CRED_TO_VNET of 0 > I was under the impression that every process/thread in the system > would > be > on vnet0 > in a vimage kernel.

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-03 Thread Bjoern A. Zeeb
On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: I don't understand why you saw a CRED_TO_VNET of 0 I was under the impression that every process/thread in the system would be on vnet0 in a vimage kernel. This is how my printf looks like: struct thread *td = curthread; struct vnet *v = TD_TO_VNE

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-03 Thread Monthadar Al Jaberi
On Thu, Feb 3, 2011 at 10:55 AM, Bjoern A. Zeeb wrote: > On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: > >> On Wed, Feb 2, 2011 at 8:06 PM, Julian Elischer >> wrote: >>> >>> On 2/2/11 10:05 AM, Monthadar Al Jaberi wrote: I just tried something that seems to work, but please dont hit me

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-03 Thread Bjoern A. Zeeb
On Thu, 3 Feb 2011, Monthadar Al Jaberi wrote: On Wed, Feb 2, 2011 at 8:06 PM, Julian Elischer wrote: On 2/2/11 10:05 AM, Monthadar Al Jaberi wrote: I just tried something that seems to work, but please dont hit me ^^;;; in wtap_ioctl I assigned curthread->td_vnet myself to point to a VNET

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-03 Thread Monthadar Al Jaberi
On Wed, Feb 2, 2011 at 8:06 PM, Julian Elischer wrote: > On 2/2/11 10:05 AM, Monthadar Al Jaberi wrote: >> >> I just tried something that seems to work, but please dont hit me ^^;;; >> >> in wtap_ioctl I assigned curthread->td_vnet myself to point to a VNET >> (saved it when the module first loade

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-02 Thread Julian Elischer
On 2/2/11 10:05 AM, Monthadar Al Jaberi wrote: I just tried something that seems to work, but please dont hit me ^^;;; in wtap_ioctl I assigned curthread->td_vnet myself to point to a VNET (saved it when the module first loaded) (I have not created any jails yet)... and it works... I didnt put a

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-02 Thread Monthadar Al Jaberi
I just tried something that seems to work, but please dont hit me ^^;;; in wtap_ioctl I assigned curthread->td_vnet myself to point to a VNET (saved it when the module first loaded) (I have not created any jails yet)... and it works... I didnt put any CURVNET macros... my assumption is that if at

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-02 Thread Julian Elischer
On 2/2/11 9:12 AM, Bjoern A. Zeeb wrote: On Wed, 2 Feb 2011, Monthadar Al Jaberi wrote: Hi, Thanx makes more sense, but I have noticed something weired if you can shade some light on. I added printfs one when the module is first loaded (static int event_handler(module_t module, int event, voi

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-02 Thread Bjoern A. Zeeb
On Wed, 2 Feb 2011, Monthadar Al Jaberi wrote: Hi, Thanx makes more sense, but I have noticed something weired if you can shade some light on. I added printfs one when the module is first loaded (static int event_handler(module_t module, int event, void *arg)): curthread=0xc3f95870 curthread->

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-02 Thread Julian Elischer
On 2/2/11 8:42 AM, Julian Elischer wrote: On 2/2/11 7:06 AM, Monthadar Al Jaberi wrote: Thanx makes more sense, but I have noticed something weired if you can shade some light on. I added printfs one when the module is first loaded (static int event_handler(module_t module, int event, void *arg

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-02 Thread Julian Elischer
On 2/2/11 7:06 AM, Monthadar Al Jaberi wrote: Thanx makes more sense, but I have noticed something weired if you can shade some light on. I added printfs one when the module is first loaded (static int event_handler(module_t module, int event, void *arg)): curthread=0xc3f95870 curthread->td_vnet

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-02 Thread Monthadar Al Jaberi
Thanx makes more sense, but I have noticed something weired if you can shade some light on. I added printfs one when the module is first loaded (static int event_handler(module_t module, int event, void *arg)): curthread=0xc3f95870 curthread->td_vnet=0xc3170e00 curthread->td_ucred=0xc3185d00 TD_TO

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-01 Thread Julian Elischer
ok here's how it works.. any place you access a V_xxx variable you need to have the current vnet set. so somewhere in your code path to get to that point you have to have done CURVNET_SET() and after you have finised on the way out you should do CURVNET_RESTORE(). you can get the vnet from sev

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-01 Thread Julian Elischer
On 2/1/11 11:04 AM, Monthadar Al Jaberi wrote: On Tue, Feb 1, 2011 at 6:25 PM, Julian Elischer wrote: On 2/1/11 8:40 AM, Monthadar Al Jaberi wrote: Hi, I hope I am on the write place, second try... I have written a module that loads fake wifi devices (wtap?) and distributes packets between t

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-01 Thread Monthadar Al Jaberi
On Tue, Feb 1, 2011 at 6:25 PM, Julian Elischer wrote: > On 2/1/11 8:40 AM, Monthadar Al Jaberi wrote: >> >> Hi, >> >> I hope I am on the write place, second try... >> >> I have written a module that loads fake wifi devices (wtap?) and >> distributes packets between them. For now I use route comma

Re: simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-01 Thread Julian Elischer
On 2/1/11 8:40 AM, Monthadar Al Jaberi wrote: Hi, I hope I am on the write place, second try... I have written a module that loads fake wifi devices (wtap?) and distributes packets between them. For now I use route command to route packets between them from upper layers (TCP,...). I want to tak

simulating wireless device (if_alloc panic, VirtualBox, VIMAGE)

2011-02-01 Thread Monthadar Al Jaberi
Hi, I hope I am on the write place, second try... I have written a module that loads fake wifi devices (wtap?) and distributes packets between them. For now I use route command to route packets between them from upper layers (TCP,...). I want to take it to next step and create jails with VNET. I

Re: VirtualBox + VIMAGE

2011-01-27 Thread Mikolaj Golub
On Thu, 27 Jan 2011 00:19:57 +0100 Bernhard Froehlich wrote: BF> http://home.bluelife.at/patches/virtualbox-ose-kmod-devel-VIMAGE.diff BF> I've integrated it a bit better into the VirtualBox build system, added BF> the ports stuff and updated the patch for VirtualBox 4.0.2. Thanks! BF> It

Re: VirtualBox + VIMAGE

2011-01-26 Thread Bernhard Froehlich
On Wed, 26 Jan 2011 16:25:28 +0200, Mikolaj Golub wrote: > On Wed, 26 Jan 2011 10:22:40 +0100 Bernhard Froehlich wrote: > > BF> Sounds like it's my turn now. Which FreeBSD version is required to be > BF> able to use it? > > As Bjoern noted it is for __FreeBSD_version >= 800500. > > BF> Is VIM

Re: VirtualBox + VIMAGE

2011-01-26 Thread Bjoern A. Zeeb
On Wed, 26 Jan 2011, Mikolaj Golub wrote: On Wed, 26 Jan 2011 14:18:03 + (UTC) Bjoern A. Zeeb wrote: BAZ> On Wed, 26 Jan 2011, Mikolaj Golub wrote: >> >> On Wed, 26 Jan 2011 09:15:46 + (UTC) Bjoern A. Zeeb wrote: >> >> BAZ> I think you should wrap the CURVNET changes in __FreeBSD_vers

Re: VirtualBox + VIMAGE

2011-01-26 Thread Mikolaj Golub
On Wed, 26 Jan 2011 14:18:03 + (UTC) Bjoern A. Zeeb wrote: BAZ> On Wed, 26 Jan 2011, Mikolaj Golub wrote: >> >> On Wed, 26 Jan 2011 09:15:46 + (UTC) Bjoern A. Zeeb wrote: >> >> BAZ> I think you should wrap the CURVNET changes in __FreeBSD_version >> BAZ> checks so that the port, sh

Re: VirtualBox + VIMAGE

2011-01-26 Thread Bjoern A. Zeeb
On Wed, 26 Jan 2011, Brandon Gooch wrote: On Wed, Jan 26, 2011 at 8:25 AM, Mikolaj Golub wrote: [SNIP] I suppose we should have an option in ports, something: .if ${OSVERSION} < 800500 OPTIONS+=        VIMAGE "Build for VIMAGE kernel" off .endif and if it is on set VIMAGE make environment

Re: VirtualBox + VIMAGE

2011-01-26 Thread Brandon Gooch
On Wed, Jan 26, 2011 at 8:25 AM, Mikolaj Golub wrote: [SNIP] > I suppose we should have an option in ports, something: > > .if ${OSVERSION} < 800500 > OPTIONS+=        VIMAGE "Build for VIMAGE kernel" off > .endif > > and if it is on set VIMAGE make environment variable. Or may be you have > a b

Re: VirtualBox + VIMAGE

2011-01-26 Thread Mikolaj Golub
On Wed, 26 Jan 2011 10:22:40 +0100 Bernhard Froehlich wrote: BF> Sounds like it's my turn now. Which FreeBSD version is required to be BF> able to use it? As Bjoern noted it is for __FreeBSD_version >= 800500. BF> Is VIMAGE enabled per default and what happens if VIMAGE is disabled - BF> do

Re: VirtualBox + VIMAGE

2011-01-26 Thread Bjoern A. Zeeb
On Wed, 26 Jan 2011, Mikolaj Golub wrote: On Wed, 26 Jan 2011 09:15:46 + (UTC) Bjoern A. Zeeb wrote: BAZ> I think you should wrap the CURVNET changes in __FreeBSD_version BAZ> checks so that the port, should it run elsewhere or on older FreeBSDs BAZ> (if it runs there) not trouble people h

Re: VirtualBox + VIMAGE

2011-01-26 Thread Mikolaj Golub
On Wed, 26 Jan 2011 09:15:46 + (UTC) Bjoern A. Zeeb wrote: BAZ> I think you should wrap the CURVNET changes in __FreeBSD_version BAZ> checks so that the port, should it run elsewhere or on older FreeBSDs BAZ> (if it runs there) not trouble people having to patch it away. BAZ> #if defined

Re: VirtualBox + VIMAGE

2011-01-26 Thread Bernhard Froehlich
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" >> fu

Re: VirtualBox + VIMAGE

2011-01-26 Thread Bjoern A. Zeeb
On Tue, 25 Jan 2011, 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 vn

Re: VirtualBox + VIMAGE

2011-01-26 Thread Fredrik Lindberg
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

Re: VirtualBox + VIMAGE

2011-01-25 Thread Julian Elischer
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 defa

Re: VirtualBox + VIMAGE

2011-01-25 Thread Mikolaj Golub
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

Re: VirtualBox + VIMAGE

2011-01-24 Thread Julian Elischer
On 1/23/11 6:33 AM, Mikolaj Golub wrote: Hi, Sorry for cross posting, but this question concerns both VirtualBox and VIMAGE :-). I would like to be able to run VirtualBox on my desktop, with kernel compilled with VIMAGE, so I would use light vnet jails for FreeBSD VMs and VirtualBox for other

VirtualBox + VIMAGE

2011-01-23 Thread Mikolaj Golub
Hi, Sorry for cross posting, but this question concerns both VirtualBox and VIMAGE :-). I would like to be able to run VirtualBox on my desktop, with kernel compilled with VIMAGE, so I would use light vnet jails for FreeBSD VMs and VirtualBox for other OSes. Currently the system will crash if y