diff -u kvm-72+dfsg/debian/changelog kvm-72+dfsg/debian/changelog --- kvm-72+dfsg/debian/changelog +++ kvm-72+dfsg/debian/changelog @@ -1,3 +1,11 @@ +kvm (1:72+dfsg-1ubuntu4) intrepid; urgency=low + + * debian/kvm-ok: simple script to determine of the cpu supports kvm + acceleration (LP: #188878) + * debian/rules: install the kvm-ok binary into /usr/bin/kvm-ok + + -- Dustin Kirkland Mon, 22 Sep 2008 12:09:47 -0500 + kvm (1:72+dfsg-1ubuntu3) intrepid; urgency=low * debian/control: Trivial update to description, to note that KVM works on diff -u kvm-72+dfsg/debian/rules kvm-72+dfsg/debian/rules --- kvm-72+dfsg/debian/rules +++ kvm-72+dfsg/debian/rules @@ -166,6 +166,8 @@ install -m 0755 kvm_stat user/kvmctl user/kvmtrace user/kvmtrace_format \ $(CURDIR)/debian/tmp/usr/bin/ + install -D -m 0755 debian/kvm-ok $(CURDIR)/debian/tmp/usr/bin/kvm-ok + # kvm-source install -D -m 0755 debian/reportbug-hook.sh $(CURDIR)/debian/tmp/usr/share/bug/kvm-source # Copy only the driver source to the proper location only in patch2: unchanged: --- kvm-72+dfsg.orig/debian/kvm-ok +++ kvm-72+dfsg/debian/kvm-ok @@ -0,0 +1,24 @@ +#!/bin/sh -e +# +# kvm-ok - check whether the CPU we're running on supports KVM acceleration +# Copyright (C) 2008 Canonical Ltd. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2, +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +if egrep "flags.*:.*(svm|vmx)" /proc/cpuinfo > /dev/null; then + echo "KVM acceleration can be used" + exit 0 +else + echo "KVM acceleration can NOT be used" + exit 1 +fi