From e7a45f871f4071f367f5610e776cafdbbc506ff9 Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Thu, 9 Feb 2012 14:35:05 -0600 Subject: [PATCH] boot speedup optimization with kvm.modules BZ#785291 --- kvm.modules | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/kvm.modules b/kvm.modules index a00fbe7..6574c3f 100755 --- a/kvm.modules +++ b/kvm.modules @@ -1,11 +1,10 @@ #!/bin/sh -if [ $(grep -c vmx /proc/cpuinfo) -ne 0 ]; then - modprobe -b kvm-intel >/dev/null 2>&1 - modprobe -b vhost-net >/dev/null 2>&1 -fi +case "$(/dev/null 2>&1 - modprobe -b vhost-net >/dev/null 2>&1 -fi +[ "$vmx" ] && modprobe -b kvm-intel >/dev/null 2>&1 +[ "$svm" ] && modprobe -b kvm-amd >/dev/null 2>&1 +[ "$vmx" -o "$svm" ] && modprobe -b vhost-net >/dev/null 2>&1