On Thu, Nov 10, 2016 at 05:56:50PM +0200, Noa Osherovich wrote: .../... >>>> As a result, the VFIO driver fails to start when more than one device >>>> function is passed-through to a VM if both have the same INTx pin. >>>> >> I don't see how the issue is related to the patch. INTx pin can be shared >> by multiple functions and it's not going to be changed by the patch. When >> the functions aren't claimed for capability to mask INTx from device side, >> the shared INTx (or hardware IRQ) has to be masked from host (IRQ controller) >> side. It does affect multiple VMs who are sharing thise INTx pin. I'm not >> sure if it's the problem you have? > >VFIO reads the broken_intx_masking field when it's used on the host (VFIO uses a >variable named pci_2_3). During vfio_intx_set_signal it sets the irqflags >variable to 0 if the pci_2_3 is 0. When the first function is assigned to the >guest, everything is OK. >When a second function with the same INT-x pin is assigned, VFIO checks that they >can share the IRQ. >The irqflags variable is then checked to see if IRQF_SHARED is set. If not, which >is the case here, VFIO fails to request IRQ thus failing and the guest can't start. > Noa, Thanks for the explanation. It makes sense. Thanks, Gavin -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html