[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] xen/arm64: Fix incorrect DIRECTMAP_SIZE calculation
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Mon, 16 Jan 2023 15:41:06 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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
- 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=reRyL0p8bwFUK45PxPrMWtUJPOIAApiXXP6NU2zUKZk=; b=NDa36JCpVNps3kC7a2lPu/TtikniYWpZIirJGV5g4dM87pfodZoh5KahMzwbhshBgJQFWmQHcwvskcnSRe2a8qeeMh+ppmdXpz0DBUtrRZTMwkuX4NlFOtoJv6CfiRprxYz2zJv5X9kZ1sHjqz21TVz+X8n/KgF60ie9kGNj2pQcWNUI1R5BYEdUQYhjk3fONNuwHTXASBY2UMq1yHR76mPoBkV7a3T0Mz4OIME4sDnKSCgsw65ajuEWbjtp1BEdH7ztYFYIziHoiDxMSo1wPEa5E0dOtE7gAsTBM0BU2sgqIFGqz3U+EsuFjsEZLg/B5mg/VoExI4M/9joXgTV8aw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jj5dcNfCoHrwB3NpdKP16/RXaKZSbZsTwzSIaUO8pDTJAy5fULhNry6ZxlUdWHIZwOiUp5jtOBnChgWV5S2IELv6/dtJvOCdsoYF+aISer6jpE4d+iHWuKZl7gv3ZO2KUj737fasrTJ9zN0jRW3cgtNWQ1PPrYo+bvI8lh8wXC1w64acNVY83jvxzo5wv+Sdl4upnLnCp5cbIIYAApaofq0sqQIgSZutrRlPQlF1hcf/WN75aEnUBkaMGREfLffBEI6DNx9aelXyBhbPSKWwpd+ZLECoNfJoUpKlFFxDZAarP+FvVs/J8psmhU80F/8Yw0Vh01QC8WByBstuLPlE7A==
- Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Mon, 16 Jan 2023 14:45:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
The direct mapped area occupies L0 slots from 256 to 265 (i.e. 10 slots),
resulting in 5TB (512GB * 10) of virtual address space. However, due to
incorrect slot subtraction (we take 9 slots into account) we set
DIRECTMAP_SIZE to 4.5TB instead. Fix it.
Fixes: 5263507b1b4a ("xen: arm: Use a direct mapping of RAM on arm64")
Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
xen/arch/arm/include/asm/config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/arm/include/asm/config.h
b/xen/arch/arm/include/asm/config.h
index 0fefed1b8aa9..16213c8b677f 100644
--- a/xen/arch/arm/include/asm/config.h
+++ b/xen/arch/arm/include/asm/config.h
@@ -157,7 +157,7 @@
#define FRAMETABLE_NR (FRAMETABLE_SIZE / sizeof(*frame_table))
#define DIRECTMAP_VIRT_START SLOT0(256)
-#define DIRECTMAP_SIZE (SLOT0_ENTRY_SIZE * (265-256))
+#define DIRECTMAP_SIZE (SLOT0_ENTRY_SIZE * (266 - 256))
#define DIRECTMAP_VIRT_END (DIRECTMAP_VIRT_START + DIRECTMAP_SIZE - 1)
#define XENHEAP_VIRT_START directmap_virt_start
--
2.25.1
|