Re: [PATCH vhost v7 4/6] virtio: vring_create_virtqueue: pass struct instead of multi parameters

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

 



On Thu, 28 Mar 2024 16:03:46 +0800
Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> wrote:

> --- a/drivers/s390/virtio/virtio_ccw.c
> +++ b/drivers/s390/virtio/virtio_ccw.c
> @@ -503,6 +503,7 @@ static struct virtqueue *virtio_ccw_setup_vq(struct virtio_device *vdev,
>  					     struct virtio_vq_config *cfg)
>  {
>  	struct virtio_ccw_device *vcdev = to_vc_device(vdev);
> +	struct vq_transport_config tp_cfg = {};
>  	bool (*notify)(struct virtqueue *vq);
>  	int err;
>  	struct virtqueue *vq = NULL;
> @@ -536,13 +537,14 @@ static struct virtqueue *virtio_ccw_setup_vq(struct virtio_device *vdev,
>  		goto out_err;
>  	}
>  	may_reduce = vcdev->revision > 0;
> -	vq = vring_create_virtqueue(i, info->num, KVM_VIRTIO_CCW_RING_ALIGN,
> -				    vdev, true, may_reduce,
> -				    cfg->ctx ? cfg->ctx[i] : false,
> -				    notify,
> -				    cfg->callbacks[i],
> -				    cfg->names[i]);
>  
> +	tp_cfg.num = info->num;
> +	tp_cfg.vring_align = KVM_VIRTIO_CCW_RING_ALIGN;
> +	tp_cfg.weak_barriers = true;
> +	tp_cfg.may_reduce_num = may_reduce;
> +	tp_cfg.notify = notify;
> +
> +	vq = vring_create_virtqueue(vdev, i, &tp_cfg, cfg);
>  	if (!vq) {
>  		/* For now, we fail if we can't get the requested size. */
>  		dev_warn(&vcdev->cdev->dev, "no vq\n");

For the virtio-ccw part:
Acked-by: Halil Pasic <pasic@xxxxxxxxxxxxx>




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux