Subject: Re: [vserver] Device drivers
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Wed, 30 Jun 2010 12:25:44 +0200

On Tue, Jun 29, 2010 at 04:01:13PM -0700, Siv wrote:
> On Mon, Jun 28, 2010 at 5:18 PM, Herbert Poetzl <herbert@13thfloor.at>wrote:
> > On Mon, Jun 28, 2010 at 10:12:07AM -0700, Siv wrote:
> > > Hi,

> > > I have been looking at http://linux-vserver.org/USB_Devices to
> > > access usb device from my guest (I can't get it to work yet,
> > > but that calls for a separate discussion).

> > > My question is - while I have steps for USB, what about other
> > > devices (say scsi drives or SD/pcmcia cards) ?

> > basically it all boils down to the right set of
> > permissions and the proper device nodes inside
> > the guest

> > > Do they need some special handling to be visible under guest ?

> > there might be certain devices or drivers which
> > require more than the usual set of capabilities

> > > Also, I may need to add user space device drivers in future
> > > and can I do it from the guest (and host would not see it) ?

> > user space device drivers sound interesting for
> > a linux kernel, but as long as the required
> > kernel interface is available inside the guest,
> > I don't see a problem with them ...

> > > I hope so but wanted to confirm.

> > give it a try and let us know :)

> Sure, will let you know when I try :) 
> With the usual kernel space driver, say I open /dev/driver 
	make that 'device' or 'device node'	~~~~~~~~~~~~
> from host and guest, my driver needs to restrict/limit 
> accesses based on the requestor (basically host requests 
> will have more privileges). 

> Can kernel can distinguish requests from host and the
> guest ?

yes, the kernel knows (vx_check(), vx_task_xid(current))

best,
Herbert

> --Siv--
> 
> >
> > best,
> > Herbert
> >
> > > --Siv--
> >