All of lore.kernel.org
 help / color / mirror / Atom feed
From: Penny Zheng <penny.zheng@arm.com>
To: <xen-devel@lists.xenproject.org>, <sstabellini@kernel.org>,
	<julien@xen.org>
Cc: <Bertrand.Marquis@arm.com>, <Wei.Chen@arm.com>
Subject: [PATCH v5 03/11] xen/arm: avoid setting XEN_DOMCTL_CDF_iommu when IOMMU off
Date: Thu, 27 Jan 2022 07:49:21 +0000	[thread overview]
Message-ID: <20220127074929.502885-4-penny.zheng@arm.com> (raw)
In-Reply-To: <20220127074929.502885-1-penny.zheng@arm.com>

From: Stefano Stabellini <sstabellini@kernel.org>

When IOMMU is absent or shall not be used (trusted domain, performance,
hardware limitation, ..., etc), in which cases this commit avoids setting
XEN_DOMCTL_CDF_iommu to make those user cases possible and prevent failure
later during device assignment.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
---
v3 changes:
- new commit, split from the original "[PATCH v2 2/6] xen/arm: introduce
direct-map for domUs"
---
v4 changes:
- explain briefly in the commit message why we want to do device assignment
without IOMMU.
---
v5 changes:
- nothing changed
---
 xen/arch/arm/domain_build.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 6467e8ee32..c1e8c99f64 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -3047,7 +3047,8 @@ void __init create_domUs(void)
             panic("Missing property 'cpus' for domain %s\n",
                   dt_node_name(node));
 
-        if ( dt_find_compatible_node(node, NULL, "multiboot,device-tree") )
+        if ( dt_find_compatible_node(node, NULL, "multiboot,device-tree") &&
+             iommu_enabled )
             d_cfg.flags |= XEN_DOMCTL_CDF_iommu;
 
         if ( !dt_property_read_u32(node, "nr_spis", &d_cfg.arch.nr_spis) )
-- 
2.25.1



  parent reply	other threads:[~2022-01-27  7:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27  7:49 [PATCH v5 00/11] direct-map memory map Penny Zheng
2022-01-27  7:49 ` [PATCH v5 01/11] xen: introduce internal CDF_xxx flags for domain creation Penny Zheng
2022-02-09 12:27   ` Julien Grall
2022-01-27  7:49 ` [PATCH v5 02/11] xen: introduce CDF_directmap Penny Zheng
2022-02-09 12:42   ` Julien Grall
2022-02-09 13:21     ` Jan Beulich
2022-01-27  7:49 ` Penny Zheng [this message]
2022-02-09 14:16   ` [PATCH v5 03/11] xen/arm: avoid setting XEN_DOMCTL_CDF_iommu when IOMMU off Julien Grall
2022-01-27  7:49 ` [PATCH v5 04/11] xen/arm: introduce new helper parse_static_mem_prop and acquire_static_memory_bank Penny Zheng
2022-01-27  7:49 ` [PATCH v5 05/11] xen/arm: introduce direct-map for domUs Penny Zheng
2022-01-27  7:49 ` [PATCH v5 06/11] xen/arm: add ASSERT_UNREACHABLE in allocate_static_memory Penny Zheng
2022-01-27  7:49 ` [PATCH v5 07/11] xen/arm: if direct-map domain use native addresses for GICv2 Penny Zheng
2022-02-09 15:06   ` Julien Grall
2022-01-27  7:49 ` [PATCH v5 08/11] xen/arm: gate make_gicv3_domU_node with CONFIG_GICV3 Penny Zheng
2022-01-27  7:49 ` [PATCH v5 09/11] xen/arm: if direct-map domain use native addresses for GICv3 Penny Zheng
2022-02-09 15:16   ` Julien Grall
2022-01-27  7:49 ` [PATCH v5 10/11] xen/arm: if direct-map domain use native UART address and IRQ number for vPL011 Penny Zheng
2022-02-09 15:19   ` Julien Grall
2022-01-27  7:49 ` [PATCH v5 11/11] xen/docs: Document how to do passthrough without IOMMU Penny Zheng
2022-02-09 15:20   ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220127074929.502885-4-penny.zheng@arm.com \
    --to=penny.zheng@arm.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Wei.Chen@arm.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.