[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/4] xen: arm: Enclose access to EL2 MMU specific registers under CONFIG_MMU
- To: <sstabellini@xxxxxxxxxx>, <bertrand.marquis@xxxxxxx>, <michal.orzel@xxxxxxx>, <ayan.kumar.halder@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <julien@xxxxxxx>
- From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
- Date: Thu, 8 Aug 2024 13:09:36 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.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 (0)
- 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=FHt71xPDWyVL/mL/ASV+Ga6PDc7Kh8iO9GgDEGgNhss=; b=aVeqsB+4XhSYIyy824UwXeeJ4hcagNPu48zsgzmH3gRabU5Sk+sbRL55ItB0AxQt7VKL4wWXflJBhy5tl+GUGE0Z6YS2D73Epn8J0eYTV4kZyzPHJODzJpQU2twVsVWdTT8RH8we8DuSsBPWspPKCdtGEQIni0mEoRhEoIPo3Jby4Mh8MpzghmrnBR2395vvloRtncU96yEFaqbKBXGbqMY9/uJWyHNQd9T5rHUPSwg7bi0Sb55WbniVDAyw5h1Engc/NzclyoNBKQWG+h8P2N3VFis/RmFcYc1gqP5ki3NnRCo5SO9CHEvLD/9PVpkSPQUQ1pEgGe3G4B8VRZxbYA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i1KL6NZ9fVSt8GhNvSghW6Rv7MEJ6U6115eBdgd0QFs4r6K32r0LhliG2/lF2zVE/qlbgII0tvVj7CvtT9/273nTyuPpS85HD6uRrDdQ0ESmP5dMOw0scNfcsjhs8KBmRCvEsvr5pvpuHdagVpdQpszHrKF2pqfGsUzkP+PMZMo9q+zOoRSDZyvL6jq4xVNfkBK8kfA6jwW3M3TpfygrKMkzABkk9lzn/0u7KpeDzAxVDW9VL3dZHRAWS1p3b1xzXfIr7o420LIC53jXUPYduisUtqEZlUnG7aF9O5WKAIVLeCxmCwNzPGytOLUoppy4U7yvD8dGPwoDgOCe1xfbJQ==
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 08 Aug 2024 12:09:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
All the EL2 MMU specific registers are enclosed within CONFIG_MMU.
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
---
Changes from v1 :-
1. 'vttbr_el2' field is enclosed with ifdef.
2. No movement of code.
xen/arch/arm/traps.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index aac6c599f8..f51e1424cb 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -720,8 +720,10 @@ struct reg_ctxt {
uint32_t ifsr32_el2;
#endif
+#ifdef CONFIG_MMU
/* Hypervisor-side state */
uint64_t vttbr_el2;
+#endif
};
static const char *mode_string(register_t cpsr)
@@ -919,12 +921,16 @@ static void _show_registers(const struct cpu_user_regs
*regs,
#endif
}
printk(" VTCR_EL2: %"PRIregister"\n", READ_SYSREG(VTCR_EL2));
+#ifdef CONFIG_MMU
printk(" VTTBR_EL2: %016"PRIx64"\n", ctxt->vttbr_el2);
+#endif
printk("\n");
printk(" SCTLR_EL2: %"PRIregister"\n", READ_SYSREG(SCTLR_EL2));
printk(" HCR_EL2: %"PRIregister"\n", READ_SYSREG(HCR_EL2));
+#ifdef CONFIG_MMU
printk(" TTBR0_EL2: %016"PRIx64"\n", READ_SYSREG64(TTBR0_EL2));
+#endif
printk("\n");
printk(" ESR_EL2: %"PRIregister"\n", regs->hsr);
printk(" HPFAR_EL2: %"PRIregister"\n", READ_SYSREG(HPFAR_EL2));
--
2.25.1
|