Displaying 20 results from an estimated 37 matches for "num_irq".
2012 Aug 31
2
[PATCH V2] libxl/xl: implement support for guest iooprt and irq permissions
...et<0 ){
+ LOGE(ERROR,
+ "failed give dom%d access to ioports %"PRIx32"-%"PRIx32,
+ domid, io->first, io->first + io->number - 1);
+ ret = ERROR_FAIL;
+ }
+ }
+
+ for (i = 0; i < d_config->b_info.num_irqs; i++) {
+ uint32_t irq = d_config->b_info.irqs[i];
+
+ LOG(DEBUG, "dom%d irq %"PRIx32, domid, irq);
+
+ ret = xc_domain_irq_permission(CTX->xch, domid, irq, 1);
+ if ( ret<0 ){
+ LOGE(ERROR,
+ "failed give dom%d access...
2019 Sep 03
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...> + if (!mdev)
> + return -EINVAL;
> +
> + vdpa = mdev_get_drvdata(mdev);
> + if (!vdpa)
> + return -ENODEV;
> +
> + switch (cmd) {
> + case VFIO_DEVICE_GET_INFO:
> + {
> + struct vfio_device_info info;
> +
> + minsz = offsetofend(struct vfio_device_info, num_irqs);
> +
> + if (copy_from_user(&info, (void __user *)arg, minsz)) {
> + ret = -EFAULT;
> + break;
> + }
> +
> + if (info.argsz < minsz) {
> + ret = -EINVAL;
> + break;
> + }
> +
> + info.flags = VFIO_DEVICE_FLAGS_VHOST;
> + info.num_regions...
2019 Sep 03
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...> + if (!mdev)
> + return -EINVAL;
> +
> + vdpa = mdev_get_drvdata(mdev);
> + if (!vdpa)
> + return -ENODEV;
> +
> + switch (cmd) {
> + case VFIO_DEVICE_GET_INFO:
> + {
> + struct vfio_device_info info;
> +
> + minsz = offsetofend(struct vfio_device_info, num_irqs);
> +
> + if (copy_from_user(&info, (void __user *)arg, minsz)) {
> + ret = -EFAULT;
> + break;
> + }
> +
> + if (info.argsz < minsz) {
> + ret = -EINVAL;
> + break;
> + }
> +
> + info.flags = VFIO_DEVICE_FLAGS_VHOST;
> + info.num_regions...
2012 Sep 21
8
PATCH [base vtpm and libxl patches 4/6] add iomem support to libxl
...t;, [
("kind", libxl_vga_interface_type),
])
@@ -284,6 +289,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
("ioports", Array(libxl_ioport_range, "num_ioports")),
("irqs", Array(uint32, "num_irqs")),
+ ("iomem", Array(libxl_iomem_range, "num_iomem")),
("u", KeyedUnion(None, libxl_domain_type, "type",
[("hvm", Struct(None, [("firmware", string),
diff --git a/tools/libxl/xl_cmdimpl....
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...struct virtio_mmio_device {
>> /* a list of queues so we can dispatch IRQs */
>> spinlock_t lock;
>> struct list_head virtqueues;
>> +
>> + /* multiple irq support */
>> + int single_irq_enabled;
>> + /* Number of available irqs */
>> + unsigned num_irqs;
>> + /* Used number of irqs */
>> + int used_irqs;
>> + /* Name strings for interrupts. */
>> + char (*vm_vq_names)[256];
>> };
>>
>> struct virtio_mmio_vq_info {
>> @@ -229,33 +238,53 @@ static bool vm_notify(struct virtqueue *vq)
>> re...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...struct virtio_mmio_device {
>> /* a list of queues so we can dispatch IRQs */
>> spinlock_t lock;
>> struct list_head virtqueues;
>> +
>> + /* multiple irq support */
>> + int single_irq_enabled;
>> + /* Number of available irqs */
>> + unsigned num_irqs;
>> + /* Used number of irqs */
>> + int used_irqs;
>> + /* Name strings for interrupts. */
>> + char (*vm_vq_names)[256];
>> };
>>
>> struct virtio_mmio_vq_info {
>> @@ -229,33 +238,53 @@ static bool vm_notify(struct virtqueue *vq)
>> re...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...@ -93,6 +94,10 @@ struct virtio_mmio_device {
> /* a list of queues so we can dispatch IRQs */
> spinlock_t lock;
> struct list_head virtqueues;
> +
> + /* IRQ range allocated to the device */
> + unsigned int irq_base;
> + unsigned int num_irqs;
> };
>
> struct virtio_mmio_vq_info {
> @@ -101,6 +106,9 @@ struct virtio_mmio_vq_info {
>
> /* the list node for the virtqueues list */
> struct list_head node;
> +
> + /* IRQ mapped to virtqueue */
> + unsigned int irq;
> };
>
&...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...@ -93,6 +94,10 @@ struct virtio_mmio_device {
> /* a list of queues so we can dispatch IRQs */
> spinlock_t lock;
> struct list_head virtqueues;
> +
> + /* IRQ range allocated to the device */
> + unsigned int irq_base;
> + unsigned int num_irqs;
> };
>
> struct virtio_mmio_vq_info {
> @@ -101,6 +106,9 @@ struct virtio_mmio_vq_info {
>
> /* the list node for the virtqueues list */
> struct list_head node;
> +
> + /* IRQ mapped to virtqueue */
> + unsigned int irq;
> };
>
&...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...mio.c
> @@ -122,6 +122,15 @@ struct virtio_mmio_device {
> /* a list of queues so we can dispatch IRQs */
> spinlock_t lock;
> struct list_head virtqueues;
> +
> + /* multiple irq support */
> + int single_irq_enabled;
> + /* Number of available irqs */
> + unsigned num_irqs;
> + /* Used number of irqs */
> + int used_irqs;
> + /* Name strings for interrupts. */
> + char (*vm_vq_names)[256];
> };
>
> struct virtio_mmio_vq_info {
> @@ -229,33 +238,53 @@ static bool vm_notify(struct virtqueue *vq)
> return true;
> }
>
> +/* H...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...; /* a list of queues so we can dispatch IRQs */
> >> spinlock_t lock;
> >> struct list_head virtqueues;
> >> +
> >> + /* multiple irq support */
> >> + int single_irq_enabled;
> >> + /* Number of available irqs */
> >> + unsigned num_irqs;
> >> + /* Used number of irqs */
> >> + int used_irqs;
> >> + /* Name strings for interrupts. */
> >> + char (*vm_vq_names)[256];
> >> };
> >>
> >> struct virtio_mmio_vq_info {
> >> @@ -229,33 +238,53 @@ static bool vm_no...
2019 Sep 04
0
[RFC v3] vhost: introduce mdev based hardware vhost backend
...> > + vdpa = mdev_get_drvdata(mdev);
> > + if (!vdpa)
> > + return -ENODEV;
> > +
> > + switch (cmd) {
> > + case VFIO_DEVICE_GET_INFO:
> > + {
> > + struct vfio_device_info info;
> > +
> > + minsz = offsetofend(struct vfio_device_info, num_irqs);
> > +
> > + if (copy_from_user(&info, (void __user *)arg, minsz)) {
> > + ret = -EFAULT;
> > + break;
> > + }
> > +
> > + if (info.argsz < minsz) {
> > + ret = -EINVAL;
> > + break;
> > + }
> > +
> > + in...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...o/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -122,6 +122,15 @@ struct virtio_mmio_device {
/* a list of queues so we can dispatch IRQs */
spinlock_t lock;
struct list_head virtqueues;
+
+ /* multiple irq support */
+ int single_irq_enabled;
+ /* Number of available irqs */
+ unsigned num_irqs;
+ /* Used number of irqs */
+ int used_irqs;
+ /* Name strings for interrupts. */
+ char (*vm_vq_names)[256];
};
struct virtio_mmio_vq_info {
@@ -229,33 +238,53 @@ static bool vm_notify(struct virtqueue *vq)
return true;
}
+/* Handle a configuration change: Tell driver if it wants to kno...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...o/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -122,6 +122,15 @@ struct virtio_mmio_device {
/* a list of queues so we can dispatch IRQs */
spinlock_t lock;
struct list_head virtqueues;
+
+ /* multiple irq support */
+ int single_irq_enabled;
+ /* Number of available irqs */
+ unsigned num_irqs;
+ /* Used number of irqs */
+ int used_irqs;
+ /* Name strings for interrupts. */
+ char (*vm_vq_names)[256];
};
struct virtio_mmio_vq_info {
@@ -229,33 +238,53 @@ static bool vm_notify(struct virtqueue *vq)
return true;
}
+/* Handle a configuration change: Tell driver if it wants to kno...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...(struct mdev_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...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...(struct mdev_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...
2012 Sep 27
18
[PATCH 09/11] add iomem support to libxl
...t;, [
("kind", libxl_vga_interface_type),
])
@@ -284,6 +289,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
("ioports", Array(libxl_ioport_range, "num_ioports")),
("irqs", Array(uint32, "num_irqs")),
+ ("iomem", Array(libxl_iomem_range, "num_iomem")),
("u", KeyedUnion(None, libxl_domain_type, "type",
[("hvm", Struct(None, [("firmware", string),
diff --git a/tools/libxl/xl_cmdimpl....
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...> + if (!mdev)
> + return -EINVAL;
> +
> + vdpa = mdev_get_drvdata(mdev);
> + if (!vdpa)
> + return -ENODEV;
> +
> + switch (cmd) {
> + case VFIO_DEVICE_GET_INFO:
> + {
> + struct vfio_device_info info;
> +
> + minsz = offsetofend(struct vfio_device_info, num_irqs);
> +
> + if (copy_from_user(&info, (void __user *)arg, minsz)) {
> + ret = -EFAULT;
> + break;
> + }
> +
> + if (info.argsz < minsz) {
> + ret = -EINVAL;
> + break;
> + }
> +
> + info.flags = VFIO_DEVICE_FLAGS_VHOST;
> + info.num_regions...
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...> + if (!mdev)
> + return -EINVAL;
> +
> + vdpa = mdev_get_drvdata(mdev);
> + if (!vdpa)
> + return -ENODEV;
> +
> + switch (cmd) {
> + case VFIO_DEVICE_GET_INFO:
> + {
> + struct vfio_device_info info;
> +
> + minsz = offsetofend(struct vfio_device_info, num_irqs);
> +
> + if (copy_from_user(&info, (void __user *)arg, minsz)) {
> + ret = -EFAULT;
> + break;
> + }
> +
> + if (info.argsz < minsz) {
> + ret = -EINVAL;
> + break;
> + }
> +
> + info.flags = VFIO_DEVICE_FLAGS_VHOST;
> + info.num_regions...
2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...ba device */
> #define VFIO_DEVICE_FLAGS_CCW (1 << 4) /* vfio-ccw device */
> #define VFIO_DEVICE_FLAGS_AP (1 << 5) /* vfio-ap device */
> +#define VFIO_DEVICE_FLAGS_VHOST (1 << 6) /* vfio-vhost device */
> __u32 num_regions; /* Max region index + 1 */
> __u32 num_irqs; /* Max IRQ index + 1 */
> };
> @@ -217,6 +218,7 @@ struct vfio_device_info {
> #define VFIO_DEVICE_API_AMBA_STRING "vfio-amba"
> #define VFIO_DEVICE_API_CCW_STRING "vfio-ccw"
> #define VFIO_DEVICE_API_AP_STRING "vfio-ap"
> +#define VFIO_DEVIC...
2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
..._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;
> +
&...