search for: vfio_region_info

Displaying 15 results from an estimated 15 matches for "vfio_region_info".

2013 Jul 03
6
RFC: vfio interface for platform devices (v2)
...node corresponding to the region -whether it corresponds to a "reg" or "ranges" property -there could be multiple sub-regions per "reg" or "ranges" and the sub-index within the reg/ranges is needed There are 5 new flags added to vfio_region_info : struct vfio_region_info { __u32 argsz; __u32 flags; #define VFIO_REGION_INFO_FLAG_CACHEABLE (1 << ?) #define VFIO_DEVTREE_REGION_INFO_FLAG_REG (1 << ?) #define VFIO_DEVTREE_REGION_INFO_FLAG_RANGE (1 << ?) #define VFIO_DEVTREE_REGION_INFO_FLAG_...
2013 Jul 03
6
RFC: vfio interface for platform devices (v2)
...node corresponding to the region -whether it corresponds to a "reg" or "ranges" property -there could be multiple sub-regions per "reg" or "ranges" and the sub-index within the reg/ranges is needed There are 5 new flags added to vfio_region_info : struct vfio_region_info { __u32 argsz; __u32 flags; #define VFIO_REGION_INFO_FLAG_CACHEABLE (1 << ?) #define VFIO_DEVTREE_REGION_INFO_FLAG_REG (1 << ?) #define VFIO_DEVTREE_REGION_INFO_FLAG_RANGE (1 << ?) #define VFIO_DEVTREE_REGION_INFO_FLAG_...
2013 Jul 04
0
RFC: vfio interface for platform devices (v2)
...; region > -whether it corresponds to a "reg" or "ranges" property > -there could be multiple sub-regions per "reg" or "ranges" and > the sub-index within the reg/ranges is needed > > There are 5 new flags added to vfio_region_info : > > struct vfio_region_info { > __u32 argsz; > __u32 flags; > #define VFIO_REGION_INFO_FLAG_CACHEABLE (1 << ?) > #define VFIO_DEVTREE_REGION_INFO_FLAG_REG (1 << ?) > #define VFIO_DEVTREE_REGION_INFO_FLAG_RANGE (1 << ?) >...
2013 Jul 03
0
RFC: vfio interface for platform devices (v2)
...; region > -whether it corresponds to a "reg" or "ranges" property > -there could be multiple sub-regions per "reg" or "ranges" and > the sub-index within the reg/ranges is needed > > There are 5 new flags added to vfio_region_info : > > struct vfio_region_info { > __u32 argsz; > __u32 flags; > #define VFIO_REGION_INFO_FLAG_CACHEABLE (1 << ?) > #define VFIO_DEVTREE_REGION_INFO_FLAG_REG (1 << ?) > #define VFIO_DEVTREE_REGION_INFO_FLAG_RANGE (1 << ?) >...
2013 Jul 03
0
RFC: vfio interface for platform devices
...better to add a device tree index and path to the existing GET_*_INFO ioctls? Getting some information from one ioctl and passing pieces of it back to another ioctl feels a little clunky. DEVICE_GET_INFO will identify the device as device tree, which gives you the opportunity to extend or replace vfio_region_info and vfio_irq_info. It seems like it could even be done in a compatible way. For example, if you were to call VFIO_DEVICE_GET_REGION_INFO with argsz = sizeof(struct vfio_region_info), the kernel could fill in all the info up to that size and fill argsz with the size needed for the remaining info....
2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...count, ppos); > + break; > + } > + > + if (done > 0) > + *ppos += done; > + > + mutex_unlock(&vdpa->ops_lock); > + > + return done; > +} > +EXPORT_SYMBOL(vdpa_write); > + > +static int vdpa_get_region_info(struct mdev_device *mdev, > + struct vfio_region_info *region_info, > + u16 *cap_type_id, void **cap_type) > +{ > + struct vdpa_dev *vdpa; > + u32 index, flags; > + u64 size = 0; > + > + if (!mdev) > + return -EINVAL; > + > + vdpa = mdev_get_drvdata(mdev); > + if (!vdpa) > + return -EINVAL; > + > + index...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...ST_NOTIFY_REGION_INDEX: + done = vdpa_handle_notify_write(mdev, buf, count, ppos); + break; + } + + if (done > 0) + *ppos += done; + + mutex_unlock(&vdpa->ops_lock); + + return done; +} +EXPORT_SYMBOL(vdpa_write); + +static int vdpa_get_region_info(struct mdev_device *mdev, + struct vfio_region_info *region_info, + u16 *cap_type_id, void **cap_type) +{ + struct vdpa_dev *vdpa; + u32 index, flags; + u64 size = 0; + + if (!mdev) + return -EINVAL; + + vdpa = mdev_get_drvdata(mdev); + if (!vdpa) + return -EINVAL; + + index = region_info->index; + if (index >= VFIO_VHOST_NUM_REGIONS) +...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...ST_NOTIFY_REGION_INDEX: + done = vdpa_handle_notify_write(mdev, buf, count, ppos); + break; + } + + if (done > 0) + *ppos += done; + + mutex_unlock(&vdpa->ops_lock); + + return done; +} +EXPORT_SYMBOL(vdpa_write); + +static int vdpa_get_region_info(struct mdev_device *mdev, + struct vfio_region_info *region_info, + u16 *cap_type_id, void **cap_type) +{ + struct vdpa_dev *vdpa; + u32 index, flags; + u64 size = 0; + + if (!mdev) + return -EINVAL; + + vdpa = mdev_get_drvdata(mdev); + if (!vdpa) + return -EINVAL; + + index = region_info->index; + if (index >= VFIO_VHOST_NUM_REGIONS) +...
2013 Jul 03
1
RFC: vfio interface for platform devices
...even if we treat them the same in code, we should be discussing them separately. Other than that I think it is preferable to extend the existing ioctls rather than add new ones. > DEVICE_GET_INFO will identify the device as device tree, which gives you > the opportunity to extend or replace vfio_region_info and vfio_irq_info. > It seems like it could even be done in a compatible way. For example, > if you were to call VFIO_DEVICE_GET_REGION_INFO with argsz = > sizeof(struct vfio_region_info), the kernel could fill in all the info > up to that size and fill argsz with the size needed for t...
2013 Jul 03
1
RFC: vfio interface for platform devices
...even if we treat them the same in code, we should be discussing them separately. Other than that I think it is preferable to extend the existing ioctls rather than add new ones. > DEVICE_GET_INFO will identify the device as device tree, which gives you > the opportunity to extend or replace vfio_region_info and vfio_irq_info. > It seems like it could even be done in a compatible way. For example, > if you were to call VFIO_DEVICE_GET_REGION_INFO with argsz = > sizeof(struct vfio_region_info), the kernel could fill in all the info > up to that size and fill argsz with the size needed for t...
2013 Jul 02
7
RFC: vfio interface for platform devices
The write-up below is the first draft of a proposal for how the kernel can expose platform devices to user space using vfio. In short, I'm proposing a new ioctl VFIO_DEVICE_GET_DEVTREE_INFO which allows user space to correlate regions and interrupts to the corresponding device tree node structure that is defined for most platform devices. Regards, Stuart Yoder
2013 Jul 02
7
RFC: vfio interface for platform devices
The write-up below is the first draft of a proposal for how the kernel can expose platform devices to user space using vfio. In short, I'm proposing a new ioctl VFIO_DEVICE_GET_DEVTREE_INFO which allows user space to correlate regions and interrupts to the corresponding device tree node structure that is defined for most platform devices. Regards, Stuart Yoder
2018 Apr 10
0
[RFC] vhost: introduce mdev based hardware vhost backend
...count, ppos); > + break; > + } > + > + if (done > 0) > + *ppos += done; > + > + mutex_unlock(&vdpa->ops_lock); > + > + return done; > +} > +EXPORT_SYMBOL(vdpa_write); > + > +static int vdpa_get_region_info(struct mdev_device *mdev, > + struct vfio_region_info *region_info, > + u16 *cap_type_id, void **cap_type) > +{ > + struct vdpa_dev *vdpa; > + u32 bar_index; > + u64 size = 0; > + > + if (!mdev) > + return -EINVAL; > + > + vdpa = mdev_get_drvdata(mdev); > + if (!vdpa) > + return -EINVAL; > + > + bar_index...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...IO_PCI_BAR1_REGION_INDEX: + done = vdpa_handle_bar1_write(mdev, buf, count, ppos); + break; + } + + if (done > 0) + *ppos += done; + + mutex_unlock(&vdpa->ops_lock); + + return done; +} +EXPORT_SYMBOL(vdpa_write); + +static int vdpa_get_region_info(struct mdev_device *mdev, + struct vfio_region_info *region_info, + u16 *cap_type_id, void **cap_type) +{ + struct vdpa_dev *vdpa; + u32 bar_index; + u64 size = 0; + + if (!mdev) + return -EINVAL; + + vdpa = mdev_get_drvdata(mdev); + if (!vdpa) + return -EINVAL; + + bar_index = region_info->index; + if (bar_index >= VFIO_PCI_NUM_REGIONS)...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...IO_PCI_BAR1_REGION_INDEX: + done = vdpa_handle_bar1_write(mdev, buf, count, ppos); + break; + } + + if (done > 0) + *ppos += done; + + mutex_unlock(&vdpa->ops_lock); + + return done; +} +EXPORT_SYMBOL(vdpa_write); + +static int vdpa_get_region_info(struct mdev_device *mdev, + struct vfio_region_info *region_info, + u16 *cap_type_id, void **cap_type) +{ + struct vdpa_dev *vdpa; + u32 bar_index; + u64 size = 0; + + if (!mdev) + return -EINVAL; + + vdpa = mdev_get_drvdata(mdev); + if (!vdpa) + return -EINVAL; + + bar_index = region_info->index; + if (bar_index >= VFIO_PCI_NUM_REGIONS)...