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

[XEN v2 11/11] xen/arm: p2m: Enable support for 32bit IPA


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Date: Tue, 17 Jan 2023 17:43:58 +0000
  • 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=5nDuDeqGPvT23nv75ZOIBleV+rCr7pLBOWXoJ8VggXg=; b=GPfTSl6dycvsx8crBIZOVcl/YOjUtuql06TX+aOi3b+fI30oVuxqOApcqHoNYyRYB89dKoJV/RbK+pOsvKZDbDBnUqy52hu7EbHLZZiOd9zci+uWuKMALugB+iQZ6Z5aQYOgszaow5dX+n6TUselqYn4zH4Ek6hyXqsycDH97J3PpAlyZ9shDgV80Gr3z7KwqtqAZh0MS+xmUUzrV8YDR/rKs9OyZZU8zHen3wUasxdlAjihfcihaRcDuHSPcV/XYJ8kXlcdwWM3skBqC6MQoF/Ieo6s+opSVHjMV+3p8IMV9jjLgiS69eVzocI/ZyjjGIpUfyBUbjYYe0mLXSaRSw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OBJjOCkPyaoxD6G7id62wRiaiWDS/1HY87hdxnzub2UNmcIXt+m0m44F9H9Yq696VilWXc889IefY6MpjEQm0bKoE/bvOz/RZdVwhwF5jHwfJYR/BgC3uLed3zkpr4ZxW/DlApTDfkg+cR0qdBzhPVJc8rssUR9ZcBgAbgMGPNerPRDwr3+CESrkvacorewa3/9CxK0pdIe3GK/RTRyPIxYp4G6voz6SIghcm/GIiJf/3wF9TRcKlAcSjpc2bBgkZtyfkX30QLa3YPfOXER6kCLXVDS05laULDKVCF5nrEjPRbSyCQotOSx2jZNoK36EYxOIjo5sLVgJ9loG8oZGVA==
  • Cc: <sstabellini@xxxxxxxxxx>, <stefano.stabellini@xxxxxxx>, <julien@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Tue, 17 Jan 2023 17:45:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

VTCR.T0SZ should be set as 0x20 to support 32bit IPA.
Refer ARM DDI 0487I.a ID081822, G8-9824, G8.2.171, VTCR,
"Virtualization Translation Control Register" for the bit descriptions.

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
---
Changes from -

v1 - New patch.

 xen/arch/arm/p2m.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 948f199d84..cfdea55e71 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -2266,13 +2266,17 @@ void __init setup_virt_paging(void)
     register_t val = VTCR_RES1|VTCR_SH0_IS|VTCR_ORGN0_WBWA|VTCR_IRGN0_WBWA;
 
 #ifdef CONFIG_ARM_32
-    if ( p2m_ipa_bits < 40 )
+    if ( p2m_ipa_bits < PADDR_BITS )
         panic("P2M: Not able to support %u-bit IPA at the moment\n",
               p2m_ipa_bits);
 
-    printk("P2M: 40-bit IPA\n");
-    p2m_ipa_bits = 40;
+    printk("P2M: %u-bit IPA\n",PADDR_BITS);
+    p2m_ipa_bits = PADDR_BITS;
+#ifdef CONFIG_ARM_PA_32
+    val |= VTCR_T0SZ(0x20); /* 32 bit IPA */
+#else
     val |= VTCR_T0SZ(0x18); /* 40 bit IPA */
+#endif
     val |= VTCR_SL0(0x1); /* P2M starts at first level */
 #else /* CONFIG_ARM_64 */
     static const struct {
-- 
2.17.1




 


Rackspace

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