On 21.11.25 12:57, Penny Zheng wrote:
> Function iommu_do_domctl() is the main entry for all iommu-related domctl-op,
> and shall be wrapped with CONFIG_MGMT_HYPERCALLS.
> Otherwise it will become unreachable when MGMT_HYPERCALLS=n, and hence
> violating Misra rule 2.1
>
> Signed-off-by: Penny Zheng <Penny.Zheng@amd.com>
> ---
> v3 -> v4:
> - new commit
> ---
> Commit "xen/domctl: wrap pci-subset iommu-related domctl op with
> CONFIG_MGMT_HYPERCALLS" and "xen/domctl: wrap device-tree-subset iommu-related
> domctl op with CONFIG_MGMT_HYPERCALLS" are the prereq commit.
> ---
> xen/drivers/passthrough/iommu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
> index c9425d6971..8812e38174 100644
> --- a/xen/drivers/passthrough/iommu.c
> +++ b/xen/drivers/passthrough/iommu.c
> @@ -625,6 +625,7 @@ void iommu_resume(void)
> iommu_vcall(iommu_get_ops(), resume);
> }
>
> +#ifdef CONFIG_MGMT_HYPERCALLS
> int iommu_do_domctl(
> struct xen_domctl *domctl, struct domain *d,
> XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
> @@ -645,6 +646,7 @@ int iommu_do_domctl(
>
> return ret;
> }
> +#endif /* CONFIG_MGMT_HYPERCALLS */1
"/1" type - build fail
>
> void iommu_crash_shutdown(void)
> {
--
Best regards,
-grygorii