From: Ian Campbell Subject: Re: Automatic loading of xen-evtchn module in Xen 4.0.0? Date: Tue, 30 Mar 2010 10:44:57 +0100 Message-ID: <1269942297.10129.72385.camel@zakaz.uk.xensource.com> References: <20100327173221.GJ1878@reaktio.net> <4BAE8426.2050703@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4BAE8426.2050703@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Sat, 2010-03-27 at 22:18 +0000, Jeremy Fitzhardinge wrote: > On 03/27/2010 10:32 AM, Pasi K=C3=A4rkk=C3=A4inen wrote: > > Hello, > > > > xend automatically mounts /proc/xen, but it doesn't try loading evtch= n 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 > > =20 >=20 > We should be able to make these mount automatically with udev rules, I=20 > think, but I'm not sure whether you can do udev rules to mount misc=20 > 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. Perhaps something in the xen core code (or xenbus?) could generate the necessary hotplug events for the Xen "platform devices" (like the evtchn one)? > I think the front/back xenbus and device drivers are still a bit of a=20 > mess with regard to modules; I have to admit I tend to just compile the= m=20 > all in. It would be nice to get all that properly sorted out so they=20 > can be sensibly modularized and auto-loaded as required. (A good first= =20 > step would be to systematically work out what compile combinations=20 > actually work or fail, hint, hint ;) AFAIK the frontend driver modules work correctly as modules and distros have been compiling them modular for a while (Debian certainly has). The situation is certainly not as rosy for *back. It'd certainly be nice if some (or all) of the xenbus stuff could become modular too although I would guess there will be a core which must be compiled in. Ian.