search for: vdpa_callback

Displaying 20 results from an estimated 61 matches for "vdpa_callback".

2023 Apr 02
2
[PATCH] virtio-vdpa: add VIRTIO_F_NOTIFICATION_DATA feature support
...struct virtio_vdpa_device *vd_dev = private; @@ -138,6 +149,7 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index, struct device *dma_dev; const struct vdpa_config_ops *ops = vdpa->config; struct virtio_vdpa_vq_info *info; + bool (*notify)(struct virtqueue *vq); struct vdpa_callback cb; struct virtqueue *vq; u64 desc_addr, driver_addr, device_addr; @@ -154,6 +166,11 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index, if (index >= vdpa->nvqs) return ERR_PTR(-ENOENT); + if (__virtio_test_bit(vdev, VIRTIO_F_NOTIFICATION_DATA)) + notify = virt...
2020 Apr 26
1
[PATCH 2/2] vdpa: implement config interrupt in IFCVF
...; --- a/drivers/vdpa/ifcvf/ifcvf_base.h > +++ b/drivers/vdpa/ifcvf/ifcvf_base.h > @@ -81,6 +81,8 @@ struct ifcvf_hw { > void __iomem *net_cfg; > struct vring_info vring[IFCVF_MAX_QUEUE_PAIRS * 2]; > void __iomem * const *base; > + char config_msix_name[256]; > + struct vdpa_callback config_cb; > }; > > struct ifcvf_adapter { > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index 8d54dc5..f7baeca 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -18,6 +18,16 @@ > #def...
2020 Apr 26
0
[PATCH V3 2/2] vdpa: implement config interrupt in IFCVF
...t; VIRTIO_F_IOMMU_PLATFORM) | \ > (1ULL << VIRTIO_NET_F_MRG_RXBUF)) > @@ -81,6 +82,8 @@ struct ifcvf_hw { > void __iomem *net_cfg; > struct vring_info vring[IFCVF_MAX_QUEUE_PAIRS * 2]; > void __iomem * const *base; > + char config_msix_name[256]; > + struct vdpa_callback config_cb; > }; > > struct ifcvf_adapter { > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index 8d54dc5..f7baeca 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -18,6 +18,16 @@ > #def...
2023 Apr 08
1
[PATCH] virtio-vdpa: add VIRTIO_F_NOTIFICATION_DATA feature support
...dev = private; > @@ -138,6 +149,7 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index, > struct device *dma_dev; > const struct vdpa_config_ops *ops = vdpa->config; > struct virtio_vdpa_vq_info *info; > + bool (*notify)(struct virtqueue *vq); > struct vdpa_callback cb; > struct virtqueue *vq; > u64 desc_addr, driver_addr, device_addr; > @@ -154,6 +166,11 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index, > if (index >= vdpa->nvqs) > return ERR_PTR(-ENOENT); > > + if (__virtio_test_bit(vdev, VIRTIO_F_N...
2023 Apr 04
1
[PATCH] virtio-vdpa: add VIRTIO_F_NOTIFICATION_DATA feature support
...+149,7 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index, > struct device *dma_dev; > const struct vdpa_config_ops *ops = vdpa->config; > struct virtio_vdpa_vq_info *info; > + bool (*notify)(struct virtqueue *vq); > struct vdpa_callback cb; > struct virtqueue *vq; > u64 desc_addr, driver_addr, device_addr; > @@ -154,6 +166,11 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index, > if (index >= vdpa->nvqs) > return ERR_PTR(-ENOENT); > > + if...
2023 Apr 09
1
[PATCH v2] virtio-vdpa: add VIRTIO_F_NOTIFICATION_DATA feature support
...vice *vd_dev = private; @@ -138,6 +149,7 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index, struct device *dma_dev; const struct vdpa_config_ops *ops = vdpa->config; struct virtio_vdpa_vq_info *info; + bool (*notify)(struct virtqueue *vq) = virtio_vdpa_notify; struct vdpa_callback cb; struct virtqueue *vq; u64 desc_addr, driver_addr, device_addr; @@ -154,6 +166,14 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index, if (index >= vdpa->nvqs) return ERR_PTR(-ENOENT); + /* We cannot accept VIRTIO_F_NOTIFICATION_DATA without kick_vq_with_data...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...lt; VIRTIO_F_VERSION_1) | \ >> + (1ULL << VIRTIO_F_ORDER_PLATFORM) | \ >> + (1ULL << VIRTIO_F_IOMMU_PLATFORM)) >> + >> +struct vp_vring { >> + void __iomem *notify; >> + char msix_name[256]; >> + resource_size_t notify_pa; >> + struct vdpa_callback cb; >> + int irq; >> +}; >> + >> +struct vp_vdpa { >> + struct vdpa_device vdpa; >> + struct pci_dev *pdev; >> + >> + struct virtio_device_id id; >> + >> + struct vp_vring vring[VP_VDPA_MAX_QUEUE]; >> + >> + /* The IO mapping f...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...lt; VIRTIO_F_VERSION_1) | \ >> + (1ULL << VIRTIO_F_ORDER_PLATFORM) | \ >> + (1ULL << VIRTIO_F_IOMMU_PLATFORM)) >> + >> +struct vp_vring { >> + void __iomem *notify; >> + char msix_name[256]; >> + resource_size_t notify_pa; >> + struct vdpa_callback cb; >> + int irq; >> +}; >> + >> +struct vp_vdpa { >> + struct vdpa_device vdpa; >> + struct pci_dev *pdev; >> + >> + struct virtio_device_id id; >> + >> + struct vp_vring vring[VP_VDPA_MAX_QUEUE]; >> + >> + /* The IO mapping f...
2023 Mar 16
1
[PATCH v3 08/11] vdpa: Add eventfd for the vdpa callback
...t to do more tweaks to mention: 1) irq_ctx is optional 2) that when the irq_ctx is set, the vDPA driver must guarantee that signaling it is functional equivalent to triggering the callback. When set, vDPA parent can signal it directly instead of triggering the callback. > */ > struct vdpa_callback { > irqreturn_t (*callback)(void *data); > void *private; > + struct eventfd_ctx *irq_ctx; There's no IRQ concept at the virtual vDPA bus level, so it's probably better to rename it as "trigger". Btw, should we select EVENTFD for vDPA? Thanks > }; >...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...A_FEATURES \ + ((1ULL << VIRTIO_F_ANY_LAYOUT) | \ + (1ULL << VIRTIO_F_VERSION_1) | \ + (1ULL << VIRTIO_F_ORDER_PLATFORM) | \ + (1ULL << VIRTIO_F_IOMMU_PLATFORM)) + +struct vp_vring { + void __iomem *notify; + char msix_name[256]; + resource_size_t notify_pa; + struct vdpa_callback cb; + int irq; +}; + +struct vp_vdpa { + struct vdpa_device vdpa; + struct pci_dev *pdev; + + struct virtio_device_id id; + + struct vp_vring vring[VP_VDPA_MAX_QUEUE]; + + /* The IO mapping for the PCI config space */ + void __iomem * const *base; + struct virtio_pci_common_cfg __iomem *common; + v...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...A_FEATURES \ + ((1ULL << VIRTIO_F_ANY_LAYOUT) | \ + (1ULL << VIRTIO_F_VERSION_1) | \ + (1ULL << VIRTIO_F_ORDER_PLATFORM) | \ + (1ULL << VIRTIO_F_IOMMU_PLATFORM)) + +struct vp_vring { + void __iomem *notify; + char msix_name[256]; + resource_size_t notify_pa; + struct vdpa_callback cb; + int irq; +}; + +struct vp_vdpa { + struct vdpa_device vdpa; + struct pci_dev *pdev; + + struct virtio_device_id id; + + struct vp_vring vring[VP_VDPA_MAX_QUEUE]; + + /* The IO mapping for the PCI config space */ + void __iomem * const *base; + struct virtio_pci_common_cfg __iomem *common; + v...
2023 Jul 07
1
[PATCH virtio 1/4] pds_vdpa: reset to vdpa specified mac
...es requested by vdpa */ >> u8 vdpa_index; /* rsvd for future subdevice use */ >> u8 num_vqs; /* num vqs in use */ >> + u8 mac[ETH_ALEN]; /* mac selected when the device was added */ >> struct vdpa_callback config_cb; >> struct notifier_block nb; >> }; >> -- >> 2.17.1 >> >
2020 Jun 10
2
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...A_FEATURES \ + ((1ULL << VIRTIO_F_ANY_LAYOUT) | \ + (1ULL << VIRTIO_F_VERSION_1) | \ + (1ULL << VIRTIO_F_ORDER_PLATFORM) | \ + (1ULL << VIRTIO_F_IOMMU_PLATFORM)) + +struct vp_vring { + void __iomem *notify; + char msix_name[256]; + resource_size_t notify_pa; + struct vdpa_callback cb; + int irq; +}; + +struct vp_vdpa { + struct vdpa_device vdpa; + struct pci_dev *pdev; + + struct virtio_device_id id; + + struct vp_vring vring[VP_VDPA_MAX_QUEUE]; + + /* The IO mapping for the PCI config space */ + void __iomem * const *base; + struct virtio_pci_common_cfg __iomem *common; + v...
2020 Jun 10
2
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...A_FEATURES \ + ((1ULL << VIRTIO_F_ANY_LAYOUT) | \ + (1ULL << VIRTIO_F_VERSION_1) | \ + (1ULL << VIRTIO_F_ORDER_PLATFORM) | \ + (1ULL << VIRTIO_F_IOMMU_PLATFORM)) + +struct vp_vring { + void __iomem *notify; + char msix_name[256]; + resource_size_t notify_pa; + struct vdpa_callback cb; + int irq; +}; + +struct vp_vdpa { + struct vdpa_device vdpa; + struct pci_dev *pdev; + + struct virtio_device_id id; + + struct vp_vring vring[VP_VDPA_MAX_QUEUE]; + + /* The IO mapping for the PCI config space */ + void __iomem * const *base; + struct virtio_pci_common_cfg __iomem *common; + v...
2020 Sep 15
0
[RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication
...e *vdev, > u16 idx, u64 desc_area, u64 driver_area, > u64 device_area); > void (*set_vq_num)(struct vdpa_device *vdev, u16 idx, u32 num); > void (*kick_vq)(struct vdpa_device *vdev, u16 idx); > void (*set_vq_cb)(struct vdpa_device *vdev, u16 idx, > struct vdpa_callback *cb); > void (*set_vq_ready)(struct vdpa_device *vdev, u16 idx, bool ready); > bool (*get_vq_ready)(struct vdpa_device *vdev, u16 idx); > int (*set_vq_state)(struct vdpa_device *vdev, u16 idx, > const struct vdpa_vq_state *state); > int (*get_vq_state)(struct vdpa_device *...
2020 Jun 10
0
[PATCH V3] vdpa: introduce virtio pci driver
...(1ULL << VIRTIO_F_ORDER_PLATFORM) | \ > > > + (1ULL << VIRTIO_F_IOMMU_PLATFORM)) > > > + > > > +struct vp_vring { > > > + void __iomem *notify; > > > + char msix_name[256]; > > > + resource_size_t notify_pa; > > > + struct vdpa_callback cb; > > > + int irq; > > > +}; > > > + > > > +struct vp_vdpa { > > > + struct vdpa_device vdpa; > > > + struct pci_dev *pdev; > > > + > > > + struct virtio_device_id id; > > > + > > > + struct vp_vring vring[V...
2020 May 29
0
[PATCH 5/6] vdpa: introduce virtio pci driver
...p_vdpa" + +#define VP_VDPA_FEATURES \ + (1ULL << VIRTIO_F_ANY_LAYOUT) | \ + (1ULL << VIRTIO_F_VERSION_1) | \ + (1ULL << VIRTIO_F_ORDER_PLATFORM) | \ + (1ULL << VIRTIO_F_IOMMU_PLATFORM) + +struct vp_vring { + void __iomem *notify; + char msix_name[256]; + struct vdpa_callback cb; + int irq; +}; + +struct vp_vdpa { + struct vdpa_device vdpa; + struct pci_dev *pdev; + + struct virtio_device_id id; + + struct vp_vring vring[VP_VDPA_MAX_QUEUE]; + + /* The IO mapping for the PCI config space */ + void __iomem * const *base; + struct virtio_pci_common_cfg __iomem *common; + v...
2020 Apr 26
1
[PATCH 1/2] vdpa: Support config interrupt in vhost_vdpa
...> return 0; > } > > +static void vhost_vdpa_config_put(struct vhost_vdpa *v) > +{ > + if (v->config_ctx) > + eventfd_ctx_put(v->config_ctx); > +} > + > +static long vhost_vdpa_set_config_call(struct vhost_vdpa *v, u32 __user *argp) > +{ > + struct vdpa_callback cb; > + vhost_config_file file; > + struct eventfd_ctx *ctx; > + > + cb.callback = vhost_vdpa_config_cb; > + cb.private = v->vdpa; > + if (copy_from_user(&file, argp, sizeof(file))) > + return -EFAULT; > + > + if (file.fd == -1) { > + vhost_vdpa_config_put(v)...
2020 Sep 18
0
[RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication
...rea); >>>>> ?????void (*set_vq_num)(struct vdpa_device *vdev, u16 idx, u32 num); >>>>> ?????void (*kick_vq)(struct vdpa_device *vdev, u16 idx); >>>>> ?????void (*set_vq_cb)(struct vdpa_device *vdev, u16 idx, >>>>> ?????????????? struct vdpa_callback *cb); >>>>> ?????void (*set_vq_ready)(struct vdpa_device *vdev, u16 idx, bool >>>>> ready); >>>>> ?????bool (*get_vq_ready)(struct vdpa_device *vdev, u16 idx); >>>>> ?????int (*set_vq_state)(struct vdpa_device *vdev, u16 idx, >>&g...
2020 Jun 10
0
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...AYOUT) | \ > + (1ULL << VIRTIO_F_VERSION_1) | \ > + (1ULL << VIRTIO_F_ORDER_PLATFORM) | \ > + (1ULL << VIRTIO_F_IOMMU_PLATFORM)) > + > +struct vp_vring { > + void __iomem *notify; > + char msix_name[256]; > + resource_size_t notify_pa; > + struct vdpa_callback cb; > + int irq; > +}; > + > +struct vp_vdpa { > + struct vdpa_device vdpa; > + struct pci_dev *pdev; > + > + struct virtio_device_id id; > + > + struct vp_vring vring[VP_VDPA_MAX_QUEUE]; > + > + /* The IO mapping for the PCI config space */ > + void __iomem *...