[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 16/24] xen/domctl: wrap iommu-related domctl op with CONFIG_MGMT_HYPERCALLS


  • To: Penny Zheng <Penny.Zheng@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Fri, 21 Nov 2025 16:11:36 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Xo+uifZwV/WvF/M351HDnKMCvbufoV7D0uNOQ4gfSa4=; b=Z7jFQVlWufaLart7ONnRkLEU1HFNb2Rf0BZEhvkkWzObZ1Cu0DLnSrcvzNtdYJOvE4c0IwcLuvQZLcSNQYsfHbzbLlbtPcq28lTOo744roMufLj5y97YBoS1+vn6pfm9i/fS8oNpJluAskRHRc+JwkjcTol59mvKYTnxUzGMCNDVx9AxvOYbyT4YggHgxvV9Orry5u2uCwqoGEHlVVX/aLQXWdmGLrg8q2BhfGJ9FAF1TMPvrElVn+6wWdtTTKc7PKZ7gZ4TIY02mXMZv1eKlQMU+c9JnTqVJmyFIVEF+5weSnnhzDbwXYq8Bw1QWP2W97Nzjw8Ip+PKG/ydazPtuA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VsdDEGCcw8PFfR/ExVGroYrWy4A+CsiGppMqqh0iYnMimhub6wwogQWdbBiY4aToUNg7+/nhOfokELAbsmJJ1wipD/kxTNC/fgrRiSo3qmOPSUYE7T4Z/Wuy4MxkmAQCFSzhlxDXgkmSv8r2CcCbd+pUhwNcHHT2APMFxOospB51rstRmKkG/JkThtcFySRqz21e9HlUB6+mYmAtDO1Ge/S+d4cmyRf9rxtlpPNP+oLVGIyisvWAl9MjRW/0xoar4hsjPHmeYao/W2scAyLIao2E9iwgfdBopwBi/5pT7laKYwdSX2L3suCctEo+421ed948aIpEbigNebY/RDBxig==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: ray.huang@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 21 Nov 2025 14:11:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



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@xxxxxxx>
---
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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.