From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1mDL-0003dX-GS for qemu-devel@nongnu.org; Sat, 02 Feb 2013 18:09:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1mDK-0001Ga-D2 for qemu-devel@nongnu.org; Sat, 02 Feb 2013 18:09:39 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:39968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1mDK-0001GW-9n for qemu-devel@nongnu.org; Sat, 02 Feb 2013 18:09:38 -0500 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 2 Feb 2013 18:09:38 -0500 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 0C9E438C8045 for ; Sat, 2 Feb 2013 18:09:36 -0500 (EST) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r12N9Z8i21954766 for ; Sat, 2 Feb 2013 18:09:35 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r12N9ZOt029091 for ; Sat, 2 Feb 2013 18:09:35 -0500 From: Anthony Liguori In-Reply-To: <1359821466-19107-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1359821466-19107-1-git-send-email-mjt@msgid.tls.msk.ru> Date: Sat, 02 Feb 2013 17:09:31 -0600 Message-ID: <87ehgy1ff8.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH bandaid for-1.4] fix virtio-net for win guests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Jason Wang , Vadim Rozenfeld , qemu-devel@nongnu.org, "Michael S. Tsirkin" Michael Tokarev writes: > 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 It's write-only because it's read by the guest. I just sent a series that should give us a reasonable work around. I'm pretty confident that the guest driver is misbehaving. I don't think it's reasonable to disable mq by default just because there's a broken driver out there. However, with my series, existing guests that are using a fixed machine model should work with no changes. Regards, Anthony Liguori > --- > 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; > > /* > -- > 1.7.10.4