Displaying 20 results from an estimated 180 matches for "irqf_shar".
Did you mean:
irqf_shared
2014 Sep 18
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
On Monday 01 September 2014 09:37:30, Michael S. Tsirkin wrote:
> Why do we need INT#x?
> How about setting IRQF_SHARED for the config interrupt
> while using MSI-X? You'd have to read ISR to check that the
> interrupt was intended for your device.
The virtio 0.9.5 spec says that ISR is "unused" when in MSI-X mode. I
don't think that you can depend on the device to set the configuration...
2014 Sep 18
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
On Monday 01 September 2014 09:37:30, Michael S. Tsirkin wrote:
> Why do we need INT#x?
> How about setting IRQF_SHARED for the config interrupt
> while using MSI-X? You'd have to read ISR to check that the
> interrupt was intended for your device.
The virtio 0.9.5 spec says that ISR is "unused" when in MSI-X mode. I
don't think that you can depend on the device to set the configuration...
2014 Oct 25
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...ice *vdev, unsigned nvqs,
struct virtqueue *vqs[],
vq_callback_t *callbacks[],
@@ -400,8 +425,13 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs,
unsigned int irq = platform_get_irq(vm_dev->pdev, 0);
int i, err;
- err = request_irq(irq, vm_interrupt, IRQF_SHARED,
- dev_name(&vdev->dev), vm_dev);
+ if (*vm_dev->isr_mem & VIRTIO_MMIO_F_IRQFD) {
+ err = request_irq(irq, vm_interrupt_irqfd, IRQF_SHARED,
+ dev_name(&vdev->dev), vm_dev);
+ } else {
+ err = request_irq(irq, vm_interrupt, IRQF_SHARED,
+ dev_name(&vdev->d...
2014 Oct 25
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...ice *vdev, unsigned nvqs,
struct virtqueue *vqs[],
vq_callback_t *callbacks[],
@@ -400,8 +425,13 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs,
unsigned int irq = platform_get_irq(vm_dev->pdev, 0);
int i, err;
- err = request_irq(irq, vm_interrupt, IRQF_SHARED,
- dev_name(&vdev->dev), vm_dev);
+ if (*vm_dev->isr_mem & VIRTIO_MMIO_F_IRQFD) {
+ err = request_irq(irq, vm_interrupt_irqfd, IRQF_SHARED,
+ dev_name(&vdev->dev), vm_dev);
+ } else {
+ err = request_irq(irq, vm_interrupt, IRQF_SHARED,
+ dev_name(&vdev->d...
2014 Oct 27
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...vqs[],
>> vq_callback_t *callbacks[],
>> @@ -400,8 +425,13 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs,
>> unsigned int irq = platform_get_irq(vm_dev->pdev, 0);
>> int i, err;
>>
>> - err = request_irq(irq, vm_interrupt, IRQF_SHARED,
>> - dev_name(&vdev->dev), vm_dev);
>> + if (*vm_dev->isr_mem & VIRTIO_MMIO_F_IRQFD) {
>> + err = request_irq(irq, vm_interrupt_irqfd, IRQF_SHARED,
>> + dev_name(&vdev->dev), vm_dev);
>> + } else {
>> + err = request_irq(irq, vm_i...
2014 Oct 27
1
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...vqs[],
>> vq_callback_t *callbacks[],
>> @@ -400,8 +425,13 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs,
>> unsigned int irq = platform_get_irq(vm_dev->pdev, 0);
>> int i, err;
>>
>> - err = request_irq(irq, vm_interrupt, IRQF_SHARED,
>> - dev_name(&vdev->dev), vm_dev);
>> + if (*vm_dev->isr_mem & VIRTIO_MMIO_F_IRQFD) {
>> + err = request_irq(irq, vm_interrupt_irqfd, IRQF_SHARED,
>> + dev_name(&vdev->dev), vm_dev);
>> + } else {
>> + err = request_irq(irq, vm_i...
2014 Sep 21
2
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
On Sunday 21 September 2014 11:09:14, Michael S. Tsirkin wrote:
> On Thu, Sep 18, 2014 at 09:18:37PM +0200, Stefan Fritsch wrote:
> > On Monday 01 September 2014 09:37:30, Michael S. Tsirkin wrote:
> > > Why do we need INT#x?
> > > How about setting IRQF_SHARED for the config interrupt
> > > while using MSI-X? You'd have to read ISR to check that the
> > > interrupt was intended for your device.
> >
> >
> >
> > The virtio 0.9.5 spec says that ISR is "unused" when in MSI-X
> > mode. I don...
2014 Sep 21
2
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
On Sunday 21 September 2014 11:09:14, Michael S. Tsirkin wrote:
> On Thu, Sep 18, 2014 at 09:18:37PM +0200, Stefan Fritsch wrote:
> > On Monday 01 September 2014 09:37:30, Michael S. Tsirkin wrote:
> > > Why do we need INT#x?
> > > How about setting IRQF_SHARED for the config interrupt
> > > while using MSI-X? You'd have to read ISR to check that the
> > > interrupt was intended for your device.
> >
> >
> >
> > The virtio 0.9.5 spec says that ISR is "unused" when in MSI-X
> > mode. I don...
2014 Sep 01
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...on */
+ snprintf(vp_dev->config_msix_name, sizeof(*vp_dev->msix_names),
"%s-config", name);
- err = request_irq(vp_dev->msix_entries[v].vector,
- vp_config_changed, 0, vp_dev->msix_names[v],
+ err = request_irq(vp_dev->pci_dev->irq,
+ vp_config_changed,
+ IRQF_SHARED,
+ vp_dev->config_msix_name,
vp_dev);
- if (err)
- goto error;
- ++vp_dev->msix_used_vectors;
-
- iowrite16(v, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
- /* Verify we had enough resources to assign the vector */
- v = ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);...
2014 Sep 01
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...on */
+ snprintf(vp_dev->config_msix_name, sizeof(*vp_dev->msix_names),
"%s-config", name);
- err = request_irq(vp_dev->msix_entries[v].vector,
- vp_config_changed, 0, vp_dev->msix_names[v],
+ err = request_irq(vp_dev->pci_dev->irq,
+ vp_config_changed,
+ IRQF_SHARED,
+ vp_dev->config_msix_name,
vp_dev);
- if (err)
- goto error;
- ++vp_dev->msix_used_vectors;
-
- iowrite16(v, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
- /* Verify we had enough resources to assign the vector */
- v = ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);...
2017 Feb 03
2
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
...p_dev->msix_names), "%s-%s",
> dev_name(&vp_dev->vdev.dev), names[i]);
> err = request_irq(pci_irq_vector(vp_dev->pci_dev, msix_vec),
> - vring_interrupt, 0,
> - vp_dev->msix_names[msix_vec],
> - vqs[i]);
> + vring_interrupt, IRQF_SHARED,
> + vp_dev->msix_names[i + 1], vqs[i]);
Do we need to check per_vq_vectors before dereferencing msix_names[i + 1] ?
Thanks
2017 Feb 03
2
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
...p_dev->msix_names), "%s-%s",
> dev_name(&vp_dev->vdev.dev), names[i]);
> err = request_irq(pci_irq_vector(vp_dev->pci_dev, msix_vec),
> - vring_interrupt, 0,
> - vp_dev->msix_names[msix_vec],
> - vqs[i]);
> + vring_interrupt, IRQF_SHARED,
> + vp_dev->msix_names[i + 1], vqs[i]);
Do we need to check per_vq_vectors before dereferencing msix_names[i + 1] ?
Thanks
2014 Sep 21
0
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
On Thu, Sep 18, 2014 at 09:18:37PM +0200, Stefan Fritsch wrote:
> On Monday 01 September 2014 09:37:30, Michael S. Tsirkin wrote:
> > Why do we need INT#x?
> > How about setting IRQF_SHARED for the config interrupt
> > while using MSI-X? You'd have to read ISR to check that the
> > interrupt was intended for your device.
>
> The virtio 0.9.5 spec says that ISR is "unused" when in MSI-X mode. I
> don't think that you can depend on the device t...
2014 Oct 26
0
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...struct virtqueue *vqs[],
> vq_callback_t *callbacks[],
> @@ -400,8 +425,13 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs,
> unsigned int irq = platform_get_irq(vm_dev->pdev, 0);
> int i, err;
>
> - err = request_irq(irq, vm_interrupt, IRQF_SHARED,
> - dev_name(&vdev->dev), vm_dev);
> + if (*vm_dev->isr_mem & VIRTIO_MMIO_F_IRQFD) {
> + err = request_irq(irq, vm_interrupt_irqfd, IRQF_SHARED,
> + dev_name(&vdev->dev), vm_dev);
> + } else {
> + err = request_irq(irq, vm_interrupt, IRQF_SHARED,
&...
2014 Oct 27
0
[RFC PATCH 2/2] Assign a new irq handler while irqfd enabled
...vq_callback_t *callbacks[],
> >> @@ -400,8 +425,13 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs,
> >> unsigned int irq = platform_get_irq(vm_dev->pdev, 0);
> >> int i, err;
> >>
> >> - err = request_irq(irq, vm_interrupt, IRQF_SHARED,
> >> - dev_name(&vdev->dev), vm_dev);
> >> + if (*vm_dev->isr_mem & VIRTIO_MMIO_F_IRQFD) {
> >> + err = request_irq(irq, vm_interrupt_irqfd, IRQF_SHARED,
> >> + dev_name(&vdev->dev), vm_dev);
> >> + } else {
> >>...
2019 Jul 02
2
[PATCH v2] virtio-mmio: add error check for platform_get_irq
...ce(vdev);
- unsigned int irq = platform_get_irq(vm_dev->pdev, 0);
+ int irq = platform_get_irq(vm_dev->pdev, 0);
int i, err, queue_idx = 0;
+ if (irq < 0) {
+ dev_err(&vdev->dev, "Cannot get IRQ resource\n");
+ return irq;
+ }
+
err = request_irq(irq, vm_interrupt, IRQF_SHARED,
dev_name(&vdev->dev), vm_dev);
if (err)
--
2.17.1
2019 Jul 02
2
[PATCH v2] virtio-mmio: add error check for platform_get_irq
...ce(vdev);
- unsigned int irq = platform_get_irq(vm_dev->pdev, 0);
+ int irq = platform_get_irq(vm_dev->pdev, 0);
int i, err, queue_idx = 0;
+ if (irq < 0) {
+ dev_err(&vdev->dev, "Cannot get IRQ resource\n");
+ return irq;
+ }
+
err = request_irq(irq, vm_interrupt, IRQF_SHARED,
dev_name(&vdev->dev), vm_dev);
if (err)
--
2.17.1
2014 Sep 01
1
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...ight be a (minor) spec
> violation in kvm.
I did some basic testing (multiple nics, scp, ping, etc), it works.
> Besides, INT#x really leads to terrible performance because
> sharing is forced even if there aren't many devices.
>
> Why do we need INT#x?
> How about setting IRQF_SHARED for the config interrupt
> while using MSI-X?
> You'd have to read ISR to check that the interrupt was
> intended for your device.
I have a draft patch to share one MSI-X for all virtio-config, it has
some problem in hotplugging devices. I will continue this way.
> > for co...
2014 Sep 01
1
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...ight be a (minor) spec
> violation in kvm.
I did some basic testing (multiple nics, scp, ping, etc), it works.
> Besides, INT#x really leads to terrible performance because
> sharing is forced even if there aren't many devices.
>
> Why do we need INT#x?
> How about setting IRQF_SHARED for the config interrupt
> while using MSI-X?
> You'd have to read ISR to check that the interrupt was
> intended for your device.
I have a draft patch to share one MSI-X for all virtio-config, it has
some problem in hotplugging devices. I will continue this way.
> > for co...
2014 Sep 21
2
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...Yes, virtio 0.9.5 has this bug. But in practice qemu always set this
> bit, so for qemu we could do that unconditionally. Pekka's lkvm tool
> doesn't unfortunately. It's easy to fix that, but it would be nicer to
> additionally probe for old versions of the tool, and disable IRQF_SHARED
> in that case.
>
> To complicate things, lkvm does not use a distinct subsystem vendor ID,
> in spite of the fact the virtio spec always required this explicitly.
I think I may be a bit confused here, but AFAIK we do set subsystem vendor
ID properly for our virtio-pci devices?...