Re: [PATCH 1/7] VFIO_IOMMU_TYPE1 workaround to build for platform devices

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

 



On 10/02/2013 08:14 AM, Alexander Graf wrote:

On 01.10.2013, at 21:21, Yoder Stuart-B08248 wrote:

static int __init vfio_iommu_type1_init(void)
{
-	if (!iommu_present(&pci_bus_type))
+#ifdef CONFIG_PCI
+	if (iommu_present(&pci_bus_type)) {
+		iommu_bus_type =&pci_bus_type;
+		/* For PCI targets, IOMMU_CAP_INTR_REMAP is required */
+		require_cap_intr_remap = true;
+	}
+#endif
+	if (!iommu_bus_type&&  iommu_present(&platform_bus_type))
+		iommu_bus_type =&platform_bus_type;
+
+	if(!iommu_bus_type)
		return -ENODEV;

	return vfio_register_iommu_driver(&vfio_iommu_driver_ops_type1);

Is it possible to have a system with both PCI and platform devices?  How
would you support that?  Thanks,

It most certainly is a requirement to support both.  This is how
all of our (FSL) SoCs will expect to work.

I thought the PCI bus emits a cookie that the system wide IOMMU can then use to differentiate the origin of the transaction? So the same IOMMU can be used for PCI as well as platform routing.

*can* be the same IOMMU, yes;
have to, no, so there can be multiple IOMMUs of different types.


Alex

_______________________________________________
iommu mailing list
iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/iommu

--
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