All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0 of 2] tools/hotplug fixes for xen-unstable
@ 2011-11-25 13:39 Olaf Hering
  2011-11-25 13:39 ` [PATCH 1 of 2] xencommons: run script only when needed Olaf Hering
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Olaf Hering @ 2011-11-25 13:39 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson


Update xencommons to avoid error messages in non-Xen environment, and
load required kernel drivers.

Olaf

 tools/hotplug/Linux/init.d/xencommons |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1 of 2] xencommons: run script only when needed
  2011-11-25 13:39 [PATCH 0 of 2] tools/hotplug fixes for xen-unstable Olaf Hering
@ 2011-11-25 13:39 ` Olaf Hering
  2011-11-25 13:39 ` [PATCH 2 of 2] xencommons: load evtchn and gntdev modules Olaf Hering
  2011-12-01 18:28 ` [PATCH 0 of 2] tools/hotplug fixes for xen-unstable Ian Jackson
  2 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2011-11-25 13:39 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1322228282 -3600
# Node ID bed3a6489d9a2ee2fdfc12a35f8544c7148dfe1a
# Parent  1027e7d13d02143048c7d48d7960967c5b1657a8
xencommons: run script only when needed

Currently xencommons prints an error that /proc/xen/capabilities does
not exist when started on a non-xen kernel.

Update the xencommons script to run only when needed:
- do not run if /proc/xen does not exist
- check if /proc/xen/capabilities exists before doing the grep for dom0

Signed-off-by: Olaf Hering <olaf@aepfle.de>

diff -r 1027e7d13d02 -r bed3a6489d9a tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons
+++ b/tools/hotplug/Linux/init.d/xencommons
@@ -29,15 +29,24 @@ test -f $xencommons_config/xencommons &&
 XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
 shopt -s extglob
 
+# not running in Xen dom0 or domU
+if ! test -d /proc/xen ; then
+	exit 0
+fi
+
+# mount xenfs in dom0 or domU with a pv_ops kernel
 if test "x$1" = xstart && \
-     test -d /proc/xen && \
    ! test -f /proc/xen/capabilities && \
    ! grep '^xenfs ' /proc/mounts >/dev/null;
 then
 	mount -t xenfs xenfs /proc/xen
 fi
 
-if ! grep -q "control_d" /proc/xen/capabilities ; then
+# run this script only in dom0:
+# no capabilities file in xenlinux domU kernel
+# empty capabilities file in pv_ops domU kernel
+if test -f /proc/xen/capabilities && \
+   ! grep -q "control_d" /proc/xen/capabilities ; then
 	exit 0
 fi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2 of 2] xencommons: load evtchn and gntdev modules
  2011-11-25 13:39 [PATCH 0 of 2] tools/hotplug fixes for xen-unstable Olaf Hering
  2011-11-25 13:39 ` [PATCH 1 of 2] xencommons: run script only when needed Olaf Hering
@ 2011-11-25 13:39 ` Olaf Hering
  2011-12-01 18:28 ` [PATCH 0 of 2] tools/hotplug fixes for xen-unstable Ian Jackson
  2 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2011-11-25 13:39 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1322228288 -3600
# Node ID 666c76daa1e74cb7f6d237fe34434d262fc91f6a
# Parent  bed3a6489d9a2ee2fdfc12a35f8544c7148dfe1a
xencommons: load evtchn and gntdev modules

There is currently no code in the kernel to trigger autoload of the
evtchn or gntdev drivers. Load them manually during xencommons start.
Handle both pvops and xenlinux module names.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

diff -r bed3a6489d9a -r 666c76daa1e7 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons
+++ b/tools/hotplug/Linux/init.d/xencommons
@@ -54,6 +54,11 @@ do_start () {
         local time=0
 	local timeout=30
 
+	modprobe xen-evtchn 2>/dev/null
+	modprobe xen-gntdev 2>/dev/null
+	modprobe evtchn 2>/dev/null
+	modprobe gntdev 2>/dev/null
+
 	if ! `xenstore-read -s / >/dev/null 2>&1`
 	then
 		test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0 of 2] tools/hotplug fixes for xen-unstable
  2011-11-25 13:39 [PATCH 0 of 2] tools/hotplug fixes for xen-unstable Olaf Hering
  2011-11-25 13:39 ` [PATCH 1 of 2] xencommons: run script only when needed Olaf Hering
  2011-11-25 13:39 ` [PATCH 2 of 2] xencommons: load evtchn and gntdev modules Olaf Hering
@ 2011-12-01 18:28 ` Ian Jackson
  2011-12-01 18:48   ` Olaf Hering
  2 siblings, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2011-12-01 18:28 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel

Olaf Hering writes ("[Xen-devel] [PATCH 0 of 2] tools/hotplug fixes for xen-unstable"):
> Update xencommons to avoid error messages in non-Xen environment, and
> load required kernel drivers.

Great, thanks.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0 of 2] tools/hotplug fixes for xen-unstable
  2011-12-01 18:28 ` [PATCH 0 of 2] tools/hotplug fixes for xen-unstable Ian Jackson
@ 2011-12-01 18:48   ` Olaf Hering
  2011-12-08 16:53     ` Ian Jackson
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2011-12-01 18:48 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Thu, Dec 01, Ian Jackson wrote:

> Olaf Hering writes ("[Xen-devel] [PATCH 0 of 2] tools/hotplug fixes for xen-unstable"):
> > Update xencommons to avoid error messages in non-Xen environment, and
> > load required kernel drivers.
> 
> Great, thanks.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

Ian,

could the modprobe change be backported to 4.1 and maybe even 4.0?

Olaf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0 of 2] tools/hotplug fixes for xen-unstable
  2011-12-01 18:48   ` Olaf Hering
@ 2011-12-08 16:53     ` Ian Jackson
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Jackson @ 2011-12-08 16:53 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel@lists.xensource.com

Olaf Hering writes ("Re: [Xen-devel] [PATCH 0 of 2] tools/hotplug fixes for xen-unstable"):
> could the modprobe change be backported to 4.1 and maybe even 4.0?

Yes, I think it has been in unstable long enough.  I have cherry
picked it into to 4.1, whose xencommons is identical to unstable's.

As regards 4.0: the xencommons script there is substantially
different, as the toolstack startup arrangements don't match
4.1/unstable.  If someone wants to provide a (tested!) backport then
we'll consider it.

Thanks,
Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-08 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-25 13:39 [PATCH 0 of 2] tools/hotplug fixes for xen-unstable Olaf Hering
2011-11-25 13:39 ` [PATCH 1 of 2] xencommons: run script only when needed Olaf Hering
2011-11-25 13:39 ` [PATCH 2 of 2] xencommons: load evtchn and gntdev modules Olaf Hering
2011-12-01 18:28 ` [PATCH 0 of 2] tools/hotplug fixes for xen-unstable Ian Jackson
2011-12-01 18:48   ` Olaf Hering
2011-12-08 16:53     ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.