>-----Original Message-----
>From: Cédric Le Goater <[email protected]>
>Subject: Re: [PATCH v9 00/19] intel_iommu: Enable first stage translation for
>passthrough device
...
>>>> Below is an example to enable first stage translation for passthrough
>>> device:
>>>>
>>>> -M q35,...
>>>> -device intel-iommu,x-scalable-mode=on,x-flts=on...
>>>> -object iommufd,id=iommufd0 -device
>>> vfio-pci,iommufd=iommufd0,...
>>>
>>> What about libvirt support ? There are patches to enable IOMMUFD
>>> support with device assignment but I don't see anything related
>>> to first stage translation. Is there a plan ?
>>
>> I think IOMMUFD support in libvirt is non-trivial, good to know there is
>progress.
>> But I didn't find a match in libvirt mailing list,
>https://lists.libvirt.org/archives/search?q=iommufd
>> Do you have a link?
>
>Here :
>
>
>https://lists.libvirt.org/archives/list/[email protected]/thread/KFYUQGMX
>WV64QPI245H66GKRNAYL7LGB/
Thanks
>
>There might be an update. We should ask Nathan.
>
>> I think first stage support is trivial, only to support a new property
><...x-flts=on/off>.
>> I can apply a few time resource from my manager to work on it after this
>series is merged.
>> It's also welcome if anyone is interested to take it.
>
>ok. So, currently, we have no way to benefit from translation
>acceleration on the host unless we directly set the 'x-flts'
>property on the QEMU command line.
Yes, thanks for reminding.
I'll try add 'x-flts' support to libvirt to fill the gap recently,
I will take one week vacation starting this Friday, may try it after vacation.
>
>>> This raises a question. Should ftls support be automatically enabled
>>> based on the availability of an IOMMUFD backend ?
>>
>> Yes, if user doesn't force it off, like <...iommufd='off'> and IOMMUFD
>backend available, we can enable it automatically.
>
>The plan is to keep VFIO IOMMU Type1 as the default host IOMMU
>backend to maintain a consistent behavior. If an IOMMUFD backend
>is required, it should be set explicitly. One day we might revisit
>this choice and change the default. Not yet.
OK, maybe we need to maintain consistent behavior for intel_iommu too,
if first-stage is required, it should be set explicitly, if not set, default to
second stage(shadow page).
>
>
>>>> Test done:
>>>> - VFIO devices hotplug/unplug
>>>> - different VFIO devices linked to different iommufds
>>>> - vhost net device ping test
>>>> - migration with QAT passthrough
>>>
>>> Did you do any experiments with active mlx5 VFs ?
>>
>> No, there are only a few device drivers supporting VFIO migration and we
>only have QAT.
>> Let me know if you see issue on other devices.
>Since we lack libvirt integration (of flts), the tests need
>to be run manually which is more complex for QE. IOW, it will
>take more time but we should definitely evaluate other devices.
Oh, if you mean nesting feature test, we did play with different devices we had,
ixgbevf, ICE vf, DSA and QAT. For VFIO migration with nesting, we only tested
QAT.
Thanks
Zhenzhong