xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Automatic loading of xen-evtchn module in Xen 4.0.0?
Date: Tue, 30 Mar 2010 10:22:23 -0400	[thread overview]
Message-ID: <20100330142223.GC10728@phenom.dumpdata.com> (raw)
In-Reply-To: <1269942297.10129.72385.camel@zakaz.uk.xensource.com>

On Tue, Mar 30, 2010 at 10:44:57AM +0100, Ian Campbell wrote:
> On Sat, 2010-03-27 at 22:18 +0000, Jeremy Fitzhardinge wrote:
> > On 03/27/2010 10:32 AM, Pasi Kärkkäinen wrote:
> > > Hello,
> > >
> > > xend automatically mounts /proc/xen, but it doesn't try loading evtchn or xen-evtchn modules.
> > > Should we add automatic loading of these modules?
> > >
> > > xend doesn't start if xen event channel functionality is missing.
> > >
> > > Fedora Xen rpms do load modules automatically, like this:
> > >
> > > # cat /etc/sysconfig/modules/xen.modules
> > > #!/bin/sh
> > >
> > > test -d /proc/xen                               || exit 0
> > > test -f /proc/xen/capabilities                  || mount -t xenfs xen /proc/xen
> > > test -f /proc/xen/capabilities                  || exit 0
> > > grep -q "control_d" /proc/xen/capabilities      || exit 0
> > >
> > > for module in xen-evtchn evtchn blkbk netbk; do
> > >          modprobe ${module}>/dev/null 2>&1
> > > done
> > >    
> > 
> > We should be able to make these mount automatically with udev rules, I 
> > think, but I'm not sure whether you can do udev rules to mount misc 
> > devices (which is what /dev/xen/evtchn is).
> 
> I think you mean "modprobe misc devices" not mount.
> 
> I see various uses of the MODULE_ALIAS_MISCDEV macro in the kernel --
> but I'm not sure what actually causes a matching hotplug event to be
> generated, other than trying to open a matching device node which with
> udev won't exist until the module is loaded.

One idea that I submitted to dracut mailing list (the initramfs
creation/running tool under FC12 and above) was to leverage 'xen-detect'
and load the appropiate modules. This way during bootup, bamm, you get
all your modules in.

But they righly suggested that there should be an uevent to kick udev to
start loading them and use the MODULE_ALIAS. But to use MODULE_ALIAS,
you have to get an uevent, and to get an uevent, you have to load the
module, so it looks to be a chicken-and-egg problem.

> 
> Perhaps something in the xen core code (or xenbus?) could generate the
> necessary hotplug events for the Xen "platform devices" (like the evtchn
> one)?

But I think that comes back to the chicken-and-egg. If you have all of
the front-end drivers compiled as modules, how would they (front-end
drivers) generate the hotplug events when they are not loaded?

Perhaps have the xenbus try to load the modules if it detects that is
running under Xen? Something similar to how the kernel tries to mount
various filesystem modules when mounting a disk?

  reply	other threads:[~2010-03-30 14:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-27 17:32 Automatic loading of xen-evtchn module in Xen 4.0.0? Pasi Kärkkäinen
2010-03-27 22:18 ` Jeremy Fitzhardinge
2010-03-30  9:44   ` Ian Campbell
2010-03-30 14:22     ` Konrad Rzeszutek Wilk [this message]
2010-03-30 14:26       ` Ian Campbell
2010-03-30 22:47     ` Jeremy Fitzhardinge
2010-03-31  8:40       ` Ian Campbell
2010-03-31 13:39         ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100330142223.GC10728@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=jeremy@goop.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).