Re: [PATCH] iommu: Include MSI susceptibility to DMA in creatingiommu groups

From: Joerg Roedel
Date: Fri Nov 18 2011 - 10:27:20 EST


On Fri, Nov 18, 2011 at 07:56:30AM -0700, Alex Williamson wrote:
> As you say, the interface is to tell userspace what devices the IOMMU
> can safely distinguish between. On x86, the IOMMU cannot distinguish
> DMA to the interrupt region between devices without interrupt remapping.
> Therefore, to only expose devices we can safely distinguish between, we
> shouldn't expose any devices by default if we don't provide this
> isolation. The interrupt remapping capability of the IOMMU isn't
> exposed to userspace, nor should userspace need to make the leap in
> understanding how MSIs are generated on a specific platform and whether
> interrupt remapping is required to provide isolation.

But the isolation domains are different. The iommu-group interface is
about device isolation and interrupt remapping is about DMA address
space isolation (MSI range vs. the rest). The iommu can still
distinguish between devices when it can not distinguish between DMA and
MSI interrupts.
So what you want to do belongs to the VFIO driver or (as it is today)
into the KVM device assignment code and not into the iommu-group
interface.

Regards,

Joerg

--
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/