Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333234
b: refs/heads/master
c: 899649b
h: refs/heads/master
v: v3
  • Loading branch information
Alex Williamson committed Oct 10, 2012
1 parent 23bbbd1 commit 418453a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9dbdfd23b7638d054f3b0e70c64dfb9f297f2a9f
refs/heads/master: 899649b7d4ead76c19e39251ca886eebe3f811a8
13 changes: 12 additions & 1 deletion trunk/drivers/vfio/pci/vfio_pci_intrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,17 @@ static int vfio_intx_enable(struct vfio_pci_device *vdev)
return -ENOMEM;

vdev->num_ctx = 1;

/*
* If the virtual interrupt is masked, restore it. Devices
* supporting DisINTx can be masked at the hardware level
* here, non-PCI-2.3 devices will have to wait until the
* interrupt is enabled.
*/
vdev->ctx[0].masked = vdev->virq_disabled;
if (vdev->pci_2_3)
pci_intx(vdev->pdev, !vdev->ctx[0].masked);

vdev->irq_type = VFIO_PCI_INTX_IRQ_INDEX;

return 0;
Expand Down Expand Up @@ -419,7 +430,7 @@ static int vfio_intx_set_signal(struct vfio_pci_device *vdev, int fd)
* disable_irq won't.
*/
spin_lock_irqsave(&vdev->irqlock, flags);
if (!vdev->pci_2_3 && (vdev->ctx[0].masked || vdev->virq_disabled))
if (!vdev->pci_2_3 && vdev->ctx[0].masked)
disable_irq_nosync(pdev->irq);
spin_unlock_irqrestore(&vdev->irqlock, flags);

Expand Down

0 comments on commit 418453a

Please sign in to comment.