Displaying 20 results from an estimated 25 matches for "vring_info".
Did you mean:
ring_info
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...clude <linux/fs.h>
+#include <linux/poll.h>
+#include <linux/highmem.h>
+#include <linux/file.h>
+#include <linux/mount.h>
+#include <linux/magic.h>
+#include <linux/module.h>
+
+static struct vfsmount *vring_mnt;
+static DEFINE_MUTEX(vring_lock);
+
+struct vring_info
+{
+ struct vring ring;
+ u16 mask;
+ u16 __user *last_used;
+ u16 last_avail;
+
+ const struct vring_ops *ops;
+ void *ops_data;
+
+ /* Waitqueue for poll() */
+ wait_queue_head_t poll_wait;
+
+ /* The mapped used ring. */
+ struct vring_used *used;
+ struct page *used_page;
+};
+
+static unsigned...
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...clude <linux/fs.h>
+#include <linux/poll.h>
+#include <linux/highmem.h>
+#include <linux/file.h>
+#include <linux/mount.h>
+#include <linux/magic.h>
+#include <linux/module.h>
+
+static struct vfsmount *vring_mnt;
+static DEFINE_MUTEX(vring_lock);
+
+struct vring_info
+{
+ struct vring ring;
+ u16 mask;
+ u16 __user *last_used;
+ u16 last_avail;
+
+ const struct vring_ops *ops;
+ void *ops_data;
+
+ /* Waitqueue for poll() */
+ wait_queue_head_t poll_wait;
+
+ /* The mapped used ring. */
+ struct vring_used *used;
+ struct page *used_page;
+};
+
+static unsigned...
2020 Apr 26
1
[PATCH 2/2] vdpa: implement config interrupt in IFCVF
...us(hw);
> diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h
> index e803070..76928b0 100644
> --- 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..f7b...
2020 Apr 26
0
[PATCH V3 2/2] vdpa: implement config interrupt in IFCVF
...\
> + (1ULL << VIRTIO_NET_F_STATUS) | \
> (1ULL << VIRTIO_F_ORDER_PLATFORM) | \
> (1ULL << 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..f7b...
2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...offset) & VDPA_VFIO_VHOST_OFFSET_MASK)
> +
> +struct vdpa_dev *vdpa_alloc(struct mdev_device *mdev, void *private,
> + int max_vrings)
> +{
> + struct vdpa_dev *vdpa;
> + size_t size;
> +
> + size = sizeof(struct vdpa_dev) + max_vrings *
> + sizeof(struct vdpa_vring_info);
> +
> + vdpa = kzalloc(size, GFP_KERNEL);
> + if (vdpa == NULL)
> + return NULL;
> +
> + mutex_init(&vdpa->ops_lock);
> +
> + vdpa->mdev = mdev;
> + vdpa->private = private;
> + vdpa->max_vrings = max_vrings;
> +
> + return vdpa;
> +}
> +...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...VDPA_VFIO_VHOST_REGION_OFFSET(offset) \
+ ((offset) & VDPA_VFIO_VHOST_OFFSET_MASK)
+
+struct vdpa_dev *vdpa_alloc(struct mdev_device *mdev, void *private,
+ int max_vrings)
+{
+ struct vdpa_dev *vdpa;
+ size_t size;
+
+ size = sizeof(struct vdpa_dev) + max_vrings *
+ sizeof(struct vdpa_vring_info);
+
+ vdpa = kzalloc(size, GFP_KERNEL);
+ if (vdpa == NULL)
+ return NULL;
+
+ mutex_init(&vdpa->ops_lock);
+
+ vdpa->mdev = mdev;
+ vdpa->private = private;
+ vdpa->max_vrings = max_vrings;
+
+ return vdpa;
+}
+EXPORT_SYMBOL(vdpa_alloc);
+
+void vdpa_free(struct vdpa_dev *vdpa)
+{...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...VDPA_VFIO_VHOST_REGION_OFFSET(offset) \
+ ((offset) & VDPA_VFIO_VHOST_OFFSET_MASK)
+
+struct vdpa_dev *vdpa_alloc(struct mdev_device *mdev, void *private,
+ int max_vrings)
+{
+ struct vdpa_dev *vdpa;
+ size_t size;
+
+ size = sizeof(struct vdpa_dev) + max_vrings *
+ sizeof(struct vdpa_vring_info);
+
+ vdpa = kzalloc(size, GFP_KERNEL);
+ if (vdpa == NULL)
+ return NULL;
+
+ mutex_init(&vdpa->ops_lock);
+
+ vdpa->mdev = mdev;
+ vdpa->private = private;
+ vdpa->max_vrings = max_vrings;
+
+ return vdpa;
+}
+EXPORT_SYMBOL(vdpa_alloc);
+
+void vdpa_free(struct vdpa_dev *vdpa)
+{...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...i, &hw->common_cfg->queue_select);
> + notify_off = ioread16(&hw->common_cfg->queue_notify_off);
> + hw->notify_addr[i] = (void *)((u8 *)hw->notify_base +
> + notify_off * hw->notify_off_multiplier);
It might be better to store notify_addr inside the vring_info for
better locality.
> + }
> +
> + hw->lm_cfg = hw->mem_resource[IFCVF_LM_BAR].addr;
> +
> + IFC_DBG(&dev->dev, "PCI capability mapping: common cfg: %p,\
> + notify base: %p\n, isr cfg: %p, device cfg: %p,\
> + multiplier: %u\n",
> + hw->common_...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...pa_dev {
struct mdev_device *mdev;
struct mutex ops_lock;
u8 vconfig[VDPA_CONFIG_SIZE];
int nr_vring;
u64 features;
u64 state;
struct vhost_memory *mem_table;
bool pending_reply;
struct vhost_vfio_op pending;
const struct vdpa_device_ops *ops;
void *private;
int max_vrings;
struct vdpa_vring_info vring_info[0];
};
struct vdpa_dev *vdpa_alloc(struct mdev_device *mdev, void *private,
int max_vrings);
void vdpa_free(struct vdpa_dev *vdpa);
A simple example
================
# Query the number of available mdev instances
$ cat /sys/class/mdev_bus/0000:06:00.2/mdev_supported_types/ifcvf...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...pa_dev {
struct mdev_device *mdev;
struct mutex ops_lock;
u8 vconfig[VDPA_CONFIG_SIZE];
int nr_vring;
u64 features;
u64 state;
struct vhost_memory *mem_table;
bool pending_reply;
struct vhost_vfio_op pending;
const struct vdpa_device_ops *ops;
void *private;
int max_vrings;
struct vdpa_vring_info vring_info[0];
};
struct vdpa_dev *vdpa_alloc(struct mdev_device *mdev, void *private,
int max_vrings);
void vdpa_free(struct vdpa_dev *vdpa);
A simple example
================
# Query the number of available mdev instances
$ cat /sys/class/mdev_bus/0000:06:00.2/mdev_supported_types/ifcvf...
2018 Apr 10
0
[RFC] vhost: introduce mdev based hardware vhost backend
...ock;
> u8 vconfig[VDPA_CONFIG_SIZE];
> int nr_vring;
> u64 features;
> u64 state;
> struct vhost_memory *mem_table;
> bool pending_reply;
> struct vhost_vfio_op pending;
> const struct vdpa_device_ops *ops;
> void *private;
> int max_vrings;
> struct vdpa_vring_info vring_info[0];
> };
>
> struct vdpa_dev *vdpa_alloc(struct mdev_device *mdev, void *private,
> int max_vrings);
> void vdpa_free(struct vdpa_dev *vdpa);
>
> A simple example
> ================
>
> # Query the number of available mdev instances
> $ cat /sys/cl...
2023 May 08
1
[PATCH V2 1/5] vDPA/ifcvf: virt queue ops take immediate actions
...RTIO_CONFIG_S_DRIVER_OK);
return 0;
diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h
index c20d1c40214e..d545a9411143 100644
--- a/drivers/vdpa/ifcvf/ifcvf_base.h
+++ b/drivers/vdpa/ifcvf/ifcvf_base.h
@@ -47,12 +47,7 @@
#define MSIX_VECTOR_DEV_SHARED 3
struct vring_info {
- u64 desc;
- u64 avail;
- u64 used;
- u16 size;
u16 last_avail_idx;
- bool ready;
void __iomem *notify_addr;
phys_addr_t notify_pa;
u32 irq;
@@ -137,4 +132,9 @@ int ifcvf_probed_virtio_net(struct ifcvf_hw *hw);
u32 ifcvf_get_config_size(struct ifcvf_hw *hw);
u16 ifcvf_set_vq_vector(str...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...t; +} __packed;
> +
> +struct ifcvf_pci_mem_resource {
> + /* Physical address, 0 if not resource. */
> + u64 phys_addr;
> + /* Length of the resource. */
> + u64 len;
> + /* Virtual address, NULL when not mapped. */
> + u8 *addr;
> +};
> +
> +struct vring_info {
> + u64 desc;
> + u64 avail;
> + u64 used;
> + u16 size;
> + u16 last_avail_idx;
> + u16 last_used_idx;
> + bool ready;
> + char msix_name[256];
> + struct virtio_mdev_callback cb;
> +};
> +
> +struct ifcvf_hw {
> + u8 *isr;
> + u8 notify_bar;
> + u8 *...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...t; +} __packed;
> +
> +struct ifcvf_pci_mem_resource {
> + /* Physical address, 0 if not resource. */
> + u64 phys_addr;
> + /* Length of the resource. */
> + u64 len;
> + /* Virtual address, NULL when not mapped. */
> + u8 *addr;
> +};
> +
> +struct vring_info {
> + u64 desc;
> + u64 avail;
> + u64 used;
> + u16 size;
> + u16 last_avail_idx;
> + u16 last_used_idx;
> + bool ready;
> + char msix_name[256];
> + struct virtio_mdev_callback cb;
> +};
> +
> +struct ifcvf_hw {
> + u8 *isr;
> + u8 notify_bar;
> + u8 *...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...one instead?
> +
> +struct ifcvf_pci_mem_resource {
> + /* Physical address, 0 if not resource. */
> + u64 phys_addr;
> + /* Length of the resource. */
> + u64 len;
> + /* Virtual address, NULL when not mapped. */
> + u8 *addr;
> +};
> +
> +struct vring_info {
> + u64 desc;
> + u64 avail;
> + u64 used;
> + u16 size;
> + u16 last_avail_idx;
> + u16 last_used_idx;
> + bool ready;
> + char msix_name[256];
> + struct virtio_mdev_callback cb;
> +};
> +
> +struct ifcvf_hw {
> + u8 *isr;
> + u8 notify_bar;
> + u8 *...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...} __packed;
> +
> +struct ifcvf_pci_mem_resource {
> + u64 phys_addr; /**< Physical address, 0 if not resource. */
> + u64 len; /**< Length of the resource. */
> + u8 *addr; /**< Virtual address, NULL when not mapped. */
> +};
> +
> +struct vring_info {
> + u64 desc;
> + u64 avail;
> + u64 used;
> + u16 size;
> + u16 last_avail_idx;
> + u16 last_used_idx;
> + bool ready;
> + char msix_name[256];
> + struct virtio_mdev_callback cb;
> +};
> +
> +struct ifcvf_hw {
> + u8 *isr;
> + u8 notify_bar;
> + u8 *...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...>>> +??? u64????? phys_addr; /**< Physical address, 0 if not resource. */
>>> +??? u64????? len;?????? /**< Length of the resource. */
>>> +??? u8?????? *addr;???? /**< Virtual address, NULL when not mapped. */
>>> +};
>>> +
>>> +struct vring_info {
>>> +??? u64 desc;
>>> +??? u64 avail;
>>> +??? u64 used;
>>> +??? u16 size;
>>> +??? u16 last_avail_idx;
>>> +??? u16 last_used_idx;
>>> +??? bool ready;
>>> +??? char msix_name[256];
>>> +??? struct virtio_mdev_cal...
2023 Mar 31
1
[PATCH 1/5] virt queue ops take immediate actions
...RTIO_CONFIG_S_DRIVER_OK);
return 0;
diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h
index c20d1c40214e..d545a9411143 100644
--- a/drivers/vdpa/ifcvf/ifcvf_base.h
+++ b/drivers/vdpa/ifcvf/ifcvf_base.h
@@ -47,12 +47,7 @@
#define MSIX_VECTOR_DEV_SHARED 3
struct vring_info {
- u64 desc;
- u64 avail;
- u64 used;
- u16 size;
u16 last_avail_idx;
- bool ready;
void __iomem *notify_addr;
phys_addr_t notify_pa;
u32 irq;
@@ -137,4 +132,9 @@ int ifcvf_probed_virtio_net(struct ifcvf_hw *hw);
u32 ifcvf_get_config_size(struct ifcvf_hw *hw);
u16 ifcvf_set_vq_vector(str...
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...#define VERSION_STRING??? "0.1"
>>> +#define DRIVER_AUTHOR??? "Intel Corporation"
>>> +#define IFCVF_DRIVER_NAME??? "ifcvf"
>>> +
>>> +static irqreturn_t ifcvf_intr_handler(int irq, void *arg)
>>> +{
>>> +??? struct vring_info *vring = arg;
>>> +
>>> +??? if (vring->cb.callback)
>>> +??????? return vring->cb.callback(vring->cb.private);
>>> +
>>> +??? return IRQ_HANDLED;
>>> +}
>>> +
>>> +static u64 ifcvf_mdev_get_features(struct mdev_device...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...> +
> +#include "ifcvf_base.h"
> +
> +#define VERSION_STRING "0.1"
> +#define DRIVER_AUTHOR "Intel Corporation"
> +#define IFCVF_DRIVER_NAME "ifcvf"
> +
> +static irqreturn_t ifcvf_intr_handler(int irq, void *arg)
> +{
> + struct vring_info *vring = arg;
> +
> + if (vring->cb.callback)
> + return vring->cb.callback(vring->cb.private);
> +
> + return IRQ_HANDLED;
> +}
> +
> +static u64 ifcvf_mdev_get_features(struct mdev_device *mdev)
> +{
> + return IFC_SUPPORTED_FEATURES;
I would expect this...