Subject: Re: devices in /kern ?
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 01/27/2005 09:35:42
On Jan 27, 2005, at 9:07 AM, Manuel Bouyer wrote:

> Hi,
> xen 2.0 allows binding of event channels (in the xen sense) to 
> userlevel
> process. On linux this is done by a character special device and I'd 
> like
> to keep a compatible interface. In works this way:
> when a process opens the device, a new private data structure 
> containing
> an event ring is created. IOCTls allows to control the device, and
> especially to bind the controlling process to events. Reading the
> device will retrieve pending events from the ring (eventually 
> blocking).
> events are unmasked by writing a binary mask to the device.
> Each processes opening the device has its own even ring and events 
> binding.
>
> For NetBSD I'd like to avoid an entry in /dev, as this would mean 
> adding
> this device to i386 binary sets. So I was asking if we can create a
> character device in /kern/xen/ (which already exists), of if it's 
> possible
> to have the required behavior (especially per-process private data) 
> with
> a regular kernfs file.

Why not a socket?  PF_XEN.  Requires no file system entries at all.