search for: vm_request_multiple_irq

Displaying 6 results from an estimated 6 matches for "vm_request_multiple_irq".

2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...> >> Signed-off-by: Shannon Zhao <zhaoshenglong at huawei.com> > > > So how does guest discover whether host device supports multiple IRQs? Guest uses vm_try_to_find_vqs to check whether it can get multiple IRQs like virtio-pci uses vp_try_to_find_vqs. And within function vm_request_multiple_irqs, guest check whether the number of IRQs host device gives is equal to the number we want. for (i = 0; i < nirqs; i++) { irq = platform_get_irq(vm_dev->pdev, i); if (irq == -ENXIO) goto error; } If we can't get the expected number of IRQs, return error and this try fails. Then...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...> >> Signed-off-by: Shannon Zhao <zhaoshenglong at huawei.com> > > > So how does guest discover whether host device supports multiple IRQs? Guest uses vm_try_to_find_vqs to check whether it can get multiple IRQs like virtio-pci uses vp_try_to_find_vqs. And within function vm_request_multiple_irqs, guest check whether the number of IRQs host device gives is equal to the number we want. for (i = 0; i < nirqs; i++) { irq = platform_get_irq(vm_dev->pdev, i); if (irq == -ENXIO) goto error; } If we can't get the expected number of IRQs, return error and this try fails. Then...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...n Zhao <zhaoshenglong at huawei.com> > > > > > > So how does guest discover whether host device supports multiple IRQs? > > Guest uses vm_try_to_find_vqs to check whether it can get multiple IRQs > like virtio-pci uses vp_try_to_find_vqs. And within function > vm_request_multiple_irqs, guest check whether the number of IRQs host > device gives is equal to the number we want. OK but how does host specify the number of IRQs for a device? for pci this is done through the MSI-X capability register. > for (i = 0; i < nirqs; i++) { > irq = platform_get_irq(vm_dev-&gt...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...+ vm_dev->vm_vq_names = NULL; +} + +static void vm_del_vqs(struct virtio_device *vdev) +{ struct virtqueue *vq, *n; list_for_each_entry_safe(vq, n, &vdev->vqs, list) vm_del_vq(vq); - free_irq(platform_get_irq(vm_dev->pdev, 0), vm_dev); + vm_free_irqs(vdev); +} + +static int vm_request_multiple_irqs(struct virtio_device *vdev, int nirqs, + bool per_vq_irq) +{ + int err = -ENOMEM; + struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + unsigned i, v; + int irq = 0; + + vm_dev->num_irqs = nirqs; + vm_dev->used_irqs = 0; + + vm_dev->vm_vq_names = kmalloc_array(nirqs, sizeo...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...+ vm_dev->vm_vq_names = NULL; +} + +static void vm_del_vqs(struct virtio_device *vdev) +{ struct virtqueue *vq, *n; list_for_each_entry_safe(vq, n, &vdev->vqs, list) vm_del_vq(vq); - free_irq(platform_get_irq(vm_dev->pdev, 0), vm_dev); + vm_free_irqs(vdev); +} + +static int vm_request_multiple_irqs(struct virtio_device *vdev, int nirqs, + bool per_vq_irq) +{ + int err = -ENOMEM; + struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + unsigned i, v; + int irq = 0; + + vm_dev->num_irqs = nirqs; + vm_dev->used_irqs = 0; + + vm_dev->vm_vq_names = kmalloc_array(nirqs, sizeo...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...del_vqs(struct virtio_device *vdev) > +{ > struct virtqueue *vq, *n; > > list_for_each_entry_safe(vq, n, &vdev->vqs, list) > vm_del_vq(vq); > > - free_irq(platform_get_irq(vm_dev->pdev, 0), vm_dev); > + vm_free_irqs(vdev); > +} > + > +static int vm_request_multiple_irqs(struct virtio_device *vdev, int nirqs, > + bool per_vq_irq) > +{ > + int err = -ENOMEM; > + struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > + unsigned i, v; > + int irq = 0; > + > + vm_dev->num_irqs = nirqs; > + vm_dev->used_irqs = 0; > + &gt...