[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object
|
From: |
Duan, Zhenzhong |
|
Subject: |
RE: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object |
|
Date: |
Tue, 14 Nov 2023 10:18:42 +0000 |
>-----Original Message-----
>From: Cédric Le Goater <clg@redhat.com>
>Sent: Tuesday, November 14, 2023 5:41 PM
>Subject: Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object
>
>
>>> The only tool we have for configuring the schema is the 'if'
>>> conditional. 'if': 'CONFIG_IOMMUFD' compiles to #if
>>> defined(CONFIG_IOMMUFD) ... #endif. Your use of #ifdef CONFIG_IOMMUFD
>>> above suggests this is fine here.
>>>
>>> Symbols that are only defined in target-dependent compiles (see
>>> exec/poison.h) can only be used in target-dependent schema modules,
>>> i.e. the *-target.json.
>>
>> I'm fresh on Kconfig & qapi, but I have a weak idea:
>> Remove conditional check for backends/iommufd.c, like:
>>
>> system_ss.add(files('iommufd.c'))
>>
>> Then iommufd object is common and always supported, we will not see
>> "invalid object type: iommufd", even for platform other than i386,s390x,arm.
>>
>> On those platform not supporting iommufd, we can create an iommufd object
>> which is dummy, as no one will link to it to open /dev/iommufd
>
>In that case, the management layer would define a crippled vfio-pci
>device. I'd rather let the error occur or find a way to move the
>"iommufd" object and properties to a target dependent file. I don't
>see how this could be done though.
I see, error occur is better than a crippled vfio-pci device. Or else we
need to teach libvirt to also check /dev/iommu existence.
Thanks
Zhenzhong
- RE: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object, (continued)
- Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object, Markus Armbruster, 2023/11/08
- Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object, Cédric Le Goater, 2023/11/08
- Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object, Markus Armbruster, 2023/11/08
- Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object, Cédric Le Goater, 2023/11/08
- Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object, Markus Armbruster, 2023/11/09
- RE: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object, Duan, Zhenzhong, 2023/11/09
- Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object, Cédric Le Goater, 2023/11/14
- RE: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object,
Duan, Zhenzhong <=
[PATCH v4 27/41] util/char_dev: Add open_cdev(), Zhenzhong Duan, 2023/11/02
[PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend, Zhenzhong Duan, 2023/11/02