vfio/dev-assignment: potential pci_block_user_cfg_access nesting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alex,

just ran into some corner case with my reanimated IRQ sharing patches
that may affect vfio as well:

How are vfio_enable/disable_intx synchronized against all other possible
spots that call pci_block_user_cfg_access?

I hit the recursion bug check in pci_block_user_cfg_access with my code
which takes the user_cfg lock like vfio does. It likely races with
pci_reset_function here - and should do so in vfio as well.

Just taking some lock would mean having to run pci_reset_function with
IRQs disabled to synchronize with the IRQ handler (not sure if that is
possible at all). Alternatively, we would have to disable the interrupt
line or deregister the IRQ while resetting. Or we perform INTx mask
manipulation in an unsynchronized fashion, resolving races with user
space differently (still need to think about this option).

Any other thoughts?

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux