Subject: Re: [vserver] Device drivers
From: Siv <punumaa@gmail.com>
Date: Tue, 29 Jun 2010 16:01:13 -0700
Tue, 29 Jun 2010 16:01:13 -0700
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 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 ?

--Siv--

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



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 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 ?

--Siv--

best,
Herbert

> --Siv--