diff -u qemu-kvm-0.11.0/debian/changelog qemu-kvm-0.11.0/debian/changelog --- qemu-kvm-0.11.0/debian/changelog +++ qemu-kvm-0.11.0/debian/changelog @@ -1,3 +1,14 @@ +qemu-kvm (0.11.0-0ubuntu6.1) karmic-proposed; urgency=low + + * debian/patches/12_whitelist_host_virtio_networking_features.patch: + fix hardy+virtio guest crash, LP: #458521 + * debian/kvm-ok: check for other common reasons why KVM might not be + usable, LP: #452323 + * debian/control: build-depend on libcurl devel, to allow booting from + iso's over http, LP: #453441 + + -- Dustin Kirkland Thu, 29 Oct 2009 11:36:18 -0500 + qemu-kvm (0.11.0-0ubuntu6) karmic; urgency=low * debian/control: Version the conflicts/replaces with qemu and kvm so that diff -u qemu-kvm-0.11.0/debian/control qemu-kvm-0.11.0/debian/control --- qemu-kvm-0.11.0/debian/control +++ qemu-kvm-0.11.0/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ubuntu Developers Build-Depends: debhelper (>= 7), pkg-config, quilt (>= 0.40), - bzip2, uuid-dev, zlib1g-dev, libsdl1.2-dev, libasound2-dev, libgnutls-dev, + bzip2, uuid-dev, zlib1g-dev, libsdl1.2-dev, libasound2-dev, libcurl4-gnutls-dev, libgnutls-dev, libncurses5-dev, libpci-dev, libpulse-dev, nasm, texi2html, bcc, iasl, device-tree-compiler [powerpc], sysv-rc (>= 2.86.ds1-14.1ubuntu2), libx11-dev Standards-Version: 3.8.3 diff -u qemu-kvm-0.11.0/debian/kvm-ok qemu-kvm-0.11.0/debian/kvm-ok --- qemu-kvm-0.11.0/debian/kvm-ok +++ qemu-kvm-0.11.0/debian/kvm-ok @@ -3,6 +3,8 @@ # kvm-ok - check whether the CPU we're running on supports KVM acceleration # Copyright (C) 2008 Canonical Ltd. # +# Authors: Dustin Kirkland +# # 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. @@ -15,7 +17,34 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +ERROR=0 + +# First, check cpu flags if egrep "flags.*:.*(svm|vmx)" /proc/cpuinfo > /dev/null; then + echo "INFO: Your CPU supports KVM extensions" +else + echo "INFO: Your CPU does not support KVM extensions" + ERROR=1 +fi + +# Now, check that the device exists +if [ -e /dev/kvm ]; then + echo "INFO: /dev/kvm exists" +else + echo "INFO: /dev/kvm does not exist" + echo "HINT: sudo modprobe kvm" + ERROR=1 +fi + +# Check for bios messages in dmesg +if dmesg | grep -qs "kvm: disabled by bios"; then + echo "INFO: KVM is disable by your BIOS" + echo "HINT: Enter your BIOS setup and enable Virtualization Technology (VT)" + ERROR=1 +fi + +# Print verdict +if [ "$ERROR" = "0" ]; then echo "KVM acceleration can be used" exit 0 else diff -u qemu-kvm-0.11.0/debian/patches/series qemu-kvm-0.11.0/debian/patches/series --- qemu-kvm-0.11.0/debian/patches/series +++ qemu-kvm-0.11.0/debian/patches/series @@ -9,0 +10 @@ +12_whitelist_host_virtio_networking_features.patch only in patch2: unchanged: --- qemu-kvm-0.11.0.orig/debian/patches/12_whitelist_host_virtio_networking_features.patch +++ qemu-kvm-0.11.0/debian/patches/12_whitelist_host_virtio_networking_features.patch @@ -0,0 +1,41 @@ +whitelist host virtio networking features + +This patch is a followup to 8eca6b1bc770982595db2f7207c65051572436cb, +fixing crashes when guests with 2.6.25 virtio drivers have saturated +virtio network connections. + +https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/458521 + +That patch should have been whitelisting *_HOST_* rather than the the +*_GUEST_* features. + +I tested this by running an Ubuntu 8.04 Hardy guest (2.6.24 kernel + +2.6.25-virtio driver). I saturated both the incoming, and outgoing +network connection with nc, seeing sustained 6MB/s up and 6MB/s down +bitrates for ~20 minutes. Previously, this crashed immediately. Now, +the guest does not crash and maintains network connectivity throughout +the test. + +Signed-off-by: Dustin Kirkland +Signed-off-by: Mark McLoughlin +Tested-by: Dustin Kirkland + +diff --git a/hw/virtio-net.c b/hw/virtio-net.c +index ce8e6cb..27834fa 100644 +--- a/hw/virtio-net.c ++++ b/hw/virtio-net.c +@@ -164,10 +164,10 @@ static uint32_t virtio_net_bad_features(VirtIODevice *vdev) + /* Linux kernel 2.6.25. It understood MAC (as everyone must), + * but also these: */ + features |= (1 << VIRTIO_NET_F_MAC); +- features |= (1 << VIRTIO_NET_F_GUEST_CSUM); +- features |= (1 << VIRTIO_NET_F_GUEST_TSO4); +- features |= (1 << VIRTIO_NET_F_GUEST_TSO6); +- features |= (1 << VIRTIO_NET_F_GUEST_ECN); ++ features |= (1 << VIRTIO_NET_F_CSUM); ++ features |= (1 << VIRTIO_NET_F_HOST_TSO4); ++ features |= (1 << VIRTIO_NET_F_HOST_TSO6); ++ features |= (1 << VIRTIO_NET_F_HOST_ECN); + + return features & virtio_net_get_features(vdev); + }