Re: [RFC PATCH 01/20] virtio: Add support for guest setting of queue size

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

 



I didn't receive the whole series of patches, so answering to this one.
As to me - great work!
Peter, how do you think, is there a chance for this to be applied 
upstream or, say, "transport"
property is an issue and it will have to be removed causing all this 
stuff to be reworked again?

On 10/23/2012 03:55 PM, fred.konrad@xxxxxxxxxxxxx wrote:
> From: Peter Maydell <peter.maydell@xxxxxxxxxx>
>
> The MMIO virtio transport spec allows the guest to tell the host how
> large the queue size is. Add virtio_queue_set_num() function which
> implements this in the QEMU common virtio support code.
>
> Signed-off-by: Peter Maydell <peter.maydell@xxxxxxxxxx>
> Signed-off-by: Evgeny Voevodin <e.voevodin@xxxxxxxxxxx>
> Signed-off-by: KONRAD Frederic <fred.konrad@xxxxxxxxxxxxx>
> ---
>   hw/virtio.c | 6 ++++++
>   hw/virtio.h | 1 +
>   2 files changed, 7 insertions(+)
>
> diff --git a/hw/virtio.c b/hw/virtio.c
> index 6821092..f5faf5c 100644
> --- a/hw/virtio.c
> +++ b/hw/virtio.c
> @@ -642,6 +642,12 @@ target_phys_addr_t virtio_queue_get_addr(VirtIODevice *vdev, int n)
>       return vdev->vq[n].pa;
>   }
>   
> +void virtio_queue_set_num(VirtIODevice *vdev, int n, int num)
> +{
> +    vdev->vq[n].vring.num = num;
> +    virtqueue_init(&vdev->vq[n]);
> +}
> +
>   int virtio_queue_get_num(VirtIODevice *vdev, int n)
>   {
>       return vdev->vq[n].vring.num;
> diff --git a/hw/virtio.h b/hw/virtio.h
> index 80de375..dcafd13 100644
> --- a/hw/virtio.h
> +++ b/hw/virtio.h
> @@ -180,6 +180,7 @@ void virtio_config_writew(VirtIODevice *vdev, uint32_t addr, uint32_t data);
>   void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data);
>   void virtio_queue_set_addr(VirtIODevice *vdev, int n, target_phys_addr_t addr);
>   target_phys_addr_t virtio_queue_get_addr(VirtIODevice *vdev, int n);
> +void virtio_queue_set_num(VirtIODevice *vdev, int n, int num);
>   int virtio_queue_get_num(VirtIODevice *vdev, int n);
>   void virtio_queue_notify(VirtIODevice *vdev, int n);
>   uint16_t virtio_queue_vector(VirtIODevice *vdev, int n);


-- 
Kind regards,
Evgeny Voevodin,
Technical Leader,
Mobile Group,
Samsung Moscow Research Center,
e-mail: e.voevodin@xxxxxxxxxxx

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux