search for: vdpasim_queue_max

Displaying 20 results from an estimated 22 matches for "vdpasim_queue_max".

2020 Apr 10
2
[PATCH -next] vdpasim: remove unused variable 'ret'
...sim.c @@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev) static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) { struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; - int ret; - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, - VDPASIM_QUEUE_MAX, false, - (struct vring_desc *)(uintptr_t)vq->desc_addr, - (struct vring_avail *) - (uintptr_t)vq->driver_addr, - (struct vring_used *) - (uintptr_t)vq->device_addr); + vringh_init_iotlb(&vq->vring, vdpasim_features, + VDPASIM_QUEUE_MAX, false, + (struct vring...
2020 Apr 10
2
[PATCH -next] vdpasim: remove unused variable 'ret'
...sim.c @@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev) static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) { struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; - int ret; - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, - VDPASIM_QUEUE_MAX, false, - (struct vring_desc *)(uintptr_t)vq->desc_addr, - (struct vring_avail *) - (uintptr_t)vq->driver_addr, - (struct vring_used *) - (uintptr_t)vq->device_addr); + vringh_init_iotlb(&vq->vring, vdpasim_features, + VDPASIM_QUEUE_MAX, false, + (struct vring...
2020 May 06
0
[PATCH -next] vdpasim: remove unused variable 'ret'
...ruct vdpasim *dev_to_sim(struct device *dev) > static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) > { > struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; > - int ret; > > - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, > - VDPASIM_QUEUE_MAX, false, > - (struct vring_desc *)(uintptr_t)vq->desc_addr, > - (struct vring_avail *) > - (uintptr_t)vq->driver_addr, > - (struct vring_used *) > - (uintptr_t)vq->device_addr); > + vringh_init_iotlb(&vq->vring, vdpasim_features, > + VDPASIM_QU...
2020 Feb 10
0
[PATCH V2 5/5] vdpasim: vDPA device simulator
...*vdpasim_dev; + +struct vdpasim_virtqueue { + struct vringh vring; + struct vringh_kiov iov; + unsigned short head; + bool ready; + u64 desc_addr; + u64 device_addr; + u64 driver_addr; + u32 num; + void *private; + irqreturn_t (*cb)(void *data); +}; + +#define VDPASIM_QUEUE_ALIGN PAGE_SIZE +#define VDPASIM_QUEUE_MAX 256 +#define VDPASIM_DEVICE_ID 0x1 +#define VDPASIM_VENDOR_ID 0 +#define VDPASIM_VQ_NUM 0x2 +#define VDPASIM_NAME "vdpasim-netdev" + +static u64 vdpasim_features = (1ULL << VIRTIO_F_ANY_LAYOUT) | + (1ULL << VIRTIO_F_VERSION_1) | + (1ULL << VIRTIO_F_IOMMU...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...;GPL v2" + +struct vdpasim_virtqueue { + struct vringh vring; + struct vringh_kiov iov; + unsigned short head; + bool ready; + u64 desc_addr; + u64 device_addr; + u64 driver_addr; + u32 num; + void *private; + irqreturn_t (*cb)(void *data); +}; + +#define VDPASIM_QUEUE_ALIGN PAGE_SIZE +#define VDPASIM_QUEUE_MAX 256 +#define VDPASIM_DEVICE_ID 0x1 +#define VDPASIM_VENDOR_ID 0 +#define VDPASIM_VQ_NUM 0x2 +#define VDPASIM_NAME "vdpasim-netdev" + +static u64 vdpasim_features = (1ULL << VIRTIO_F_ANY_LAYOUT) | + (1ULL << VIRTIO_F_VERSION_1) | + (1ULL << VIRTIO_F_IOMMU...
2023 Mar 23
1
[PATCH v3 4/8] vringh: support VA with iotlb
...(uintptr_t)vq->driver_addr, > @@ -92,7 +92,7 @@ static void vdpasim_vq_reset(struct vdpasim *vdpasim, > vq->cb = NULL; > vq->private = NULL; > vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features, > - VDPASIM_QUEUE_MAX, false, NULL, NULL, NULL); > + VDPASIM_QUEUE_MAX, false, false, NULL, NULL, NULL); > > vq->vring.notify = NULL; > } > diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c > index 0ba3ef809e48..72c88519329a 100644 > --- a/drivers/vhost...
2020 Feb 10
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...; > + struct vringh_kiov iov; > + unsigned short head; > + bool ready; > + u64 desc_addr; > + u64 device_addr; > + u64 driver_addr; > + u32 num; > + void *private; > + irqreturn_t (*cb)(void *data); > +}; > + > +#define VDPASIM_QUEUE_ALIGN PAGE_SIZE > +#define VDPASIM_QUEUE_MAX 256 > +#define VDPASIM_DEVICE_ID 0x1 > +#define VDPASIM_VENDOR_ID 0 > +#define VDPASIM_VQ_NUM 0x2 > +#define VDPASIM_NAME "vdpasim-netdev" > + > +static u64 vdpasim_features = (1ULL << VIRTIO_F_ANY_LAYOUT) | > + (1ULL << VIRTIO_F_VERSION_1) | >...
2023 Mar 21
1
[PATCH v3 4/8] vringh: support VA with iotlb
...*)(uintptr_t)vq->desc_addr, (struct vring_avail *) (uintptr_t)vq->driver_addr, @@ -92,7 +92,7 @@ static void vdpasim_vq_reset(struct vdpasim *vdpasim, vq->cb = NULL; vq->private = NULL; vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features, - VDPASIM_QUEUE_MAX, false, NULL, NULL, NULL); + VDPASIM_QUEUE_MAX, false, false, NULL, NULL, NULL); vq->vring.notify = NULL; } diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c index 0ba3ef809e48..72c88519329a 100644 --- a/drivers/vhost/vringh.c +++ b/drivers/vhost/vringh.c @@ -1094,10 +1094,18...
2023 Mar 14
1
[PATCH v2 8/8] vdpa_sim: add support for user VA
...ach address space. 0 means unlimited. (default: 2048)"); > > +static bool use_va = true; > +module_param(use_va, bool, 0444); > +MODULE_PARM_DESC(use_va, "Enable/disable the device's ability to use VA"); > + > #define VDPASIM_QUEUE_ALIGN PAGE_SIZE > #define VDPASIM_QUEUE_MAX 256 > #define VDPASIM_VENDOR_ID 0 > > +struct vdpasim_mm_work { > + struct kthread_work work; > + struct mm_struct *mm; > + bool bind; > + int ret; > +}; > + > +static void vdpasim_mm_work_fn(struct kthread_work *work) > +{ > + stru...
2023 Mar 24
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
...ddress space. 0 means unlimited. (default: 2048)"); > > +static bool use_va = true; > +module_param(use_va, bool, 0444); > +MODULE_PARM_DESC(use_va, "Enable/disable the device's ability to use VA"); > + > #define VDPASIM_QUEUE_ALIGN PAGE_SIZE > #define VDPASIM_QUEUE_MAX 256 > #define VDPASIM_VENDOR_ID 0 > > +struct vdpasim_mm_work { > + struct kthread_work work; > + struct vdpasim *vdpasim; > + struct mm_struct *mm_to_bind; > + int ret; > +}; > + > +static void vdpasim_mm_work_fn(struct kthread_work *work) > +{ > + struct v...
2023 Jan 29
1
[PATCH v3 2/2] vdpasim: support doorbell mapping
...sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c > index b071f0d842fb..4fcfeb6e2fb8 100644 > --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c > +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c > @@ -39,6 +39,8 @@ MODULE_PARM_DESC(max_iotlb_entries, > #define VDPASIM_QUEUE_ALIGN PAGE_SIZE > #define VDPASIM_QUEUE_MAX 256 > #define VDPASIM_VENDOR_ID 0 > +#define VDPASIM_VRING_POLL_PERIOD 100 /* ms */ > +#define VDPASIM_NOTIFY_DEFVAL 0xffff > > static struct vdpasim *vdpa_to_sim(struct vdpa_device *vdpa) > { > @@ -246,6 +248,28 @@ static const struct dma_map_ops vdpasim_dma_ops = { > s...
2020 Apr 02
0
[vhost:vhost 22/22] drivers/vdpa/vdpa_sim/vdpa_sim.c:94:8: error: implicit declaration of function 'vringh_init_iotlb'; did you mean 'vringh_init_kern'?
...rivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 93 a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 @94 ret = vringh_init_iotlb(&vq->vring, vdpasim_features, a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 95 VDPASIM_QUEUE_MAX, false, a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 96 (struct vring_desc *)(uintptr_t)vq->desc_addr, a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 97 (struct vring_avail *) a35630af6f3198 drivers/virtio/vdpa/vdpa_sim/...
2020 Feb 10
9
[PATCH V2 0/5] vDPA support
Hi all: This is an updated version of kernel support for vDPA device. Various changes were made based on the feedback since last verion. One major change is to drop the sysfs API and leave the management interface for future development, and introudce the incremental DMA bus operations. Please see changelog for more information. The work on vhost, IFCVF (intel VF driver for vDPA) and qemu is
2023 Mar 02
8
[PATCH v2 0/8] vdpa_sim: add support for user VA
v2: - rebased on Linus' tree, commit ae3419fbac84 ("vc_screen: don't clobber return value in vcs_read") - removed `struct task_struct *owner` param (unused for now, maybe ?useful to support cgroups) [Jason] - add unbind_mm callback [Jason] - call the new unbind_mm callback during the release [Jason] - avoid to call bind_mm callback after the reset, since the device ?is not
2023 Mar 21
5
[PATCH v3 0/8] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the
2023 Mar 23
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
...ach address space. 0 means unlimited. (default: 2048)"); > > +static bool use_va = true; > +module_param(use_va, bool, 0444); > +MODULE_PARM_DESC(use_va, "Enable/disable the device's ability to use VA"); > + > #define VDPASIM_QUEUE_ALIGN PAGE_SIZE > #define VDPASIM_QUEUE_MAX 256 > #define VDPASIM_VENDOR_ID 0 > > +struct vdpasim_mm_work { > + struct kthread_work work; > + struct vdpasim *vdpasim; > + struct mm_struct *mm_to_bind; > + int ret; > +}; > + > +static void vdpasim_mm_work_fn(struct kthread_work *work) &gt...
2020 Feb 20
5
[PATCH V4 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2020 Feb 20
9
[PATCH V3 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2023 Mar 21
3
[PATCH v3 5/8] vdpa_sim: make devices agnostic for work management
Let's move work management inside the vdpa_sim core. This way we can easily change how we manage the works, without having to change the devices each time. Acked-by: Eugenio P??rez Martin <eperezma at redhat.com> Acked-by: Jason Wang <jasowang at redhat.com> Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> --- drivers/vdpa/vdpa_sim/vdpa_sim.h | 3 ++-
2023 Apr 04
9
[PATCH v5 0/9] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the vDPA simulator devices. The main reason for this change is to lift the pinning of all guest memory. Especially with virtio devices implemented in software. The next step would be to generalize the code in vdpa-sim to allow the implementation of in-kernel software devices. Similar to vhost, but using vDPA so we can reuse the