~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to debian/qemu-system-x86.qemu-kvm.upstart

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-09-16 22:43:52 UTC
  • Revision ID: package-import@ubuntu.com-20130916224352-04wexx50ykhr6ypu
Tags: 1.5.0+dfsg-3ubuntu4
Re-introduce snippet in upstart job to load kvm modules if needed.
(LP: #1218459)

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
                exit 0
12
12
        fi
13
13
        [ -r /etc/default/qemu-kvm ] && . /etc/default/qemu-kvm
 
14
        # Load the appropriate module, respecting blacklists
 
15
        if grep -qs "^flags.* vmx" /proc/cpuinfo; then
 
16
                modprobe -b kvm_intel "$KVM_NESTED" || true
 
17
        elif grep -qs "^flags.* svm" /proc/cpuinfo; then
 
18
                modprobe -b kvm_amd || true
 
19
        fi
14
20
        # Enable KSM, respecting the default configuration file
15
21
        if [ "$KSM_ENABLED" = "1" ]; then
16
22
                [ -w /sys/kernel/mm/ksm/run ] && echo 1 > /sys/kernel/mm/ksm/run || true