>-----Original Message----- >From: Nicolin Chen <nicol...@nvidia.com> >Subject: Re: [PATCH v6 18/22] iommufd: Introduce a helper function to >extract vendor capabilities > >On Wed, Sep 24, 2025 at 08:05:36AM +0000, Duan, Zhenzhong wrote: >> >uint64_t host_iommu_extract_quirks(enum iommu_hw_info_type, >> >VendorCaps *caps) >> >{ >> > uint64_t quirks = 0; >> > >> >#if defined(CONFIG_VTD) >> >> I have applied all suggested change except CONFIG_VTD here as it's a >device config and iommufd.c is device agnostic, it doesn't recognize >CONFIG_VTD. >> >> ../backends/iommufd.c:419:13: error: attempt to use poisoned >"CONFIG_VTD" >> >> I thought this is trivial and OK for not having CONFIG_VTD? > >Hmm.. I didn't expect that. It seems that QEMU does encourage >moving all vendor specific code to vendor specific file :-/ This make me think CONFIG_VTD should not be used here, it controls intel_iommu emulation, we may have a custom virtual machine without virtual intel_iommu but still need to check host IOMMU. If we do want a control, maybe kind of CONFIG_HOST_VTD rather than CONFIG_VTD. > >Anyway, I think it's fine to drop the ifdef. The VTD type and >cap structure are defined in the shared uAPI header. Agree. Thanks Zhenzhong
- [PATCH v6 00/22] intel_iommu: Enable first stage translati... Zhenzhong Duan
- [PATCH v6 01/22] intel_iommu: Rename vtd_ce_get_rid2p... Zhenzhong Duan
- [PATCH v6 12/22] intel_iommu: Handle PASID cache inva... Zhenzhong Duan
- [PATCH v6 18/22] iommufd: Introduce a helper function... Zhenzhong Duan
- Re: [PATCH v6 18/22] iommufd: Introduce a helper ... Nicolin Chen
- RE: [PATCH v6 18/22] iommufd: Introduce a hel... Duan, Zhenzhong
- Re: [PATCH v6 18/22] iommufd: Introduce a... Nicolin Chen
- RE: [PATCH v6 18/22] iommufd: Introd... Duan, Zhenzhong
- [PATCH v6 21/22] intel_iommu: Enable host device when... Zhenzhong Duan
- [PATCH v6 17/22] intel_iommu: Replay all pasid bindin... Zhenzhong Duan
- [PATCH v6 16/22] intel_iommu: Propagate PASID-based i... Zhenzhong Duan
- [PATCH v6 08/22] vfio/iommufd: Force creating nesting... Zhenzhong Duan
- [PATCH v6 15/22] intel_iommu: Bind/unbind guest page ... Zhenzhong Duan
- [PATCH v6 13/22] intel_iommu: Reset pasid cache when ... Zhenzhong Duan
- [PATCH v6 07/22] intel_iommu: Introduce a new structu... Zhenzhong Duan
- [PATCH v6 05/22] hw/pci: Introduce pci_device_get_vio... Zhenzhong Duan
- Re: [PATCH v6 05/22] hw/pci: Introduce pci_device... Nicolin Chen
- Re: [PATCH v6 05/22] hw/pci: Introduce pci_de... Nicolin Chen