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

[XEN v8 3/5] xen/arm: guest_walk: LPAE specific bits should be enclosed within "ifndef CONFIG_PHYS_ADDR_T_32"


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Date: Fri, 2 Jun 2023 13:07:52 +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=YbSN1KzrxBtfNg1T90LwzY0QnI8vFdlODMDMDj2PcY8=; b=WGt7wzUN5WxpNuAzrXCEaeiDrEX0croZGmPYfgFrXZoOCueIfF4hTnt/Ci5GbPPydKpQx4i3s5E8nsjiYwS1Cr0cQPA/WDr83DllHHl9ggWMvttsHYVLS3OgFdOvYvZ0cPCZ1u1y6lcnzbZNSHaEMsoTs8aOITu4XAVrneIijePEJjqmSBD6bqTabpC4vTvcSJ3zBacU06RQMq4EdqKpqN2/PHO6xNNl+HjHA5EaTEUCF5IPcJnctmHjTg0NiueIeidyeIz7KtG6GM7IM28vBZxG4Ipwstn43sd2GiQrLPNgon2cj86AglzAQe7oMDDCz8hDCCsmN4LZbKimB/0/aQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IVO5ROO0VnlSEa6RRklkmrEe0SDfW6mb/K/rMgySPtDCuxxHQUnZ6tw589SgxoRjREtUbYJQVl30OyPJLwDcvlBwVuEH7DI01n7w2Y20f97VpoBUJGlHGKKEV1vi1//RLtKrF8rjlayaf8b1/Lz2f5BjKUCs9+WjyiTQuzaxascFKQEFtgKUUkIET08I52oNA0a1/nEsUmqeDaceHKIzriOXUmFYYyEU5JbHn6bE9PYAiuUfz9i2Z7LGmUyCDnG9CTn6GGUr/LnfYHVcs8xp/kX9Con7JtKXyjbQ7gUSwFWd0EzDV3GxdkzDqZyZrh8i1EZK8bQ1rPu4C+6DDZ0bbA==
  • Cc: <sstabellini@xxxxxxxxxx>, <stefano.stabellini@xxxxxxx>, <julien@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, <andrew.cooper3@xxxxxxxxxx>, <george.dunlap@xxxxxxxxxx>, <jbeulich@xxxxxxxx>, <wl@xxxxxxx>, <rahul.singh@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Fri, 02 Jun 2023 12:09:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

As the previous patch introduces CONFIG_PHYS_ADDR_T_32 to support 32 bit
physical addresses, the code specific to "Large Physical Address Extension"
(ie LPAE) should be enclosed within "ifndef CONFIG_PHYS_ADDR_T_32".

Refer xen/arch/arm/include/asm/short-desc.h, "short_desc_l1_supersec_t"
unsigned int extbase1:4;    /* Extended base address, PA[35:32] */
unsigned int extbase2:4;    /* Extended base address, PA[39:36] */

Thus, extbase1 and extbase2 are not valid when 32 bit physical addresses
are supported.

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
Changes from -
v1 - 1. Extracted from "[XEN v1 8/9] xen/arm: Other adaptations required to 
support 32bit paddr".

v2 - 1. Reordered this patch so that it appears after CONFIG_ARM_PA_32 is
introduced (in 6/9).

v3 - 1. Updated the commit message.
2. Added Ack.

v4 - 1. No changes.

v5 - 1. No changes.

v6 - 1. No changes.

v7 - 1. No changes.

 xen/arch/arm/guest_walk.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/guest_walk.c b/xen/arch/arm/guest_walk.c
index 43d3215304..c80a0ce55b 100644
--- a/xen/arch/arm/guest_walk.c
+++ b/xen/arch/arm/guest_walk.c
@@ -154,8 +154,10 @@ static bool guest_walk_sd(const struct vcpu *v,
             mask = (1ULL << L1DESC_SUPERSECTION_SHIFT) - 1;
             *ipa = gva & mask;
             *ipa |= (paddr_t)(pte.supersec.base) << L1DESC_SUPERSECTION_SHIFT;
+#ifndef CONFIG_PHYS_ADDR_T_32
             *ipa |= (paddr_t)(pte.supersec.extbase1) << 
L1DESC_SUPERSECTION_EXT_BASE1_SHIFT;
             *ipa |= (paddr_t)(pte.supersec.extbase2) << 
L1DESC_SUPERSECTION_EXT_BASE2_SHIFT;
+#endif /* CONFIG_PHYS_ADDR_T_32 */
         }
 
         /* Set permissions so that the caller can check the flags by herself. 
*/
-- 
2.17.1




 


Rackspace

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