>-----Original Message-----
>From: Cédric Le Goater <[email protected]>
>Subject: Re: [PATCH v7 17/23] iommufd: Introduce a helper function to
>extract vendor capabilities
>
>On 10/24/25 10:43, Zhenzhong Duan wrote:
>> In VFIO core, we call iommufd_backend_get_device_info() to return vendor
>> specific hardware information data, but it's not good to extract this raw
>> data in VFIO core.
>>
>> Introduce host_iommu_extract_quirks() to help extracting the raw data and
>> return a bitmap in iommufd.c because it's the place defining
>> iommufd_backend_get_device_info().
>>
>> The other choice is to put vendor data extracting code in vendor vIOMMU
>> emulation file, but that will make those files mixed with vIOMMU
>> emulation and host IOMMU extracting code, also need a new callback in
>> PCIIOMMUOps. So we choose a simpler way as above.
>>
>> Suggested-by: Nicolin Chen <[email protected]>
>> Signed-off-by: Zhenzhong Duan <[email protected]>
>> Reviewed-by: Nicolin Chen <[email protected]>
>> ---
>>   include/hw/iommu.h                 |  5 +++++
>>   include/system/host_iommu_device.h | 15 +++++++++++++++
>>   backends/iommufd.c                 | 13 +++++++++++++
>>   3 files changed, 33 insertions(+)
>>
>> diff --git a/include/hw/iommu.h b/include/hw/iommu.h
>> index 9b8bb94fc2..6d61410703 100644
>> --- a/include/hw/iommu.h
>> +++ b/include/hw/iommu.h
>> @@ -22,4 +22,9 @@ enum viommu_flags {
>>       VIOMMU_FLAG_WANT_NESTING_PARENT = BIT_ULL(0),
>>   };
>>
>> +/* Host IOMMU quirks. Extracted from host IOMMU capabilities */
>> +enum host_iommu_quirks {
>> +    HOST_IOMMU_QUIRK_NESTING_PARENT_BYPASS_RO = BIT_ULL(0),
>
>
>This host IOMMU quirk definition in a vIOMMU header file is not very
>consistent.

I take it as general IOMMMU header, both vIOMMU info and host IOMMU info can be 
there.

Thanks
Zhenzhong

Reply via email to