Add ppc64 kvm memlock file (bz 1293024)

This commit is contained in:
Cole Robinson 2016-10-19 12:34:26 -04:00
parent 98de78b65f
commit fa4cd5da64
2 changed files with 20 additions and 0 deletions

12
95-kvm-ppc64-memlock.conf Normal file
View File

@ -0,0 +1,12 @@
# The KVM HV implementation on Power can require a significant amount
# of unswappable memory (about half of which also needs to be host
# physically contiguous) to hold the guest's Hash Page Table (HPT) -
# roughly 1/64th of the guest's RAM size, minimum 16MiB.
#
# These limits allow unprivileged users to start smallish VMs, such as
# those used by libguestfs.
#
# https://bugzilla.redhat.com/show_bug.cgi?id=1293024
#
* hard memlock 65536
* soft memlock 65536

View File

@ -96,6 +96,8 @@ Source13: qemu-kvm.sh
Source20: kvm.conf
# /etc/sysctl.d/50-kvm-s390x.conf
Source21: 50-kvm-s390x.conf
# /etc/security/limits.d/95-kvm-ppc64-memlock.conf
Source22: 95-kvm-ppc64-memlock.conf
# Adjust spice gl version check to expect F24 backported version
# Not for upstream, f24 only
@ -885,6 +887,11 @@ install -d %{buildroot}%{_sysconfdir}/sysctl.d
install -m 0644 %{_sourcedir}/50-kvm-s390x.conf %{buildroot}%{_sysconfdir}/sysctl.d
%endif
%ifarch %{power64}
install -d %{buildroot}%{_sysconfdir}/security/limits.d
install -m 0644 %{_sourcedir}/50-kvm-ppc64-memlock.conf %{buildroot}%{_sysconfdir}/security/limits.d
%endif
# Install kvm specific bits
%if %{have_kvm}
@ -1539,6 +1546,7 @@ getent passwd qemu >/dev/null || \
%{_datadir}/%{name}/u-boot.e500
%ifarch %{power64}
%{?kvm_files:}
%{_sysconfdir}/security/limits.d/95-kvm-ppc64-memlock.conf
%endif