Manuel Bouyer | 2 Sep 2010 17:40

Re: adding /dev/xen/gnttab

On Thu, Sep 02, 2010 at 05:16:12PM +0200, Christoph Egger wrote:
> 
> > On Thu, Sep 02, 2010 at 04:00:44PM +0200, Christoph Egger wrote:
> > > 
> > > Hi!
> > > 
> > > For gnttab support a new device file is needed for a new set
> > > of ioctl()'s.
> > 
> > Can you explain what feature needs this gnttab device ?
> 
> Look at xentools33/patches/patch-aj
> 
> gnttab is needed
> a) to make xen tools compile
> b) for the grant table hypercalls in
>    sys/arch/xen/include/xen3-public/grant_table.h used by
>    xen tools
> c) for pci passthrough into HVM/PV guests
> d) for PV drivers in HVM guests
> d) for other things I'm not aware of

ok, thanks 

> [...]
> > > Attached patch adds /dev/xen/gnttab.
> > 
> > I see only patch for /dev/MAKEDEV, did you forget to
> > attach the diff for this device support ?
> 
(Continue reading)

Christoph Egger | 3 Sep 2010 10:48
Picon
Picon

Re: adding /dev/xen/gnttab


> On Thu, Sep 02, 2010 at 05:16:12PM +0200, Christoph Egger wrote:
> > 
> > > On Thu, Sep 02, 2010 at 04:00:44PM +0200, Christoph Egger wrote:
> > > > 
> > > > Hi!
> > > > 
> > > > For gnttab support a new device file is needed for
> > > > a new set of ioctl()'s.
> > > 
> > [...]
> > > > Attached patch adds /dev/xen/gnttab.
> 
> I don't think it's approrpiate to commit this patch before the
> kernel side is written then. they should be commited as a whole.

I think, the gnttab should be implemented as a pseudo-device
in the kernel.

Also the device file should be implemented as a clonable device.

I need to implement the operations

open, close, ioctl and mmap.

How do I implement mmap ? file(9) and filedesc(9) don't
mention mmap.

Christoph

(Continue reading)


Gmane