Ship sysctl file to fix s390x kvm (bz 1290589)

This commit is contained in:
Cole Robinson 2016-04-14 18:41:46 -04:00
parent fa6cd1dad5
commit c752245c96
2 changed files with 22 additions and 6 deletions

3
50-kvm-s390x.conf Normal file
View File

@ -0,0 +1,3 @@
# KVM S390 VM creation fails without this set
# https://www.mail-archive.com/kvm@vger.kernel.org/msg115576.html
vm.allocate_pgste = 1

View File

@ -60,7 +60,6 @@ Source1: qemu.binfmt
# Creates /dev/kvm
Source3: 80-kvm.rules
# KSM control scripts
Source4: ksm.service
Source5: ksm.sysconfig
@ -68,16 +67,19 @@ Source6: ksmctl.c
Source7: ksmtuned.service
Source8: ksmtuned
Source9: ksmtuned.conf
# guest agent service
Source10: qemu-guest-agent.service
# guest agent udev rules
Source11: 99-qemu-guest-agent.rules
# /etc/qemu/bridge.conf
Source12: bridge.conf
# qemu-kvm back compat wrapper
# qemu-kvm back compat wrapper installed as /usr/bin/qemu-kvm
Source13: qemu-kvm.sh
# For modprobe.d
# /etc/modprobe.d/kvm.conf
Source20: kvm.conf
# /etc/sysctl.d/50-kvm-s390x.conf
Source21: 50-kvm-s390x.conf
BuildRequires: SDL2-devel
BuildRequires: zlib-devel
@ -654,6 +656,12 @@ install -D -p -m 0644 %{_sourcedir}/kvm.conf %{buildroot}%{_sysconfdir}/modprobe
install -m 0644 %{_sourcedir}/qemu-guest-agent.service %{buildroot}%{_unitdir}
install -m 0644 %{_sourcedir}/99-qemu-guest-agent.rules %{buildroot}%{_udevdir}
%ifarch s390x
install -d %{buildroot}%{_sysconfdir}/sysctl.d
install -m 0644 %{_sourcedir}/50-kvm-s390.conf %{buildroot}%{_sysconfdir}/sysctl.d
%endif
# Install kvm specific bits
%if %{have_kvm}
mkdir -p %{buildroot}%{_bindir}/
@ -836,6 +844,10 @@ if test -f "$hostqemu"; then qemu-sanity-check --qemu=$hostqemu ||: ; fi
# a neverending source of trouble, so we just force it with chmod. For
# more info see: https://bugzilla.redhat.com/show_bug.cgi?id=950436
chmod --quiet 666 /dev/kvm || :
%ifarch s390x
%sysctl_apply 50-kvm-s390x.conf
%endif
%endif
@ -1101,6 +1113,7 @@ getent passwd qemu >/dev/null || \
%{_datadir}/%{name}/s390-ccw.img
%ifarch s390x
%{?kvm_files:}
%{_sysconfdir}/sysctl.d/50-kvm-s390x.conf
%endif