qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 1/3] vhost: adapt vhost_verify_ring_mappings() to virtio 1 ring layout
Date: Fri, 4 Nov 2016 10:52:35 +0100	[thread overview]
Message-ID: <20161104105235.5911260d@bahia> (raw)
In-Reply-To: <20161104103832.6cd2da3b.cornelia.huck@de.ibm.com>

On Fri, 4 Nov 2016 10:38:32 +0100
Cornelia Huck <cornelia.huck@de.ibm.com> wrote:

> On Fri, 04 Nov 2016 09:39:15 +0100
> Greg Kurz <groug@kaod.org> wrote:
> 
> > With virtio 1, the vring layout is split in 3 separate regions of
> > contiguous memory for the descriptor table, the available ring and the
> > used ring, as opposed with legacy virtio which uses a single region.
> > 
> > In case of memory re-mapping, the code ensures it doesn't affect the
> > vring mapping. This is done in vhost_verify_ring_mappings() which assumes
> > the device is legacy.
> > 
> > This patch changes vhost_verify_ring_mappings() to check the mappings of
> > each part of the vring separately.  
> 
> Add "This will work for legacy mappings as well." ?
> 

Sure!

> > 
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> > ---
> >  hw/virtio/vhost.c         |   79 ++++++++++++++++++++++++++++++++++-----------
> >  include/hw/virtio/vhost.h |    4 ++
> >  2 files changed, 64 insertions(+), 19 deletions(-)  
> 
> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> 

  reply	other threads:[~2016-11-04  9:52 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 [this message]
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
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=20161104105235.5911260d@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).