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

[XEN v3 7/9] xen/arm: guest_walk: LPAE specific bits should be enclosed within "ifndef CONFIG_ARM_PA_32"


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Date: Wed, 8 Feb 2023 12:05:27 +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=SgrLGCe1IsqVgkkGPjJAA41OS8EEq9GuzCIZagEB9xo=; b=kya3y9szk6te3w8BCWZ/VLhZ2QdBvR4NlX1gQSWE9jbvh27QM3A3apwxO0gXWpxvs60fSGeB0mRP2mn3kebBtGoBH4S62GQ/q+b/tvNoM1mWNjWSCaP8H65fjn1A1QPMeEtCO0RWXPftYBY6DNveFXjKUBaBkvn0NRyxhvAnxP+y09JtlRn/kfqt/NnbN0JDLmWIUI3r32Kc6FvQiKiuq7yc2s8CxKpUfWwNsQu0P6tdWMF1T+3jBQQVnHSgozHU0LECByJP1SiTttF3zOF5uVIgEtICnv4cBNnZ/pSjNRKVlWzSWkGmyhKDZ1etcfUTpFaRRBufYJrKb3AvEMyqiA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YdLENqq37b9ZYS3K+BNukeD6w/d9RlR0+JxnIuDsvpZHVWYahTxZAzqgphCTZLOzdpFbXAp8ZwB2ZcROhhebuVSHu/i9Q8IwabjeEntX+DHHD+U8igBqUE8onbNuFdoP4iG7mUGEY719BflVBpg3VIMHhYoghlrjMLIPyDOYKqwwcFma7oUK1J8nhiiCxN23I0NCJZgDLSeN1vm+cZqU4/nsXlGnaw0RMN4bJT9Jwj5nzeGMBeoguWT7VsrY/hLh9J3SgAM4xgK7fX0siyIJutXVttIFtgYTIhaWcgRNAjGYshVuB2q9vj7CtJGKIGyOwBKA6/YRdjVar5MqkBvjiA==
  • 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: Wed, 08 Feb 2023 12:06:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

In the subsequent patch, we introduce "CONFIG_ARM_PA_32" to support
32 bit physical addresses. Thus, the code specific to
"Large Physical Address Extension" (ie LPAE) should be enclosed within
"ifndef CONFIG_ARM_PA_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>
---

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).

 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..0feb7b76ec 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_ARM_PA_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_ARM_PA_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®.