From ea9d7028da055c08cb76feab029b052dbde5f96107555ecabff5275655522b63 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 12 Sep 2016 13:29:42 +0000 Subject: [PATCH] - bsc#979002 - add 60-persistent-xvd.rules and helper script also to initrd, add the relevant dracut helper - bnc#953518 - unplug also SCSI disks in qemu-xen-traditional for upstream unplug protocol OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=449 --- ioemu-disable-scsi.patch | 12 ++++++++++++ xen.changes | 12 ++++++++++++ xen.spec | 25 +++++++++++++++++++++++-- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/ioemu-disable-scsi.patch b/ioemu-disable-scsi.patch index 7657f5e..eced8c5 100644 --- a/ioemu-disable-scsi.patch +++ b/ioemu-disable-scsi.patch @@ -63,6 +63,18 @@ Index: xen-4.4.0-testing/tools/qemu-xen-traditional-dir-remote/hw/xen_platform.c =================================================================== --- xen-4.4.0-testing.orig/tools/qemu-xen-traditional-dir-remote/hw/xen_platform.c +++ xen-4.4.0-testing/tools/qemu-xen-traditional-dir-remote/hw/xen_platform.c +@@ -156,8 +156,10 @@ static void platform_fixed_ioport_write2 + /* Unplug devices. Value is a bitmask of which devices to + unplug, with bit 0 the IDE devices, bit 1 the network + devices, and bit 2 the non-primary-master IDE devices. */ +- if (val & UNPLUG_ALL_IDE_DISKS) ++ if (val & UNPLUG_ALL_IDE_DISKS) { + ide_unplug_harddisks(); ++ pci_unplug_scsi(); ++ } + if (val & UNPLUG_ALL_NICS) { + pci_unplug_netifs(); + net_tap_shutdown_all(); @@ -364,6 +364,8 @@ static void suse_platform_ioport_write(v * If it controlled just disk or just LAN, it would use 8 below. */ fprintf(logfile, "Disconnect IDE hard disk...\n"); diff --git a/xen.changes b/xen.changes index b414431..8e307cf 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Sep 12 13:10:21 UTC 2016 - ohering@suse.de + +- bsc#979002 - add 60-persistent-xvd.rules and helper script + also to initrd, add the relevant dracut helper + +------------------------------------------------------------------- +Mon Sep 5 11:39:21 UTC 2016 - ohering@suse.de + +- bnc#953518 - unplug also SCSI disks in qemu-xen-traditional for + upstream unplug protocol + ------------------------------------------------------------------- Tue Aug 23 08:07:46 MDT 2016 - carnold@suse.com diff --git a/xen.spec b/xen.spec index 3066191..5356afa 100644 --- a/xen.spec +++ b/xen.spec @@ -165,7 +165,7 @@ BuildRequires: xorg-x11-util-devel %endif %endif -Version: 4.7.0_10 +Version: 4.7.0_11 Release: 0 Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel) License: GPL-2.0 @@ -418,7 +418,8 @@ Requires: bridge-utils %if %suse_version >= 1315 Requires: grub2-x86_64-xen %endif -Requires: qemu-ovmf-x86_64 +# Uncomment when ovmf is supported +#Requires: qemu-ovmf-x86_64 Requires: qemu-x86 %endif %ifarch %arm aarch64 @@ -820,6 +821,25 @@ KERNEL=="xvd*[0-9]", ENV{VBD_HD_SYMLINK}=="hd[a-d]", SYMLINK+="$env{VBD_HD_SYML LABEL="xvd_aliases_end" _EOR_ # +dracut_moduledir=$RPM_BUILD_ROOT/usr/lib/dracut/modules.d/50%{name}-tools-domU +mkdir -p ${dracut_moduledir} +tee ${dracut_moduledir}/module-setup.sh <<'_EOS_' +#!/bin/bash +check() { + require_binaries xenstore-read || return 1 + return 0 +} + +depends() { + return 0 +} +install() { + inst_multiple xenstore-read + inst_multiple ${udevdir}/%{name}-tools-domU.sh + inst_rules 60-persistent-xvd.rules +} +_EOS_ +# udev_programdir=$RPM_BUILD_ROOT/usr/lib/udev mkdir -p ${udev_programdir} tee ${udev_programdir}/%{name}-tools-domU.sh <<'_EOS_' @@ -1289,6 +1309,7 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper /bin/xenstore-* %if %{?with_systemd}0 /usr/lib/udev +/usr/lib/dracut %endif %files devel