From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: xen-devel@lists.xenproject.org
Cc: "Luis R. Rodriguez" <mcgrof@suse.com>
Subject: [PATCH v6 11/13] xencommons: move module list into a generic place
Date: Thu, 12 Jun 2014 18:18:49 -0700 [thread overview]
Message-ID: <1402622331-4282-12-git-send-email-mcgrof@do-not-panic.com> (raw)
In-Reply-To: <1402622331-4282-1-git-send-email-mcgrof@do-not-panic.com>
From: "Luis R. Rodriguez" <mcgrof@suse.com>
This will allows us to share the same module list with
sysemd, and lets us upkeep it in one place. Document this
while at it on the top level README and expand on the wiki:
http://wiki.xen.org/wiki/Category:Host_Configuration#Linux_kernel_modules
In order to upkeep parallelism builds be explicit about the
requirement to complete all actions before any installation
targets.
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
README | 18 +++++++++++
config/modules | 16 ++++++++++
tools/hotplug/Linux/Makefile | 36 +++++++++++++++++++---
.../Linux/init.d/{xencommons => xencommons.in} | 16 +---------
4 files changed, 67 insertions(+), 19 deletions(-)
create mode 100644 config/modules
rename tools/hotplug/Linux/init.d/{xencommons => xencommons.in} (89%)
diff --git a/README b/README
index 9bbe734..34d7c0b 100644
--- a/README
+++ b/README
@@ -129,6 +129,24 @@ performed with root privileges.]
versions of those scripts, so that you can copy the dist directory
to another machine and install from that distribution.
+Required Linux modules
+======================
+
+Xen has a set of Linux modules which the init scripts ensure to load before
+enablement of xen guests. The list of modules are upkept in one place:
+
+ * config/modules
+
+The file supports a simple language, comments are ignored, and if you there
+are module replacements this can be listed by using a pipe to show preference
+for the first module, followed by the older module.
+
+We should strive to not require statically loading modules but it seems some
+systems have had issues with automatically loading some Linux kernel modules.
+For more details refer to:
+
+http://wiki.xen.org/wiki/Category:Host_Configuration#Linux_kernel_modules
+
Python Runtime Libraries
========================
diff --git a/config/modules b/config/modules
new file mode 100644
index 0000000..525c60e
--- /dev/null
+++ b/config/modules
@@ -0,0 +1,16 @@
+xen-evtchn
+xen-gntdev
+xen-gntalloc
+xen-blkback
+xen-netback
+xen-pciback
+evtchn
+gntdev
+netbk
+blkbk
+xen-scsibk
+usbbk
+pciback
+xen-acpi-processor
+# Prefer to load blktap2 if found, otherwise load blktap
+blktap2|blktap
diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
index d5de9e6..90b0b0c 100644
--- a/tools/hotplug/Linux/Makefile
+++ b/tools/hotplug/Linux/Makefile
@@ -33,17 +33,45 @@ UDEV_RULES_DIR = $(CONFIG_DIR)/udev
UDEV_RULES = xen-backend.rules $(UDEV_RULES-y)
.PHONY: all
-all:
+all: $(XENCOMMONS_INITD)
+
+$(XENCOMMONS_INITD): $(XEN_ROOT)/config/modules $(XENCOMMONS_INITD).in
+ @set -e ; \
+ IFS='' ;\
+ cat $(XEN_ROOT)/config/modules | ( \
+ while read l ; do \
+ if echo $${l} | egrep -q "^#" ; then \
+ continue ;\
+ fi ;\
+ if echo "$${l}" | egrep -q "\|" ; then \
+ m1=$${l%%|*} ;\
+ m2=$${l#*|} ;\
+ echo " modprobe $$m1 2>/dev/null || modprobe $$m2 2>/dev/null" ;\
+ else \
+ echo " modprobe $$l 2>/dev/null" ;\
+ fi ;\
+ done \
+ ) > $(XENCOMMONS_INITD).modules ;\
+ cat $(XENCOMMONS_INITD).in | ( \
+ while read l ; do \
+ if echo "$${l}" | egrep -q "@LOAD_MODULES@" ; then \
+ cat $(XENCOMMONS_INITD).modules ;\
+ else \
+ echo $$l ;\
+ fi ;\
+ done \
+ ) > $@
+ @rm -f $(XENCOMMONS_INITD).modules
.PHONY: build
-build:
+build: all
.PHONY: install
install: all install-initd install-scripts install-udev
# See docs/misc/distro_mapping.txt for INITD_DIR location
.PHONY: install-initd
-install-initd:
+install-initd: all
[ -d $(DESTDIR)$(INITD_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR)
[ -d $(DESTDIR)$(SYSCONFIG_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SYSCONFIG_DIR)
[ -d $(DESTDIR)$(LIBEXEC) ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC)
@@ -55,7 +83,7 @@ install-initd:
$(INSTALL_PROG) init.d/xen-watchdog $(DESTDIR)$(INITD_DIR)
.PHONY: install-scripts
-install-scripts:
+install-scripts: all
[ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
$(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
set -e; for i in $(XEN_SCRIPTS); \
diff --git a/tools/hotplug/Linux/init.d/xencommons b/tools/hotplug/Linux/init.d/xencommons.in
similarity index 89%
rename from tools/hotplug/Linux/init.d/xencommons
rename to tools/hotplug/Linux/init.d/xencommons.in
index 4ebd636..3939bcc 100644
--- a/tools/hotplug/Linux/init.d/xencommons
+++ b/tools/hotplug/Linux/init.d/xencommons.in
@@ -57,21 +57,7 @@ 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 xen-pciback 2>/dev/null
- modprobe evtchn 2>/dev/null
- modprobe gntdev 2>/dev/null
- modprobe netbk 2>/dev/null
- modprobe blkbk 2>/dev/null
- modprobe xen-scsibk 2>/dev/null
- modprobe usbbk 2>/dev/null
- modprobe pciback 2>/dev/null
- modprobe xen-acpi-processor 2>/dev/null
- modprobe blktap2 2>/dev/null || modprobe blktap 2>/dev/null
+ @LOAD_MODULES@
mkdir -p /var/run/xen
if ! `${BINDIR}/xenstore-read -s / >/dev/null 2>&1`
--
2.0.0.rc3.18.g00a5b79
next prev parent reply other threads:[~2014-06-13 1:19 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 1:18 [PATCH v6 00/13] xen: add systemd support Luis R. Rodriguez
2014-06-13 1:18 ` [PATCH v6 01/13] xenstored: enable usage of config.h on both xenstored and oxenstored Luis R. Rodriguez
2014-06-13 1:18 ` [PATCH v6 02/13] cxenstored: add support for systemd active sockets Luis R. Rodriguez
2014-07-02 13:02 ` Ian Campbell
2014-07-02 19:00 ` Luis R. Rodriguez
2014-07-03 9:13 ` Ian Campbell
2014-07-03 17:06 ` Luis R. Rodriguez
2014-07-04 14:32 ` Ian Campbell
2014-07-08 3:08 ` Luis R. Rodriguez
2014-07-17 19:45 ` Luis R. Rodriguez
2014-07-17 20:16 ` Dave Scott
2014-07-17 23:13 ` Luis R. Rodriguez
2014-07-18 9:27 ` Anil Madhavapeddy
2014-06-13 1:18 ` [PATCH v6 03/13] oxenstored: " Luis R. Rodriguez
2014-07-02 13:08 ` Ian Campbell
2014-07-02 19:09 ` Luis R. Rodriguez
2014-07-03 8:42 ` Dave Scott
2014-07-03 17:43 ` Luis R. Rodriguez
2014-06-13 1:18 ` [PATCH v6 04/13] oxenstored: force FD_CLOEXEC with Unix.set_close_on_exec on LSB init Luis R. Rodriguez
2014-07-02 13:08 ` Ian Campbell
2014-06-13 1:18 ` [PATCH v6 05/13] tools/xendomains: make xl the default and remove xm usage Luis R. Rodriguez
2014-06-13 1:18 ` [PATCH v6 06/13] tools/xendomains: do space cleanups Luis R. Rodriguez
2014-06-13 1:18 ` [PATCH v6 07/13] tools/xendomains: move to libexec and use a smaller init helper Luis R. Rodriguez
2014-06-13 7:06 ` Jacek Konieczny
2014-06-13 18:32 ` Luis R. Rodriguez
2014-07-02 13:12 ` Ian Campbell
2014-06-13 1:18 ` [PATCH v6 08/13] autoconf: xen: force a refresh with autoconf Luis R. Rodriguez
2014-06-13 1:18 ` [PATCH v6 09/13] autoconf: update m4/pkg.m4 Luis R. Rodriguez
2014-07-02 13:13 ` Ian Campbell
2014-07-02 19:10 ` Luis R. Rodriguez
2014-06-13 1:18 ` [PATCH v6 10/13] autoconf: xen: move standard path variables to config/Paths.mk.in Luis R. Rodriguez
2014-07-02 13:34 ` Ian Campbell
2014-07-02 19:32 ` Luis R. Rodriguez
2014-07-03 9:15 ` Ian Campbell
2014-07-03 18:30 ` Luis R. Rodriguez
2014-07-04 14:33 ` Ian Campbell
2014-07-08 18:41 ` Luis R. Rodriguez
2014-07-08 18:53 ` Luis R. Rodriguez
2014-07-10 16:18 ` Ian Campbell
2014-07-14 23:41 ` Luis R. Rodriguez
2014-07-03 18:53 ` Luis R. Rodriguez
2014-07-04 14:36 ` Ian Campbell
2014-07-08 18:52 ` Luis R. Rodriguez
2014-07-10 16:16 ` Ian Campbell
2014-07-14 23:42 ` Luis R. Rodriguez
2014-06-13 1:18 ` Luis R. Rodriguez [this message]
2014-07-02 13:44 ` [PATCH v6 11/13] xencommons: move module list into a generic place Ian Campbell
2014-07-02 21:56 ` Luis R. Rodriguez
2014-07-03 9:15 ` Ian Campbell
2014-06-13 1:18 ` [PATCH v6 12/13] autoconf: xen: enable explicit preference option for xenstored preference Luis R. Rodriguez
2014-07-02 13:54 ` Ian Campbell
2014-07-02 20:09 ` Luis R. Rodriguez
2014-07-03 9:20 ` Ian Campbell
2014-07-03 18:57 ` Luis R. Rodriguez
2014-07-04 14:37 ` Ian Campbell
2014-07-08 18:54 ` Luis R. Rodriguez
2014-06-13 1:18 ` [PATCH v6 13/13] systemd: add xen systemd service and module files Luis R. Rodriguez
2014-06-13 19:55 ` Luis R. Rodriguez
2014-06-19 19:47 ` Bastian Blank
2014-06-19 20:21 ` Luis R. Rodriguez
2014-06-19 20:26 ` Luis R. Rodriguez
2014-06-20 5:59 ` David Sutton
2014-07-02 14:02 ` Ian Campbell
2014-07-02 20:25 ` Luis R. Rodriguez
2014-06-19 19:03 ` [PATCH v6 00/13] xen: add systemd support Luis R. Rodriguez
2014-07-02 14:48 ` Ian Campbell
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=1402622331-4282-12-git-send-email-mcgrof@do-not-panic.com \
--to=mcgrof@do-not-panic.com \
--cc=mcgrof@suse.com \
--cc=xen-devel@lists.xenproject.org \
/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).