qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Jason Wang <jasowang@redhat.com>,
	Vadim Rozenfeld <vrozenfe@redhat.com>,
	qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH bandaid for-1.4] fix virtio-net for win guests
Date: Sat, 02 Feb 2013 17:09:31 -0600	[thread overview]
Message-ID: <87ehgy1ff8.fsf@codemonkey.ws> (raw)
In-Reply-To: <1359821466-19107-1-git-send-email-mjt@msgid.tls.msk.ru>

Michael Tokarev <mjt@tls.msk.ru> 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 <mjt@tls.msk.ru>

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

      reply	other threads:[~2013-02-02 23:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-02 16:11 [Qemu-devel] [PATCH bandaid for-1.4] fix virtio-net for win guests Michael Tokarev
2013-02-02 23:09 ` Anthony Liguori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehgy1ff8.fsf@codemonkey.ws \
    --to=aliguori@us.ibm.com \
    --cc=jasowang@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vrozenfe@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).