Displaying 8 results from an estimated 8 matches for "vdpasim_config_ops".
2023 Jan 29
1
[PATCH v3 2/2] vdpasim: support doorbell mapping
...D 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 = {
>  static const struct vdpa_config_ops vdpasim_config_ops;
>  static const struct vdpa_config_ops vdpasim_batch_config_ops;
>
> +static void vdpasim_notify_work(struct work_struct *work)
> +{
> +       struct vdpasim *vdpasim;
> +       u16 *val;
> +
> +       vdpasim = container_of(work, struct vdpasim, notify_work.work);
> +
&...
2023 Mar 21
3
[PATCH v3 5/8] vdpa_sim: make devices agnostic for work management
...a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 47cdf2a1f5b8..f6329900e61a 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
@@ -127,6 +127,13 @@ static void vdpasim_do_reset(struct vdpasim *vdpasim)
 static const struct vdpa_config_ops vdpasim_config_ops;
 static const struct vdpa_config_ops vdpasim_batch_config_ops;
 
+static void vdpasim_work_fn(struct work_struct *work)
+{
+	struct vdpasim *vdpasim = container_of(work, struct vdpasim, work);
+
+	vdpasim->dev_attr.work_fn(vdpasim);
+}
+
 struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *...
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 23
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
..._sync(vdpasim, &mm_work);
> +}
> +
>  static int vdpasim_dma_map(struct vdpa_device *vdpa, unsigned int asid,
>                            u64 iova, u64 size,
>                            u64 pa, u32 perm, void *opaque)
> @@ -678,6 +750,8 @@ static const struct vdpa_config_ops vdpasim_config_ops = {
>         .set_group_asid         = vdpasim_set_group_asid,
>         .dma_map                = vdpasim_dma_map,
>         .dma_unmap              = vdpasim_dma_unmap,
> +       .bind_mm                = vdpasim_bind_mm,
> +       .unbind_mm              = vdpasim_unbind_mm,
>...
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
2023 Mar 14
1
[PATCH v2 8/8] vdpa_sim: add support for user VA
...lock(&vdpasim->mutex);
> +}
> +
>  static int vdpasim_dma_map(struct vdpa_device *vdpa, unsigned int asid,
>                            u64 iova, u64 size,
>                            u64 pa, u32 perm, void *opaque)
> @@ -667,6 +757,8 @@ static const struct vdpa_config_ops vdpasim_config_ops = {
>         .set_group_asid         = vdpasim_set_group_asid,
>         .dma_map                = vdpasim_dma_map,
>         .dma_unmap              = vdpasim_dma_unmap,
> +       .bind_mm                = vdpasim_bind_mm,
> +       .unbind_mm              = vdpasim_unbind_mm,
>...
2023 Mar 24
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
...gt; +
> +	vdpasim_worker_change_mm_sync(vdpasim, &mm_work);
> +}
> +
>   static int vdpasim_dma_map(struct vdpa_device *vdpa, unsigned int asid,
>   			   u64 iova, u64 size,
>   			   u64 pa, u32 perm, void *opaque)
> @@ -678,6 +750,8 @@ static const struct vdpa_config_ops vdpasim_config_ops = {
>   	.set_group_asid         = vdpasim_set_group_asid,
>   	.dma_map                = vdpasim_dma_map,
>   	.dma_unmap              = vdpasim_dma_unmap,
> +	.bind_mm		= vdpasim_bind_mm,
> +	.unbind_mm		= vdpasim_unbind_mm,
>   	.free                   = vdpasim_free,
>   };...
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