/etc/sysconfig/modules/kvm.modules runs 'grep' twice to see if the CPU supports VMX or SVM. This can be handled without calling out to external programs, like so:
#!/bin/bash
case "$(</proc/cpuinfo)" in
*vmx*) vmx=1 ;;
*svm*) svm=1 ;;
esac
[ "$vmx" ] && modprobe -b kvm-intel >/dev/null 2>&1
[ "$svm" ] && modprobe -b kvm-amd >/dev/null 2>&1
[ "$vmx" -o "$svm" ] && modprobe -b virtio-net >/dev/null 2>&1
Sure, it's minor, but it's faster and functionally equivalent. Can't hurt, right?