[dpdk-dev] [PATCH] vfio/noiommu: Don't use iommu_present() to track fake groups

Santosh Shukla sshukla at mvista.com
Wed Jan 27 14:41:29 CET 2016


On Wed, Jan 27, 2016 at 6:51 PM, Burakov, Anatoly
<anatoly.burakov at intel.com> wrote:
> Hi Alex,
>
>> On 01/23/2016 04:23 AM, Alex Williamson wrote:
>> > Using iommu_present() to determine whether an IOMMU group is real or
>> > fake has some problems.  First, apparently Power systems don't
>> > register an IOMMU on the device bus, so the groups and containers get
>> > marked as noiommu and then won't bind to their actual IOMMU driver.
>> > Second, I expect we'll run into the same issue as we try to support
>> > vGPUs through vfio, since they're likely to emulate this behavior of
>> > creating an IOMMU group on a virtual device and then providing a vfio
>> > IOMMU backend tailored to the sort of isolation they provide, which
>> > won't necessarily be fully compatible with the IOMMU API.
>> >
>> > The solution here is to use the existing iommudata interface to IOMMU
>> > groups, which allows us to easily identify the fake groups we've
>> > created for noiommu purposes.  The iommudata we set is purely
>> > arbitrary since we're only comparing the address, so we use the
>> > address of the noiommu switch itself.
>> >
>> > Reported-by: Alexey Kardashevskiy <aik at ozlabs.ru>
>> > Fixes: 03a76b60f8ba ("vfio: Include No-IOMMU mode")
>> > Signed-off-by: Alex Williamson <alex.williamson at redhat.com>
>>
>>
>>
>> Reviewed-by: Alexey Kardashevskiy <aik at ozlabs.ru>
>> Tested-by: Alexey Kardashevskiy <aik at ozlabs.ru>
>
> Tested bringing the NIC's up, encountered no issues. Curious if it also works for Santosh (CC'd) as he's one of the intended users of the No-IOMMU functionality, but otherwise seems to work.
>

Yes, Its works for virtio dpdk case too, Tested-by:

Thanks.
> Thanks,
> Anatoly


More information about the dev mailing list