From: Olaf Hering <olaf@aepfle.de>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xensource.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
"fantonifabio@tiscali.it" <fantonifabio@tiscali.it>
Subject: Re: [PATCH] tools/hotplug/Linux/init.d/: added other xen kernel modules on xencommons start
Date: Fri, 10 Aug 2012 17:04:47 +0200 [thread overview]
Message-ID: <20120810150447.GA13318@aepfle.de> (raw)
In-Reply-To: <50222C4A0200007800093711@nat28.tlf.novell.com>
On Wed, Aug 08, Jan Beulich wrote:
> >>> On 07.08.12 at 19:22, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote:
> >> Jan Beulich writes ("Re: [Xen-devel] [PATCH] tools/hotplug/Linux/init.d/:
> >> - not exclusively try the pv-ops kernel's module names.
> >
> > Do you mean that 4.2 should try loading some bigger set of module
> > names ? If so then do you have a list ? :-)
>
> - xen-blkback's counterpart is blkbk
> - xen-netback's counterpart is netbk
>
> xen-evtchn/evtchn and xen-gntdev/gntdev are already taken
> care of, albeit in a little strange a way (the two entries being
> separated by an increasing amount of other ones, when it is
> really pointless to load the second one if the first one's load
> succeeded).
>
> To not needlessly try everything, it might additionally be worth
> a thought to
> - first try loading via module alias rather than module name (if
> that succeeds for a carefully chosen module that got its alias
> added late - according to our patches, the devname: aliases
> got introduced in 2.6.35, and the xen-backend: ones in 3.1 -,
> only try loading via module alias for all subsequent ones)
> - second try loading a (or all) pvops named module(s) (if that/
> any of them succeed(s), there's no need to try _any_ non-
> pvops names subsequently, i.e. including ones that don't even
> exist in the legacy trees)
> - last try loading the traditional/forward-port named ones
I think it can be done like this because I'm sure that the xenlinux
based dom0 kernels have the drivers compiled as modules. So if evtchn.ko
exists its xenlinux based, otherwise its pvops. I havent runtime tested
that patch yet.
Olaf
diff -r 7ce01c435f5a tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons
+++ b/tools/hotplug/Linux/init.d/xencommons
@@ -50,18 +50,39 @@ if test -f /proc/xen/capabilities && \
exit 0
fi
+# Load all drivers in a xenlinux based dom0
+do_modprobe_xenlinux() {
+ for mod in gntdev netbk blkbk xen-scsibk usbbk tpmbk pciback
+ do
+ modprobe ${mod} 2>/dev/null
+ done
+}
+
+# Load all drivers in a pvops based dom0
+do_modprobe_pvops() {
+ for mod in evtchn gntdev gntalloc acpi-processor
+ do
+ modprobe xen-${mod} 2>/dev/null
+ done
+ for be in vbd vif pci
+ do
+ modprobe xen-backend:${be} 2>/dev/null
+ done
+}
+
do_start () {
local time=0
local timeout=30
- modprobe xen-evtchn 2>/dev/null
- modprobe xen-gntdev 2>/dev/null
- modprobe xen-gntalloc 2>/dev/null
- modprobe xen-blkback 2>/dev/null
- modprobe xen-netback 2>/dev/null
- modprobe evtchn 2>/dev/null
- modprobe gntdev 2>/dev/null
- modprobe xen-acpi-processor 2>/dev/null
+ # Check if dom0 is based on xenlinux, its drivers are all modules
+ # If loading succeeds assume its xenlinux based, otherwise its pvops based
+ if modprobe evtchn 2>/dev/null
+ then
+ do_modprobe_xenlinux
+ else
+ do_modprobe_pvops
+ fi
+
mkdir -p /var/run/xen
if ! `xenstore-read -s / >/dev/null 2>&1`
next prev parent reply other threads:[~2012-08-10 15:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 12:41 [PATCH] tools/hotplug/Linux/init.d/: added other xen kernel modules on xencommons start Fabio Fantoni
2012-06-08 14:07 ` Ian Jackson
2012-08-01 12:23 ` Fabio Fantoni
2012-08-01 12:28 ` Ian Campbell
2012-08-03 11:08 ` Ian Jackson
2012-08-07 13:43 ` Jan Beulich
2012-08-07 17:22 ` Ian Jackson
2012-08-08 7:07 ` Jan Beulich
2012-08-10 15:04 ` Olaf Hering [this message]
2012-08-10 15:08 ` Jan Beulich
2012-08-10 15:10 ` Olaf Hering
2012-08-10 15:15 ` Jan Beulich
2012-08-10 16:05 ` Olaf Hering
2012-08-10 17:15 ` Ian Jackson
2012-08-10 15:12 ` Ian Jackson
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=20120810150447.GA13318@aepfle.de \
--to=olaf@aepfle.de \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=fantonifabio@tiscali.it \
--cc=konrad.wilk@oracle.com \
--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).