From patchwork Sat Feb 2 16:11:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 217692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A94522C007E for ; Sun, 3 Feb 2013 03:11:32 +1100 (EST) Received: from localhost ([::1]:44276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1fgg-0004cN-5n for incoming@patchwork.ozlabs.org; Sat, 02 Feb 2013 11:11:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1fgZ-0004cG-LZ for qemu-devel@nongnu.org; Sat, 02 Feb 2013 11:11:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1fgX-0006Fa-Ql for qemu-devel@nongnu.org; Sat, 02 Feb 2013 11:11:23 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:36408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1fgX-0006Cg-IX for qemu-devel@nongnu.org; Sat, 02 Feb 2013 11:11:21 -0500 Received: from gandalf.tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id C7B41A01E2; Sat, 2 Feb 2013 20:11:11 +0400 (MSK) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id C1DB4518; Sat, 2 Feb 2013 20:11:10 +0400 (MSK) From: Michael Tokarev To: Anthony Liguori Date: Sat, 2 Feb 2013 20:11:06 +0400 Message-Id: <1359821466-19107-1-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: Jason Wang , Vadim Rozenfeld , Michael Tokarev , qemu-devel@nongnu.org, "Michael S. Tsirkin" Subject: [Qemu-devel] [PATCH bandaid for-1.4] fix virtio-net for win guests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This is a quick-n-dirty bandaid to let virtio-net to work on windows again. Merely removing newly added stuff (max_virtqueue_pairs) from struct virtio_net_config makes fixes it. Note this field of the structure is not actually used, as far as I can see - it is write-only, so it shouldn't affect anything, but it lets win guests to run with virtio-net and hence allows for wider testing. Signed-off-by: Michael Tokarev --- hw/virtio-net.c | 2 +- hw/virtio-net.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index e37358a..fb6b101 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -102,7 +102,7 @@ static void virtio_net_get_config(VirtIODevice *vdev, uint8_t *config) struct virtio_net_config netcfg; stw_p(&netcfg.status, n->status); - stw_p(&netcfg.max_virtqueue_pairs, n->max_queues); +//XXX doesnotwork stw_p(&netcfg.max_virtqueue_pairs, n->max_queues); memcpy(netcfg.mac, n->mac, ETH_ALEN); memcpy(config, &netcfg, sizeof(netcfg)); } diff --git a/hw/virtio-net.h b/hw/virtio-net.h index f5fea6e..faf44c5 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -76,7 +76,7 @@ struct virtio_net_config /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ uint16_t status; /* Max virtqueue pairs supported by the device */ - uint16_t max_virtqueue_pairs; +//XXXX doesnotwork uint16_t max_virtqueue_pairs; } QEMU_PACKED; /*