On Fri, 4 Nov 2016 10:40:44 +0100
Cornelia Huck <[email protected]> wrote:

> On Fri, 04 Nov 2016 09:39:22 +0100
> Greg Kurz <[email protected]> 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 <[email protected]>
> > ---
> >  hw/virtio/vhost.c         |   13 -------------
> >  include/hw/virtio/vhost.h |    3 ---
> >  2 files changed, 16 deletions(-)  
> 
> Reviewed-by: Cornelia Huck <[email protected]>
> 


Reply via email to