From: Greg Kurz <groug@kaod.org>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-devel@nongnu.org, Pierre Morel <pmorel@linux.vnet.ibm.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] vhost: drop legacy vring layout bits
Date: Fri, 4 Nov 2016 10:53:20 +0100 [thread overview]
Message-ID: <20161104105320.7930cb60@bahia> (raw)
In-Reply-To: <20161104104044.63723223.cornelia.huck@de.ibm.com>
On Fri, 4 Nov 2016 10:40:44 +0100
Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> On Fri, 04 Nov 2016 09:39:22 +0100
> Greg Kurz <groug@kaod.org> wrote:
>
> > The legacy vring layout is not used anymore.
>
> "as we use separate mappings even for legacy devices." ?
>
> Otherwise, this may confuse the casual reader into thinking legacy is
> not supported anymore.
>
Yeah you're right. I'll add this too.
> > This patch simply removes it.
> >
> > This also fixes a bug with virtio 1 devices when the vring descriptor table
> > is mapped at a higher address than the used vring because the following
> > function may return an insanely great value:
> >
> > hwaddr virtio_queue_get_ring_size(VirtIODevice *vdev, int n)
> > {
> > return vdev->vq[n].vring.used - vdev->vq[n].vring.desc +
> > virtio_queue_get_used_size(vdev, n);
> > }
> >
> > and the mapping fails.
> >
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> > ---
> > hw/virtio/vhost.c | 13 -------------
> > include/hw/virtio/vhost.h | 3 ---
> > 2 files changed, 16 deletions(-)
>
> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>
next prev parent reply other threads:[~2016-11-04 9:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 8:39 [Qemu-devel] [PATCH 0/3] vhost: fix vring layout Greg Kurz
2016-11-04 8:39 ` [Qemu-devel] [PATCH 1/3] vhost: adapt vhost_verify_ring_mappings() to virtio 1 ring layout Greg Kurz
2016-11-04 9:38 ` Cornelia Huck
2016-11-04 9:52 ` Greg Kurz
2016-11-04 8:39 ` [Qemu-devel] [PATCH 2/3] vhost: drop legacy vring layout bits Greg Kurz
2016-11-04 9:40 ` Cornelia Huck
2016-11-04 9:53 ` Greg Kurz [this message]
2016-11-04 8:39 ` [Qemu-devel] [PATCH 3/3] virtio: drop virtio_queue_get_ring_{size, addr}() Greg Kurz
2016-11-04 9:42 ` Cornelia Huck
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=20161104105320.7930cb60@bahia \
--to=groug@kaod.org \
--cc=cornelia.huck@de.ibm.com \
--cc=mst@redhat.com \
--cc=pmorel@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/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).