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

[ImageBuilder][PATCH] Add DOMU_TRAP_UNMAP parameter to control unmapped access behavior


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Tue, 11 Nov 2025 22:05:47 +0000
  • Accept-language: en-US, ru-RU
  • 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=latH6tYcpoTTr0oBLr56i5bL242qq6FJCNkhqLqSt0Q=; b=cJ1W50gbTkxQggEM5VGfjdi0MU4OZcExfq/6dikZlA41pEa0g9oHkyU//kIDz94G2kTXXsXD5u2TaVSJWr667MoQl1pn14gjmShBK1FgD7w1VBHnK25WIwwN8gPpclTa7O7rajX3mn+Cbs7sEWTVVgXXcnmoktiMDvszzYAWN/PTHA9pKjBkkC5wQrs3HvSunLI5l4zkcmm6/Cvf7m3V3qu58JPchHQ6UxFWNeNtxBGdZKnd2MGPjGcnJeI8UeSN2qY/79BLjFDlOGKaV2tgS8mbLzot3jmOGnLbyBMyMcjM+VA47tx1nYvVcjXpfTjO+0ec2po7zptmBd3lYniTRQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WOBsIUnQ3ntrypGI5K8ttSoLtYCd/MlqTBHR5m1WncV6Pyd+5eIjC7BVazXZjkoqf/lttjwWGhHfv2LJG/nWVT7BZqOWx6n2cAxdgOIiCUP3MpWw2QYQK+kftTsrWLyBMCFYt7hbWiDIOVWC+d9tYXRM/PCVXUHmK9+BTRlitoFHdNxmiv/i5S2VsZokJNMzcNgz4UPINZUphevCE8W6kvvtR/KxP05CS+BNH/dcAKgul+wrmoTJ/OlvChhtd9j8obUdGlMiEt1yg2i8upd+YPR3eM5RqEJNERCuioYsRW91DHSpyuDh6vSz0uEIUVJ5ugOrSWL8pBPQRDaZvwSg0g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Ayan Kumar Halder <ayankuma@xxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Tue, 11 Nov 2025 22:06:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcU1dVYvgILOSeA0Gujbru3cwUKQ==
  • Thread-topic: [ImageBuilder][PATCH] Add DOMU_TRAP_UNMAP parameter to control unmapped access behavior

Introduce a new Arm-specific DOMU_TRAP_UNMAP parameter that allows
configuring how Xen handles domain accesses to unmapped address ranges.
This parameter corresponds to the "trap-unmapped-accesses" device tree
property.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
---
 README.md                | 6 ++++++
 scripts/uboot-script-gen | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/README.md b/README.md
index 2efac97..7ec7e7c 100644
--- a/README.md
+++ b/README.md
@@ -319,6 +319,12 @@ Where:
   2: Hardware
   4: Xenstore
 
+- DOMU_TRAP_UNMAP[number] is an Arm-only option that configures handling of
+  domain accesses to unmapped address ranges. It is optional and has no effect
+  on x86. If set to 0, domain reads will return all bits as ones corresponding
+  to the access size and writes will be ignored. If set to 1, such accesses 
will
+  trap. The default is 1 when not specified.
+
 - LINUX is optional but specifies the Linux kernel for when Xen is NOT
   used.  To enable this set any LINUX\_\* variables and do NOT set the
   XEN variable.
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index e319de8..7912cc7 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -493,6 +493,11 @@ function xen_device_tree_editing()
             dt_set "/chosen/domU$i" "capabilities" "int" "$caps"
         fi
 
+        if test -n "${DOMU_TRAP_UNMAP[$i]}" && (test "${DOMU_TRAP_UNMAP[$i]}" 
-eq "0" || test "${DOMU_TRAP_UNMAP[$i]}" -eq "1")
+        then
+            dt_set "/chosen/domU$i" "trap-unmapped-accesses" "int" 
"${DOMU_TRAP_UNMAP[$i]}"
+        fi
+
         if test -n "${DOMU_SHARED_MEM[i]}"
         then
             add_device_tree_static_shared_mem "/chosen/domU${i}" 
"${DOMU_SHARED_MEM[i]}"
-- 
2.34.1



 


Rackspace

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