From 462ca58fee09c03ae91a8c5aa33523d92f793c2119d531c2437d0e594bba5cb1 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Tue, 10 May 2011 16:44:09 +0000 Subject: [PATCH] - bnc#691256 - move modprobe of xen backend modules from xend to xencommons initscript tmp-initscript-modprobe.patch - bnc#691738 - Xen does not find device create with npiv block xen-qemu-iscsi-fix.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=116 --- bdrv_open2_flags_2.patch | 2 +- init.xend | 13 ------------- ioemu-disable-emulated-ide-if-pv.patch | 2 +- snapshot-ioemu-delete.patch | 2 +- snapshot-ioemu-restore.patch | 4 ++-- snapshot-ioemu-save.patch | 6 +++--- tmp-initscript-modprobe.patch | 23 +++++++++++++++++++++++ xen-qemu-iscsi-fix.patch | 13 +++++++++++++ xen.changes | 13 +++++++++++++ xen.spec | 2 ++ 10 files changed, 59 insertions(+), 21 deletions(-) create mode 100644 tmp-initscript-modprobe.patch diff --git a/bdrv_open2_flags_2.patch b/bdrv_open2_flags_2.patch index e299095..38b4045 100644 --- a/bdrv_open2_flags_2.patch +++ b/bdrv_open2_flags_2.patch @@ -70,7 +70,7 @@ Index: xen-4.1.0-testing/tools/ioemu-qemu-xen/xenstore.c pstrcpy(bs->filename, sizeof(bs->filename), params); } #else -@@ -710,7 +723,7 @@ void xenstore_parse_domain_config(int hv +@@ -716,7 +729,7 @@ void xenstore_parse_domain_config(int hv fprintf(stderr, "Using file %s in read-%s mode\n", bs->filename, is_readonly ? "only" : "write"); diff --git a/init.xend b/init.xend index 63c7002..14deb6e 100644 --- a/init.xend +++ b/init.xend @@ -81,19 +81,6 @@ case "$1" in else cleanup fi - # Load XEN backend modules - # Sidenote: They could be loaded later: - # - netbk and blkbk when the dom0 hotplug events occur - # (in xen-network-common.sh and block-common.sh) - # - xenblk when xend prepares for bootloader - # but for now it's safest to have them loaded when xend starts in dom0. - modprobe evtchn 2>/dev/null || true - modprobe blktap 2>/dev/null || true - modprobe blkbk 2>/dev/null || true - modprobe xenblk 2>/dev/null || true - modprobe netbk 2>/dev/null || true - modprobe gntdev 2>/dev/null || true - modprobe usbbk 2>/dev/null || true xend start await_daemons_up ;; diff --git a/ioemu-disable-emulated-ide-if-pv.patch b/ioemu-disable-emulated-ide-if-pv.patch index 1bd2e8b..1abd9b8 100644 --- a/ioemu-disable-emulated-ide-if-pv.patch +++ b/ioemu-disable-emulated-ide-if-pv.patch @@ -49,7 +49,7 @@ Index: xen-4.1.0-testing/tools/ioemu-qemu-xen/xenstore.c { char **e_danger = NULL; char *buf = NULL; -@@ -754,15 +754,19 @@ void xenstore_parse_domain_config(int hv +@@ -760,15 +760,19 @@ void xenstore_parse_domain_config(int hv #endif diff --git a/snapshot-ioemu-delete.patch b/snapshot-ioemu-delete.patch index 6b3eb2a..1fef3db 100644 --- a/snapshot-ioemu-delete.patch +++ b/snapshot-ioemu-delete.patch @@ -2,7 +2,7 @@ Index: xen-4.1.0-testing/tools/ioemu-qemu-xen/xenstore.c =================================================================== --- xen-4.1.0-testing.orig/tools/ioemu-qemu-xen/xenstore.c +++ xen-4.1.0-testing/tools/ioemu-qemu-xen/xenstore.c -@@ -972,6 +972,18 @@ static void xenstore_process_dm_command_ +@@ -978,6 +978,18 @@ static void xenstore_process_dm_command_ } snapshot_name = xs_read(xsh, XBT_NULL, path, &len); diff --git a/snapshot-ioemu-restore.patch b/snapshot-ioemu-restore.patch index c49bf4d..c39f73b 100644 --- a/snapshot-ioemu-restore.patch +++ b/snapshot-ioemu-restore.patch @@ -11,7 +11,7 @@ Index: xen-4.1.0-testing/tools/ioemu-qemu-xen/xenstore.c static int pasprintf(char **buf, const char *fmt, ...) { va_list ap; -@@ -708,8 +710,33 @@ void xenstore_parse_domain_config(int hv +@@ -714,8 +716,33 @@ void xenstore_parse_domain_config(int hv fprintf(stderr, "Using file %s in read-%s mode\n", bs->filename, is_readonly ? "only" : "write"); @@ -46,7 +46,7 @@ Index: xen-4.1.0-testing/tools/ioemu-qemu-xen/xenstore.c } #endif -@@ -839,6 +866,23 @@ int xenstore_parse_disable_pf_config () +@@ -845,6 +872,23 @@ int xenstore_parse_disable_pf_config () return disable_pf; } diff --git a/snapshot-ioemu-save.patch b/snapshot-ioemu-save.patch index ea37458..b0b89a3 100644 --- a/snapshot-ioemu-save.patch +++ b/snapshot-ioemu-save.patch @@ -207,7 +207,7 @@ Index: xen-4.1.0-testing/tools/ioemu-qemu-xen/xenstore.c #include "console.h" #include "hw.h" -@@ -899,6 +900,7 @@ static void xenstore_process_dm_command_ +@@ -905,6 +906,7 @@ static void xenstore_process_dm_command_ { char *path = NULL, *command = NULL, *par = NULL; unsigned int len; @@ -215,7 +215,7 @@ Index: xen-4.1.0-testing/tools/ioemu-qemu-xen/xenstore.c if (pasprintf(&path, "/local/domain/0/device-model/%u/command", domid) == -1) { -@@ -914,7 +916,18 @@ static void xenstore_process_dm_command_ +@@ -920,7 +922,18 @@ static void xenstore_process_dm_command_ if (!strncmp(command, "save", len)) { fprintf(logfile, "dm-command: pause and save state\n"); @@ -235,7 +235,7 @@ Index: xen-4.1.0-testing/tools/ioemu-qemu-xen/xenstore.c } else if (!strncmp(command, "continue", len)) { fprintf(logfile, "dm-command: continue after state save\n"); xen_pause_requested = 0; -@@ -1077,6 +1090,13 @@ static void xenstore_process_vcpu_set_ev +@@ -1083,6 +1096,13 @@ static void xenstore_process_vcpu_set_ev return; } diff --git a/tmp-initscript-modprobe.patch b/tmp-initscript-modprobe.patch new file mode 100644 index 0000000..38dd881 --- /dev/null +++ b/tmp-initscript-modprobe.patch @@ -0,0 +1,23 @@ +Index: xen-4.1.0-testing/tools/hotplug/Linux/init.d/xencommons +=================================================================== +--- xen-4.1.0-testing.orig/tools/hotplug/Linux/init.d/xencommons ++++ xen-4.1.0-testing/tools/hotplug/Linux/init.d/xencommons +@@ -45,6 +45,18 @@ do_start () { + local time=0 + local timeout=30 + ++ # Load XEN backend modules ++ # NB: They could be loaded later, e.g. when dom0 hotplug events occur, ++ # but for now it's safest to have them loaded here. ++ modprobe evtchn 2>/dev/null || true ++ modprobe gntdev 2>/dev/null || true ++ modprobe blktap 2>/dev/null || true ++ modprobe blkbk 2>/dev/null || true ++ modprobe netbk 2>/dev/null || true ++ modprobe usbbk 2>/dev/null || true ++ # xenblk (frontend module) is needed in dom0, allowing it to use vbds ++ modprobe xenblk 2>/dev/null || true ++ + if ! `xenstore-read -s / >/dev/null 2>&1` + then + test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored" diff --git a/xen-qemu-iscsi-fix.patch b/xen-qemu-iscsi-fix.patch index e0b9815..b80a68d 100644 --- a/xen-qemu-iscsi-fix.patch +++ b/xen-qemu-iscsi-fix.patch @@ -61,3 +61,16 @@ Index: xen-4.1.0-testing/tools/ioemu-qemu-xen/xenstore.c /* Obtain blktap sub-type prefix */ if ((!strcmp(drv, "tap") || !strcmp(drv, "qdisk")) && params[0]) { char *offset = strchr(params, ':'); +@@ -657,6 +681,12 @@ void xenstore_parse_domain_config(int hv + format = &bdrv_host_device; + else + format = &bdrv_raw; ++ } else if (!strcmp(drv,"iscsi")) { ++ format = &bdrv_raw; ++ } else if (!strcmp(drv,"npiv")) { ++ format = &bdrv_raw; ++ } else if (!strcmp(drv,"dmmd")) { ++ format = &bdrv_raw; + } else { + format = bdrv_find_format(drv); + if (!format) { diff --git a/xen.changes b/xen.changes index 9e4a44b..74c721e 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue May 10 08:53:27 MDT 2011 - jfehlig@novell.com + +- bnc#691256 - move modprobe of xen backend modules from xend to + xencommons initscript + tmp-initscript-modprobe.patch + +------------------------------------------------------------------- +Mon May 9 16:26:06 MDT 2011 - jfehlig@novell.com + +- bnc#691738 - Xen does not find device create with npiv block + xen-qemu-iscsi-fix.patch + ------------------------------------------------------------------- Tue May 3 11:11:05 MDT 2011 - carnold@novell.com diff --git a/xen.spec b/xen.spec index 2659aa2..393b10b 100644 --- a/xen.spec +++ b/xen.spec @@ -273,6 +273,7 @@ Patch10040: xenpaging.doc.patch # xenalyze Patch20000: xenalyze.gcc46.patch # Build patch +Patch99998: tmp-initscript-modprobe.patch Patch99999: tmp_build.patch Url: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -747,6 +748,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools #%patch10032 -p1 #%patch10033 -p1 #%patch10040 -p1 +%patch99998 -p1 %patch99999 -p1