[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/15] tools/libs/light: Always enable IOMMU
- To: Anthony PERARD <anthony.perard@xxxxxxxxx>
- From: Henry Wang <xin.wang2@xxxxxxx>
- Date: Mon, 6 May 2024 11:17:06 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=cloud.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=d3hk1YdDFiTAoBiixgOKcQVHRL9CcqXxHTnZ3dq1RBs=; b=Naux0+UvGuNJ3MWeLUGQGupYhirlQ+wd/+kztJh3DcyIbaXDG3I9R3NYuMivuKO6wiPQKZSSzHamimWdhv5TbmNhIjvEaacy6ANbVHaK06cENb3h64xKDy1DzpA95Mpxo4d77rIZVw/nFv8sUSyxUWOFRoh85XxPTdwPCvqdyvTHXGoBsakLD3OKK2NECAhyrsUfG+T7q0d4Ki793+upIpG7bbSj35PtmsNuk7pA88BEO2FYr4XPzNFV6XAkmsH7brbQKn+B3t8b5G7DK0i3+uGbT1f4a1XvlJ54kodSDhMwTewwk41tNjHyzI+pp+E8xC4IAevGEJFEeAWMJ+HVVA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lbgZPesOC2rLzdSEt85MtUh/n6RTz/M74Wss+KVb7zUL4E8LkRAdqa4zzzgq65tgKu9zGwzyZecZSL40xqhP3X6Xp2LKZA6j7igougWAv9Tg2fXDzCuETkzF+HSXR8Mmo3zNng2Xcvmo34dRSrZ5i2hm0oMhfaEzjjQyhsPpH2L4ZeauyTSIOJXwyNUKZIOOiYnMiQNSDChVKHZEhqcZ1ZzF0ji866rnCYjct0dHjgAtt0pvj1yHxf9KgGH+OoykQucK7GXA7nA3YItxSmQU5jciIE28HjkWLQtUwTHsmqiD8gxTzEGNB0d0WVAn9mt4lqXOpcueCVDWixyLv+Bvrw==
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
- Delivery-date: Mon, 06 May 2024 03:17:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Anthony,
On 5/1/2024 9:47 PM, Anthony PERARD wrote:
On Wed, Apr 24, 2024 at 11:34:38AM +0800, Henry Wang wrote:
For overlay with iommu functionality to work with running VMs, we need
to enable IOMMU when iomem presents for the domains.
Signed-off-by: Vikram Garhwal <fnu.vikram@xxxxxxxxxx>
Signed-off-by: Henry Wang <xin.wang2@xxxxxxx>
---
tools/libs/light/libxl_arm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c
index 1cb89fa584..dd5c9f4917 100644
--- a/tools/libs/light/libxl_arm.c
+++ b/tools/libs/light/libxl_arm.c
@@ -222,6 +222,12 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc,
config->arch.sve_vl = d_config->b_info.arch_arm.sve_vl / 128U;
}
+#ifdef LIBXL_HAVE_DT_OVERLAY
libxl_arm.c is only build on Arm, so this should be defined, so no need
to check.
Ah sure, I was just thought in the future RISC-V/PPC may have the same,
but you are correct. I will remove the check.
+ if (d_config->b_info.num_iomem) {
+ config->flags |= XEN_DOMCTL_CDF_iommu;
Is this doing the same thing as the previous patch?
I think so, yes, we need the IOMMU flag to be set if we want to assign a
device from a DT node protected by IOMMU.
Kind regards,
Henry
Thanks,
|