From patchwork Thu Oct 29 14:43:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dustin Kirkland X-Patchwork-Id: 37197 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 04C43B7B92 for ; Fri, 30 Oct 2009 01:49:14 +1100 (EST) Received: from localhost ([127.0.0.1]:33745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3WJF-0002UB-LL for incoming@patchwork.ozlabs.org; Thu, 29 Oct 2009 10:49:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3WE4-0000jj-Ks for qemu-devel@nongnu.org; Thu, 29 Oct 2009 10:43:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3WE4-0000jL-1g for qemu-devel@nongnu.org; Thu, 29 Oct 2009 10:43:44 -0400 Received: from [199.232.76.173] (port=44245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3WE3-0000jB-Mc for qemu-devel@nongnu.org; Thu, 29 Oct 2009 10:43:43 -0400 Received: from adelie.canonical.com ([91.189.90.139]:52191) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3WE2-0007vb-PW for qemu-devel@nongnu.org; Thu, 29 Oct 2009 10:43:43 -0400 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1N3WE1-0007aM-RE; Thu, 29 Oct 2009 14:43:41 +0000 Received: from cpe-66-69-232-158.austin.res.rr.com ([66.69.232.158] helo=[192.168.1.146]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1N3WE1-0006jE-Hv; Thu, 29 Oct 2009 14:43:41 +0000 Subject: Re: [Qemu-devel] qemu-kvm-0.11 regression, crashes on older guests with virtio network From: Dustin Kirkland To: Mark McLoughlin In-Reply-To: <1256807803.10825.39.camel@blaa> References: <1256807803.10825.39.camel@blaa> Date: Thu, 29 Oct 2009 09:43:37 -0500 Message-ID: <1256827417.25064.122.camel@x200> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Scott Tsai , qemu-devel@nongnu.org, kvm@vger.kernel.org X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kirkland@canonical.com List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Thu, 2009-10-29 at 09:16 +0000, Mark McLoughlin wrote: > Hi Dustin, > > On Wed, 2009-10-28 at 14:22 -0500, Dustin Kirkland wrote: > > I believe that we have identified a regression in qemu-kvm-0.11.0. > > Regression versus which previous version of qemu-kvm? Okay, sorry for the ambiguity. I actually had to clarify this for myself. The regression is as compared to the kvm-84 package that the previous version of Ubuntu (9.04 Jaunty) carried. In this package, we carried the attached patch from Anthony Liguori. I had incorrectly assumed that this patch made it into the upstream tree. As Anthony stated in his earlier email, a different implementation of the fix from Rusty was committed instead. The fix as committed doesn't quite solve the problem as we're experiencing it. :-Dustin Work around broken virtio drivers in 2.6.26 Signed-off-by: Anthony Liguori 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 if (tap_has_vnet_hdr(n->vc->vlan->first_client)) {