From patchwork Mon Apr 6 16:55:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dustin Kirkland X-Patchwork-Id: 16617 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n36GtDR7021716 for ; Mon, 6 Apr 2009 16:55:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751472AbZDFQzM (ORCPT ); Mon, 6 Apr 2009 12:55:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751403AbZDFQzM (ORCPT ); Mon, 6 Apr 2009 12:55:12 -0400 Received: from an-out-0708.google.com ([209.85.132.241]:5230 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751195AbZDFQzK convert rfc822-to-8bit (ORCPT ); Mon, 6 Apr 2009 12:55:10 -0400 Received: by an-out-0708.google.com with SMTP id d14so1856825and.1 for ; Mon, 06 Apr 2009 09:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=W7qvbeRISAgy+Bcp1TXMeZP6bRehiIpYbSI7Fl3eyUo=; b=Q+aF+jzNhe/vhAM/VdG9UATlNbJmM0EZB/P4A4b6NELjhV2DH7q5nRglc5OeeWSpqV 23iPS+DX6X4TUD2PR0oDy6ERbr+wdeNMg9jjcf1aZTNSVMxSZUKcTNtif48wAQoQMy9/ t5gsFjKisKkiGNltouxNV922ujlTCNZIjiWmw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=U3zIbJks+LZiAgRWWf6tXXo8EcxiAnXcaYfw70AJHdgfn+Zqmb9rYh5nKCVsnGsL2H JeGSm91V4wVkW/H0RHhOt/73esSe7w5raIX1f4OwMRg3WB9JQZDKeEBY7VEoXMaWUEd5 sl48GIT3H8lr2fKBmGYJNoXakn831aoIVgCDY= MIME-Version: 1.0 Received: by 10.100.47.10 with SMTP id u10mr8265055anu.122.1239036903416; Mon, 06 Apr 2009 09:55:03 -0700 (PDT) In-Reply-To: References: Date: Mon, 6 Apr 2009 09:55:02 -0700 X-Google-Sender-Auth: b7f68e3618d9c95e Message-ID: Subject: Re: kvm-84 + virtio Ubuntu Hardy guests From: Dustin Kirkland To: "kvm@vger.kernel.org" Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, Mar 31, 2009 at 5:28 PM, Dustin Kirkland wrote: > I'm receiving a heavy volume of Ubuntu Jaunty Beta users reporting > that Jaunty hosts running kvm-84 (userspace and kernel) are not able > to boot previously-working Hardy guests (2.6.24 kernel) if virtio > networking is enabled [1].  Users report that if e1000 is used > instead, the guest is able to boot (with degraded network performance, > obviously).  Users are also reporting that this was not a problem when > kvm-82 was used in Jaunty (though we also merged libvirt 0.5.1 up to > 0.6.0 in roughly the same timeframe). ... > [1] https://bugs.launchpad.net/ubuntu/+source/kvm/+bug/331128 Howdy- Just a follow-up... Anthony was able to confirm this issue, and create a patch for KVM, which we're carrying in Ubuntu. It's a bit of a special-case hack, but I'm dropping it here for the sake of completeness. Basically, Hardy guests do not have working GSO (general segment offload) support. Some changes in kvm/libvirt appear to be exposing this, and breaking some guests when running virtio. This patch from Anthony basically disables this support in KVM userspace (until we have a better solution for auto-detecting GSO support or lack thereof). :-Dustin Work around broken virtio drivers in 2.6.26 Signed-off-by: Anthony Liguori if (tap_has_vnet_hdr(n->vc->vlan->first_client)) { --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index 9bce3a0..5b615f9 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -120,6 +120,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) if (tap_has_vnet_hdr(host)) { tap_using_vnet_hdr(host, 1); +#if 0 + /* Stop advertising advanced features until we work around the fact + * that this is totally broken in 2.6.26 kernels */ features |= (1 << VIRTIO_NET_F_CSUM); features |= (1 << VIRTIO_NET_F_GUEST_CSUM); features |= (1 << VIRTIO_NET_F_GUEST_TSO4); @@ -130,6 +133,7 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) features |= (1 << VIRTIO_NET_F_HOST_ECN); features |= (1 << VIRTIO_NET_F_MRG_RXBUF); /* Kernel can't actually handle UFO in software currently. */ +#endif } #endif @@ -374,8 +378,14 @@ static int receive_header(VirtIONet *n, struct iovec *iov, int iovcnt, struct virtio_net_hdr *hdr = iov[0].iov_base; int offset = 0; +#if 0 hdr->flags = 0; hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE; +#else + /* we need to clear out the whole header, including any garbage that may be + */ + memset(hdr, 0, sizeof(*hdr)); +#endif #ifdef TAP_VNET_HDR