WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2/2] Load gntdev and evtchn if they're modular.

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2/2] Load gntdev and evtchn if they're modular.
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Fri, 19 Aug 2011 17:49:07 -0700
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 19 Aug 2011 17:51:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>


diff -r cfb49fe940fd -r 81f75ed45ec2 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons     Tue Aug 16 16:56:16 2011 -0700
+++ b/tools/hotplug/Linux/init.d/xencommons     Tue Aug 16 17:05:18 2011 -0700
@@ -29,12 +29,18 @@
 XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
 shopt -s extglob
 
-if [ "x$1" = xstart -a -d /proc/xen -a \
-    ! -f /proc/xen/capabilities ] && \
-    ! grep -qw '^xenfs' /proc/mounts; then
-       mount -t xenfs xenfs /proc/xen
+[ -d /proc/xen ] || exit 0     # Xen not present; exit quietly
+
+if [ "x$1" = xstart ]; then
+       # Mount /proc/xen if needed
+       [ -f /proc/xen/capabilities ] || mount -t xenfs xenfs /proc/xen
+
+       # Make sure evtchn and gntdev are loaded if present
+       grep -q "xen/evtchn" /proc/misc || modprobe xen-evtchn
+       grep -q "xen/gntdev" /proc/misc || modprobe xen-gntdev
 fi
 
+# Done here if this isn't a control domain
 if ! grep -q "control_d" /proc/xen/capabilities ; then
        exit 0
 fi




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel