search for: max_vrings

Displaying 8 results from an estimated 8 matches for "max_vrings".

2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...O_VHOST_INDEX_TO_OFFSET(index) \ > + ((u64)(index) << VDPA_VFIO_VHOST_OFFSET_SHIFT) > +#define 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_lo...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...FFSET_SHIFT) +#define VDPA_VFIO_VHOST_INDEX_TO_OFFSET(index) \ + ((u64)(index) << VDPA_VFIO_VHOST_OFFSET_SHIFT) +#define 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;...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...FFSET_SHIFT) +#define VDPA_VFIO_VHOST_INDEX_TO_OFFSET(index) \ + ((u64)(index) << VDPA_VFIO_VHOST_OFFSET_SHIFT) +#define 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;...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...otify_addr; }; struct vdpa_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/m...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...otify_addr; }; struct vdpa_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/m...
2018 Apr 10
0
[RFC] vhost: introduce mdev based hardware vhost backend
...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 mde...
2018 Apr 10
4
[RFC] vhost: introduce mdev based hardware vhost backend
...config[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 > > ===============...
2018 Apr 10
4
[RFC] vhost: introduce mdev based hardware vhost backend
...config[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 > > ===============...