On 12.12.2025 05:02, Penny Zheng wrote:
> Function iommu_do_dt_domctl() is the main entry for all device-tree-subset
> iommu-related domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS.
> Tracking its calling chain, the following functions shall all be wrapped
> with CONFIG_MGMT_HYPERCALLS:
> - make PCI_PASSTHROUGH depend on MGMT_HYPERCALLS
> - iommu_do_dt_domctl
>   - xsm_assign_dtdevice
>   - xsm_deassign_dtdevice
>   - iommu_deassign_dt_device
>     - arm_smmu_reassign_dev
>       - arm_smmu_deassign_dev
>         - arm_smmu_detach_dev
>           - arm_smmu_domain_remove_master
>     - ipmmu_reassign_device
>       - ipmmu_deassign_device
>         - ipmmu_detach_device
>   - iommu_remove_dt_device
>     - iommu_dt_device_is_assigned_locked
>   - dt_find_node_by_gpath
> Otherwise all the functions will become unreachable when MGMT_HYPERCALLS=n,
> and hence violating Misra rule 2.1
> Move codes closer to avoid scattering #ifdef
> 
> Signed-off-by: Penny Zheng <[email protected]>

Acked-by: Jan Beulich <[email protected]>


Reply via email to