From f0a3f8f73363add17018f694e1223be4f5acea42 2019-10-21 18:32:49 From: burnbabyburn <2515038+burnbabyburn@users.noreply.github.com> Date: 2019-10-21 18:32:49 Subject: [PATCH] Update 13-kernel.sh --- diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index 46e70ff..9d1744c 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -128,6 +128,8 @@ if [ "$BUILD_KERNEL" = true ] ; then # enable basic KVM support; see https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=210546&start=25#p1300453 if [ "$KERNEL_VIRT" = true ] && { [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ]; } ; then + set_kernel_config CONFIG_HAVE_KVM y + set_kernel_config CONFIG_HIGH_RES_TIMERS y set_kernel_config CONFIG_HAVE_KVM_IRQCHIP y set_kernel_config CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL y set_kernel_config CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT y @@ -142,19 +144,21 @@ if [ "$BUILD_KERNEL" = true ] ; then set_kernel_config CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT y set_kernel_config CONFIG_KVM_MMIO y set_kernel_config CONFIG_KVM_VFIO y + set_kernel_config CONFIG_KVM_MMU_AUDIT y set_kernel_config CONFIG_VHOST m set_kernel_config CONFIG_VHOST_CROSS_ENDIAN_LEGACY y set_kernel_config CONFIG_VHOST_NET m set_kernel_config CONFIG_VIRTUALIZATION y - - set_kernel_config CONFIG_MMU_NOTIFIER y - - # erratum - set_kernel_config ARM64_ERRATUM_834220 y - - # https://sourceforge.net/p/kvm/mailman/message/18440797/ - set_kernel_config CONFIG_PREEMPT_NOTIFIERS y - fi + set_kernel_config CONFIG_MMU_NOTIFIER y + + set_kernel_config CONFIG_SLAB_FREELIST_RANDOM=y + set_kernel_config CONFIG_SLAB_FREELIST_HARDENED=y + + # erratum + set_kernel_config ARM64_ERRATUM_834220 y + # https://sourceforge.net/p/kvm/mailman/message/18440797/ + set_kernel_config CONFIG_PREEMPT_NOTIFIERS y + fi # enable apparmor,integrity audit, if [ "$KERNEL_SECURITY" = true ] ; then