qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] vhost: drop legacy vring layout bits


From: Greg Kurz
Subject: Re: [Qemu-devel] [PATCH 2/3] vhost: drop legacy vring layout bits
Date: Fri, 4 Nov 2016 10:53:20 +0100

On Fri, 4 Nov 2016 10:40:44 +0100
Cornelia Huck <address@hidden> wrote:

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]