Displaying 20 results from an estimated 245 matches for "vdpa_device".
2020 Apr 09
2
[PATCH] vdpa: allow a 32 bit vq alignment
...changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
index 28d9e5de5675..abf6a061cab6 100644
--- a/drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers/vdpa/ifcvf/ifcvf_main.c
@@ -226,7 +226,7 @@ static u32 ifcvf_vdpa_get_vendor_id(struct vdpa_device *vdpa_dev)
return IFCVF_SUBSYS_VENDOR_ID;
}
-static u16 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev)
+static u32 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev)
{
return IFCVF_QUEUE_ALIGNMENT;
}
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c...
2020 Sep 15
0
[RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication
...ust tried to compare the 'struct vdpa_config_ops' and 'struct
> vhost_config_ops' ( introduced in [RFC PATCH 03/22] vhost: Add ops for
> the VHOST driver to configure VHOST device).
>
> struct vdpa_config_ops {
> /* Virtqueue ops */
> int (*set_vq_address)(struct vdpa_device *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 v...
2020 Feb 20
0
[PATCH V3 3/5] vDPA: introduce vDPA bus
...eserved.
+ * Author: Jason Wang <jasowang at redhat.com>
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/idr.h>
+#include <linux/slab.h>
+#include <linux/vdpa.h>
+
+static DEFINE_IDA(vdpa_index_ida);
+
+static int vdpa_dev_probe(struct device *d)
+{
+ struct vdpa_device *vdev = dev_to_vdpa(d);
+ struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver);
+ int ret = 0;
+
+ if (drv && drv->probe)
+ ret = drv->probe(vdev);
+
+ return ret;
+}
+
+static int vdpa_dev_remove(struct device *d)
+{
+ struct vdpa_device *vdev = dev_to_vdpa(d);
+ struct vdpa_d...
2020 Sep 18
0
[RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication
...g_ops' ( introduced in [RFC PATCH 03/22] vhost: Add ops for
>>>>> the VHOST driver to configure VHOST device).
>>>>>
>>>>> struct vdpa_config_ops {
>>>>> ?????/* Virtqueue ops */
>>>>> ?????int (*set_vq_address)(struct vdpa_device *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_devic...
2020 Feb 10
0
[PATCH V2 3/5] vDPA: introduce vDPA bus
...(c) 2020, Red Hat. All rights reserved.
+ * Author: Jason Wang <jasowang at redhat.com>
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/idr.h>
+#include <linux/vdpa.h>
+
+static DEFINE_IDA(vdpa_index_ida);
+
+static int vdpa_dev_probe(struct device *d)
+{
+ struct vdpa_device *vdev = dev_to_vdpa(d);
+ struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver);
+ int ret = 0;
+
+ if (drv && drv->probe)
+ ret = drv->probe(vdev);
+
+ return ret;
+}
+
+static int vdpa_dev_remove(struct device *d)
+{
+ struct vdpa_device *vdev = dev_to_vdpa(d);
+ struct vdpa_d...
2020 Sep 16
0
[RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication
...; and 'struct
>>> vhost_config_ops' ( introduced in [RFC PATCH 03/22] vhost: Add ops for
>>> the VHOST driver to configure VHOST device).
>>>
>>> struct vdpa_config_ops {
>>> ????/* Virtqueue ops */
>>> ????int (*set_vq_address)(struct vdpa_device *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);
>>> ???...
2020 Feb 10
0
[PATCH V2 5/5] vdpasim: vDPA device simulator
...OUT) |
+ (1ULL << VIRTIO_F_VERSION_1) |
+ (1ULL << VIRTIO_F_IOMMU_PLATFORM);
+
+/* State of each vdpasim device */
+struct vdpasim {
+ struct vdpasim_virtqueue vqs[2];
+ struct work_struct work;
+ /* spinlock to synchronize virtqueue state */
+ spinlock_t lock;
+ struct vdpa_device vdpa;
+ struct virtio_net_config config;
+ struct vhost_iotlb *iommu;
+ void *buffer;
+ u32 status;
+ u32 generation;
+ u64 features;
+};
+
+struct vdpasim *vdpa_sim;
+
+static struct vdpasim *vdpa_to_sim(struct vdpa_device *vdpa)
+{
+ return container_of(vdpa, struct vdpasim, vdpa);
+}
+
+static v...
2020 Aug 05
0
[PATCH V4 linux-next 08/12] vdpa: Modify get_vq_state() to return error code
...tions(-)
>
> diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
> index dc311e972b9e..076d7ac5e723 100644
> --- a/drivers/vdpa/ifcvf/ifcvf_main.c
> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c
> @@ -237,12 +237,13 @@ static u16 ifcvf_vdpa_get_vq_num_max(struct vdpa_device *vdpa_dev)
> return IFCVF_QUEUE_MAX;
> }
>
> -static void ifcvf_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid,
> - struct vdpa_vq_state *state)
> +static int ifcvf_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid,
> + struct vdpa_vq_state *...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...t;< 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...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...t;< 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...
2020 Jul 21
0
[PATCH V2 vhost next 06/10] vdpa: Modify get_vq_state() to return error code
...tions(-)
>
> diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
> index 69032ee97824..d9b5f465ac81 100644
> --- a/drivers/vdpa/ifcvf/ifcvf_main.c
> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c
> @@ -235,12 +235,13 @@ static u16 ifcvf_vdpa_get_vq_num_max(struct vdpa_device *vdpa_dev)
> return IFCVF_QUEUE_MAX;
> }
>
> -static void ifcvf_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid,
> - struct vdpa_vq_state *state)
> +static int ifcvf_vdpa_get_vq_state(struct vdpa_device *vdpa_dev, u16 qid,
> + struct vdpa_vq_state *...
2020 Feb 10
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...ION_1) |
> + (1ULL << VIRTIO_F_IOMMU_PLATFORM);
> +
> +/* State of each vdpasim device */
> +struct vdpasim {
> + struct vdpasim_virtqueue vqs[2];
> + struct work_struct work;
> + /* spinlock to synchronize virtqueue state */
> + spinlock_t lock;
> + struct vdpa_device vdpa;
> + struct virtio_net_config config;
> + struct vhost_iotlb *iommu;
> + void *buffer;
> + u32 status;
> + u32 generation;
> + u64 features;
> +};
> +
> +struct vdpasim *vdpa_sim;
> +
> +static struct vdpasim *vdpa_to_sim(struct vdpa_device *vdpa)
> +{
>...
2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...vers/vdpa/vdpa.c
> index ff6562f..d8eba01 100644
> --- a/drivers/vdpa/vdpa.c
> +++ b/drivers/vdpa/vdpa.c
> @@ -163,6 +163,52 @@ void vdpa_unregister_driver(struct vdpa_driver *drv)
> }
> EXPORT_SYMBOL_GPL(vdpa_unregister_driver);
>
> +static void vdpa_setup_irq(struct vdpa_device *vdev, int qid, int irq)
> +{
> + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver);
> +
> +#ifdef CONFIG_HAVE_KVM_IRQ_BYPASS
Let's don't do the check here. It's the responsibility of driver to
decide what it should do.
> + if (drv->setup_vq_irq)
> +...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...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;
+ void __iomem *device;
+ /* Base of vq notifications */
+ void...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...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;
+ void __iomem *device;
+ /* Base of vq notifications */
+ void...
2020 Jul 17
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...vers/vdpa/vdpa.c
> index ff6562f..cce4d91 100644
> --- a/drivers/vdpa/vdpa.c
> +++ b/drivers/vdpa/vdpa.c
> @@ -163,6 +163,48 @@ void vdpa_unregister_driver(struct vdpa_driver *drv)
> }
> EXPORT_SYMBOL_GPL(vdpa_unregister_driver);
>
> +static void vdpa_setup_irq(struct vdpa_device *vdev, int qid, int irq)
> +{
> + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver);
> +
> + if (drv->setup_vq_irq)
> + drv->setup_vq_irq(vdev, qid, irq);
> +}
> +
> +static void vdpa_unsetup_irq(struct vdpa_device *vdev, int qid)
> +{
> + struct vdpa_d...
2020 Jun 10
2
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...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;
+ void __iomem *device;
+ /* Base of vq notifications */
+ void...
2020 Jun 10
2
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...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;
+ void __iomem *device;
+ /* Base of vq notifications */
+ void...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...OUT) |
+ (1ULL << VIRTIO_F_VERSION_1) |
+ (1ULL << VIRTIO_F_IOMMU_PLATFORM);
+
+/* State of each vdpasim device */
+struct vdpasim {
+ struct vdpasim_virtqueue vqs[2];
+ struct work_struct work;
+ /* spinlock to synchronize virtqueue state */
+ spinlock_t lock;
+ struct vdpa_device *vdpa;
+ struct device dev;
+ struct virtio_net_config config;
+ struct vhost_iotlb *iommu;
+ void *buffer;
+ u32 status;
+ u32 generation;
+ u64 features;
+};
+
+struct vdpasim *vdpasim_dev;
+
+static struct vdpasim *dev_to_sim(struct device *dev)
+{
+ return container_of(dev, struct vdpasim, dev)...
2020 Jun 10
0
[PATCH V3] vdpa: introduce virtio pci driver
...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 * cons...