On Fri, 15 Jan 2016 13:41:57 +0100
Paolo Bonzini <pbonz...@redhat.com> wrote:

> From: Vincenzo Maffione <v.maffi...@gmail.com>
> 
> The virtqueue_pop() implementation needs to check if the avail ring
> contains some pending buffers. To perform this check, it is not
> always necessary to fetch the avail_idx in the VQ memory, which is
> expensive. This patch introduces a shadow variable tracking avail_idx
> and modifies virtio_queue_empty() to access avail_idx in physical
> memory only when necessary.
> 
> Signed-off-by: Vincenzo Maffione <v.maffi...@gmail.com>
> Message-Id: 
> <b617d6459902773d9f4ab843bfaca764f5af8eda.1450218353.git.v.maffi...@gmail.com>
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  hw/virtio/virtio.c | 25 +++++++++++++++++++++----
>  1 file changed, 21 insertions(+), 4 deletions(-)

Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com>


Reply via email to