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

Re: [PATCH v1 2/2] xen/mmu: enable SMMU subsystem only in MMU


  • To: Julien Grall <julien@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • Date: Mon, 11 Nov 2024 13:24:32 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.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=XXHNFALuEV2daFMczbBeHtKOYxvpnm6eXAZYP6+tHlQ=; b=Exx7QnBpgo3LWadjH200LV1B53+MLQhReV3WZndd1tq0NBUaMKkvcTZNs6bcD4ppKxPtoVnf6+XOhfRll5SCVmo/8K/EV5DZFgiRLf0hywqtzH9I3+9OhT0TFakmlHPODTOgdu7s3Df72lXIEvQgWg4McGk2FtyQDJRUXjihRVrDNKTgKjgNHHX+RrgNfriY9Xq85JKKXaILPutsVJrE2YA4+iMXx8X5pBhEO4HKQTGRrXwg6NuHlF0ytHfpZFP7p36hIAh+C+wi1K+DWLKumbQg3h5fTqpuHFceBdwDL1nI2RctJHrUTgdql022Yi3lW9uym6dfHLKyVxvPAjyt2w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YIz0rNWhHUuJm25H3avVuvEmPcnb383JNqSUunoh9xVmDolZ0RHrGYWQO0y3aSljNtd2b505FI8ecwW1tvS8w4kWxXQTsy0ydSdqhE0hxzzINX6Vh958tdPmYKzFOUVniDZiQuO24LQ8WMlDX74D18BKGBhygpRx5ICsRTC9d3h05Tm5ZD6lghvbtGEuQ4tNz0kZlLm0tR0JCMe/LllQcQZekJ/sSyBdUEpxtiRG4V4x//UDIw/pL5uWih37bpq9K1MFuBRWOrLqkknRPqqbRj6+0HLjcNUGH/IOKqAYnZZNzTA74Z1XMqqDVv/pAEpTeZ7dbqJLm7zCcfJCRFLUYA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Penny Zheng <Penny.Zheng@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>
  • Delivery-date: Mon, 11 Nov 2024 13:24:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 11/11/2024 11:12, Julien Grall wrote:
Hi,
Hi Julien,

On 08/11/2024 19:59, Ayan Kumar Halder wrote:
From: Penny Zheng <Penny.Zheng@xxxxxxx>

In Xen, SMMU subsystem is supported for MMU system only. The reason being SMMU
driver uses the same page tables as MMU.
Thus, we make it dependent on CONFIG_MMU.

Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
---
  xen/arch/arm/Kconfig            | 2 +-
  xen/drivers/passthrough/Kconfig | 3 ++-
  2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 15b2e4a227..3699e148e9 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -16,7 +16,7 @@ config ARM
      select HAS_DEVICE_TREE
      select HAS_PASSTHROUGH
      select HAS_UBSAN
-    select IOMMU_FORCE_PT_SHARE
+    select IOMMU_FORCE_PT_SHARE if MMU

Realistically, everything under drivers/passthrough is MMU specific. So does it actually make any sense to select HAS_PASSTHROUGH right now?

Actually we are able to assign devices to different DomUs (eg UART1 to domU1) as long as the device isn't behind an IOMMU. So in our case, the passthrough device tree has this node

        uart@9c0b0000 {
            compatible = "arm,pl011\0arm,primecell";
            reg = <0x00 0x9c0b0000 0x00 0x10000>;
            interrupt-parent = <0x01>;
            interrupts = <0x00 0x07 0x04>;
            clock-names = "uartclk\0apb_pclk";
            clocks = <0x06 0x07>;
            xen,path = "/uart@9c0b0000";
            xen,reg = <0x00 0x9c0b0000 0x00 0x10000 0x00 0x9c0b0000>;
            xen,force-assign-without-iommu;
        };
So, should we still disable HAS_PASSTHROUGH for MPU ?

- Ayan


    config ARCH_DEFCONFIG
      string
diff --git a/xen/drivers/passthrough/Kconfig b/xen/drivers/passthrough/Kconfig
index 78edd80536..75ad403dd3 100644
--- a/xen/drivers/passthrough/Kconfig
+++ b/xen/drivers/passthrough/Kconfig
@@ -5,6 +5,7 @@ config HAS_PASSTHROUGH
  if ARM
  config ARM_SMMU
      bool "ARM SMMUv1 and v2 driver"
+    depends on MMU
      default y
      help
        Support for implementations of the ARM System MMU architecture
@@ -15,7 +16,7 @@ config ARM_SMMU
    config ARM_SMMU_V3
      bool "ARM Ltd. System MMU Version 3 (SMMUv3) Support" if EXPERT
-    depends on ARM_64 && (!ACPI || BROKEN)
+    depends on ARM_64 && (!ACPI || BROKEN) && MMU
      help
       Support for implementations of the ARM System MMU architecture
       version 3. Driver is in experimental stage and should not be used in

Cheers,




 


Rackspace

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