Skip to contentSkip to conversation

/dev/misc/evtchn , /dev/xen/evtchn and the event channel driver : a little question

DISCUSSION Mark Ryden 3 participants 3 messages Sep 29, 2005

lore
Share & tools
lore

Mark Ryden

author
#0 lore raw

Hello,
This is something I do not understand : I have a version of
xen-unstable from
a few days ago. (I am using the default "make world" and make install, which means 2.6.* versions; and I run it on x386).

I had looked at the code of evtchn.c (/drivers/xen/evtchn in the sparse tree).

I see there:

err = misc_register(&evtchn_miscdev);
	if (err != 0)
	   {
	   printk(KERN_ALERT "Could not register /dev/misc/evtchn\n");
	  return err;
         }

and also:
static struct miscdevice evtchn_miscdev = {

	.minor        = EVTCHN_MINOR,
	.name         = "evtchn",
	.fops         = &evtchn_fops,

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
.devfs_name = "misc/evtchn",
#endif
};

I had booted Xen (domain 0).

But I do not have /dev/misc/evtchn !
(as ls /dev/misc/evtchn shows).
On the other hand I *DO* have /dev/xen/evtchn and it seems to me that other modules in tools use /dev/xen/evtchn and not /dev/misc/evtchn.

What is the truth behind this mystery ?

TIA,
MR

#1 lore raw
Quoted 12 lines · Mark Ryden

Hello,

I had booted Xen (domain 0).

But I do not have /dev/misc/evtchn !
(as ls /dev/misc/evtchn shows).
On the other hand I *DO* have /dev/xen/evtchn and it seems to me that other modules in tools use /dev/xen/evtchn and not /dev/misc/evtchn.

What is the truth behind this mystery ?

This is all left-over crude from devfs/udev and trying to support 2.4 and 2.6. I imagine that you're actually seeing a /dev/evtchn from udev and Xend is manually creating /dev/xen/evtchn at startup.

There's a general cleanup needed here that's on my TODO list. Just been overly distracted lately.

Regards,

Anthony Liguori

Quoted 10 lines

TIA,
MR

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
In reply to Mark Ryden
Quoted 6 lines · Mark Ryden

But I do not have /dev/misc/evtchn !
(as ls /dev/misc/evtchn shows).
On the other hand I *DO* have /dev/xen/evtchn and it seems to me that other modules in tools use /dev/xen/evtchn and not /dev/misc/evtchn.

What is the truth behind this mystery ?

It'll appear under /dev/misc/evtchn only if you have devfs enabled (which is unlikely as it is removed from 2.6.13). Instead /dev/xe/evtchn has to be manually created by userspace.

The correct answer is probably to use udev to set up /dev/xen/evtchn.

-- Keir