search for: vfio_vhost_num_irq

Displaying 4 results from an estimated 4 matches for "vfio_vhost_num_irq".

Did you mean: vfio_vhost_num_irqs
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...v_device *mdev, + struct vfio_device_info *dev_info) +{ + struct vdpa_dev *vdpa; + + vdpa = mdev_get_drvdata(mdev); + if (!vdpa) + return -ENODEV; + + dev_info->flags = VFIO_DEVICE_FLAGS_VHOST | VFIO_DEVICE_RESET; + dev_info->num_regions = VFIO_VHOST_NUM_REGIONS; + dev_info->num_irqs = VFIO_VHOST_NUM_IRQS; + + return 0; +} + +static int vdpa_get_irq_info(struct mdev_device *mdev, + struct vfio_irq_info *info) +{ + struct vdpa_dev *vdpa; + + vdpa = mdev_get_drvdata(mdev); + if (!vdpa) + return -ENODEV; + + if (info->index != VFIO_VHOST_VQ_IRQ_INDEX) + return -EINVAL; + + info->flags =...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...v_device *mdev, + struct vfio_device_info *dev_info) +{ + struct vdpa_dev *vdpa; + + vdpa = mdev_get_drvdata(mdev); + if (!vdpa) + return -ENODEV; + + dev_info->flags = VFIO_DEVICE_FLAGS_VHOST | VFIO_DEVICE_RESET; + dev_info->num_regions = VFIO_VHOST_NUM_REGIONS; + dev_info->num_irqs = VFIO_VHOST_NUM_IRQS; + + return 0; +} + +static int vdpa_get_irq_info(struct mdev_device *mdev, + struct vfio_irq_info *info) +{ + struct vdpa_dev *vdpa; + + vdpa = mdev_get_drvdata(mdev); + if (!vdpa) + return -ENODEV; + + if (info->index != VFIO_VHOST_VQ_IRQ_INDEX) + return -EINVAL; + + info->flags =...
2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...ented regions return a size of zero. > + * Unimplemented IRQ types return a count of zero. > + */ > + > +enum { > + VFIO_VHOST_CONFIG_REGION_INDEX, > + VFIO_VHOST_NOTIFY_REGION_INDEX, > + VFIO_VHOST_NUM_REGIONS > +}; > + > +enum { > + VFIO_VHOST_VQ_IRQ_INDEX, > + VFIO_VHOST_NUM_IRQS > +}; > + Note that the vfio API has evolved a bit since vfio-pci started this way, with fixed indexes for pre-defined region types. We now support device specific regions which can be identified by a capability within the REGION_INFO ioctl return data. This allows a bit more flexibility,...
2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...info) > +{ > + struct vdpa_dev *vdpa; > + > + vdpa = mdev_get_drvdata(mdev); > + if (!vdpa) > + return -ENODEV; > + > + dev_info->flags = VFIO_DEVICE_FLAGS_VHOST | VFIO_DEVICE_RESET; > + dev_info->num_regions = VFIO_VHOST_NUM_REGIONS; > + dev_info->num_irqs = VFIO_VHOST_NUM_IRQS; > + > + return 0; > +} > + > +static int vdpa_get_irq_info(struct mdev_device *mdev, > + struct vfio_irq_info *info) > +{ > + struct vdpa_dev *vdpa; > + > + vdpa = mdev_get_drvdata(mdev); > + if (!vdpa) > + return -ENODEV; > + > + if (info->ind...