Blame kvm.modules

Glauber Costa b8bea8
#!/bin/sh
Glauber Costa b8bea8
Paolo Bonzini 34104a
grep vmx /proc/cpuinfo >/dev/null 2>&1 && vmx=1
Paolo Bonzini 34104a
grep svm /proc/cpuinfo >/dev/null 2>&1 && svm=1
Glauber Costa b8bea8
Paolo Bonzini 34104a
if [ "$vmx" ] || [ "$svm" ]; then
Paolo Bonzini 34104a
  [ "$vmx" ] && modprobe -b kvm-intel >/dev/null 2>&1
Paolo Bonzini 34104a
  [ "$svm" ] && modprobe -b kvm-amd >/dev/null 2>&1
Paolo Bonzini 34104a
Paolo Bonzini 34104a
  # no reason why vhost should not work with TCG, but currently it does not
Paolo Bonzini 34104a
  modprobe -b vhost-net >/dev/null 2>&1
Paolo Bonzini 34104a
else
Paolo Bonzini 34104a
  exit 0
Paolo Bonzini 34104a
fi