On 20/12/2022 8:57 pm, Xenia Ragiadakou wrote: > > On 12/20/22 19:01, Jan Beulich wrote: >> On 19.12.2022 07:34, Xenia Ragiadakou wrote: >>> Currently, for x86 platforms, Xen does not provide to the users any >>> configuration control over the IOMMU support and can only be built with >>> both AMD and Intel IOMMU drivers enabled. >>> However, there are use cases, e.g in safety-critical systems, that >>> require >>> Xen to be able to be configured to exclude unused code. A smaller >>> tailored >>> configuration would help Xen to meet faster certification >>> requirements for >>> individual platforms. >>> >>> Introduce two new Kconfig options, AMD_IOMMU and INTEL_VTD, to allow >>> code >>> specific to each IOMMU technology to be separated and, when not >>> required, >>> stripped. AMD_IOMMU enables IOMMU support for platforms that >>> implement the >>> AMD I/O Virtualization Technology. INTEL_VTD enables IOMMU support for >>> platforms that implement the Intel Virtualization Technology for >>> Directed I/O. >>> >>> Since no functional change is intended regarding the default >>> configuration >>> of an x86 system, both options depend on x86 and default to 'y'. >> >> But do things also build successfully when one or both options are >> disabled? >> I have to say that I would be quite surprised if that worked without >> further >> adjustments. In which case initially these options want to be >> prompt-less, >> with the prompts only added once 'n' also works. > > Without applying the whole series, disabling any of them or both won't > work. Ok.
To do a multi-step implementation, you start with config FOO bool y then rearrange them main code to use CONFIG_FOO as appropriate, then have a final patch that adds a Kconfig name, help text, etc which is what makes the config option user selectable and able to be turned off. ~Andrew