diff --git a/qemu-linux-user.spec b/qemu-linux-user.spec index b57f0cf0..1cf0f6f9 100644 --- a/qemu-linux-user.spec +++ b/qemu-linux-user.spec @@ -1,7 +1,7 @@ # # spec file for package qemu-linux-user # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index 2d691646..d6dd69e5 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -13,6 +13,11 @@ Wed Jun 1 17:14:40 UTC 2016 - brogers@suse.com ipxe-util-v5.24-perl-errors-on-redeclare.patch - Specify build time disk space requirements for ppc64 and ppc64le +------------------------------------------------------------------- +Wed Jun 1 14:31:51 UTC 2016 - agraf@suse.com + +- Add sysctl script and %post on s390x to allow kvm usage (bsc#975331) + ------------------------------------------------------------------- Thu May 26 16:23:33 UTC 2016 - brogers@suse.com diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index 4278fdd9..c36daf64 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -1,7 +1,7 @@ # # spec file for package qemu-testsuite # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -292,6 +292,9 @@ Requires: pwdutils Requires: timezone %if %{kvm_available} Requires(post): udev +%ifarch s390x +Requires(post): procps +%endif %endif Recommends: qemu-block-curl Recommends: qemu-tools @@ -990,6 +993,14 @@ exec %{_bindir}/qemu-system-x86_64 -machine accel=kvm "$@" %endif EOF chmod 755 %{buildroot}%{_bindir}/qemu-kvm +%ifarch s390x +mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d +cat > %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x <<- 'EOF' + # To allow KVM to run on s390x, we need to set the sysctl below + vm.allocate_pgste = 1 +EOF +chmod 644 %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x +%endif install -D -m 755 %{SOURCE2} %{buildroot}/usr/share/qemu/qemu-ifup install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz @@ -1040,6 +1051,9 @@ if [ "$(readlink -f /proc/1/root)" = "/" ]; then /sbin/udevadm trigger || : fi %endif +%ifarch s390x +sysctl vm.allocate_pgste=1 +%endif %endif %if 0%{?suse_version} >= 1130 @@ -1101,6 +1115,9 @@ fi %else %{_udevrulesdir}/60-kvm.rules %endif +%ifarch s390x +%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x +%endif %endif %files x86 diff --git a/qemu.changes b/qemu.changes index 2d691646..d6dd69e5 100644 --- a/qemu.changes +++ b/qemu.changes @@ -13,6 +13,11 @@ Wed Jun 1 17:14:40 UTC 2016 - brogers@suse.com ipxe-util-v5.24-perl-errors-on-redeclare.patch - Specify build time disk space requirements for ppc64 and ppc64le +------------------------------------------------------------------- +Wed Jun 1 14:31:51 UTC 2016 - agraf@suse.com + +- Add sysctl script and %post on s390x to allow kvm usage (bsc#975331) + ------------------------------------------------------------------- Thu May 26 16:23:33 UTC 2016 - brogers@suse.com diff --git a/qemu.spec b/qemu.spec index 8c1bf778..286d8591 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,7 +1,7 @@ # # spec file for package qemu # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -292,6 +292,9 @@ Requires: pwdutils Requires: timezone %if %{kvm_available} Requires(post): udev +%ifarch s390x +Requires(post): procps +%endif %endif Recommends: qemu-block-curl Recommends: qemu-tools @@ -990,6 +993,14 @@ exec %{_bindir}/qemu-system-x86_64 -machine accel=kvm "$@" %endif EOF chmod 755 %{buildroot}%{_bindir}/qemu-kvm +%ifarch s390x +mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d +cat > %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x <<- 'EOF' + # To allow KVM to run on s390x, we need to set the sysctl below + vm.allocate_pgste = 1 +EOF +chmod 644 %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x +%endif install -D -m 755 %{SOURCE2} %{buildroot}/usr/share/qemu/qemu-ifup install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz @@ -1040,6 +1051,9 @@ if [ "$(readlink -f /proc/1/root)" = "/" ]; then /sbin/udevadm trigger || : fi %endif +%ifarch s390x +sysctl vm.allocate_pgste=1 +%endif %endif %if 0%{?suse_version} >= 1130 @@ -1101,6 +1115,9 @@ fi %else %{_udevrulesdir}/60-kvm.rules %endif +%ifarch s390x +%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x +%endif %endif %files x86 diff --git a/qemu.spec.in b/qemu.spec.in index 7081e825..ea1a085d 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -245,6 +245,9 @@ Requires: pwdutils Requires: timezone %if %{kvm_available} Requires(post): udev +%ifarch s390x +Requires(post): procps +%endif %endif Recommends: qemu-block-curl Recommends: qemu-tools @@ -898,6 +901,14 @@ exec %{_bindir}/qemu-system-x86_64 -machine accel=kvm "$@" %endif EOF chmod 755 %{buildroot}%{_bindir}/qemu-kvm +%ifarch s390x +mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d +cat > %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x <<- 'EOF' + # To allow KVM to run on s390x, we need to set the sysctl below + vm.allocate_pgste = 1 +EOF +chmod 644 %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x +%endif install -D -m 755 %{SOURCE2} %{buildroot}/usr/share/qemu/qemu-ifup install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz @@ -949,6 +960,9 @@ if [ "$(readlink -f /proc/1/root)" = "/" ]; then /sbin/udevadm trigger || : fi %endif +%ifarch s390x +sysctl vm.allocate_pgste=1 +%endif %endif %if 0%{?suse_version} >= 1130 @@ -1010,6 +1024,9 @@ fi %else %{_udevrulesdir}/60-kvm.rules %endif +%ifarch s390x +%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x +%endif %endif %files x86