[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 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: Fri, 2 Aug 2024 13:14:43 +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=sEyWPlBd3oxoq5owatePmHZPc7oCgtMUIdm8ZJtjgDM=; b=Nz5oqFLGW1FaAJgIeLYcn0pVWE/Lx0kbirLzp8JriOoTZZicQwJfxyvBSTVG9eqdeUg/PX65v8qg13f0grendsE5hPTugstn8vdf6+VEQKGOSTcShiJT5YFb9+k6DR/3NXeyewWCLiKL5rAslquwPnc/5Xfqifi2+mIcVsgdJUSSZx7GUShbF0BLlbGxaoHGfOultfL+/7tLT0/FIp5oGEpMWDFKia9zHqIn8G75uYU6AJUmcF27JZWBnTfC8AzviPs1DpC3CfLUq8+aPzE6YBjQvMLCcAN42eJXAr1OYjBukvHCBd2mfGTQfyM1FOcmwJD0Z6quiq/CYNhSTuSRBQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oslAwda1dOk84CVTp2i4/WK6dl3r8449U7UftkgNjVvtkM0MiUShwwEPU+P6nVNRUsPqzqp0PCyUIyxnLKAJANf72Kjh/AF3kelOoHceuv1ciPazigdRZ9CFDp5OlnIuXEpG935mwTJ+eC+hHy/PmD/59CNQf2Wu5T0UQKbvg6JOyFZnF4Z0oE+Q0XwOIhrMip5Ao1hNB3h/PN5o8My3NujsVSlJHecU172J/oyORkJ7pcYCrjpWqHGYE1d9ZmbvyCfXtByFGNS1aUTU7Hib3NoHdiVegP6xWGVnwfbXltSrUHv2PQQ7ENFuz734nwZ1OsVmef1SUUmpg9una7OgVA==
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 02 Aug 2024 12:15:20 +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>
---
xen/arch/arm/traps.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index aac6c599f8..766aacee77 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -919,12 +919,14 @@ static void _show_registers(const struct cpu_user_regs
*regs,
#endif
}
printk(" VTCR_EL2: %"PRIregister"\n", READ_SYSREG(VTCR_EL2));
- printk(" VTTBR_EL2: %016"PRIx64"\n", ctxt->vttbr_el2);
printk("\n");
printk(" SCTLR_EL2: %"PRIregister"\n", READ_SYSREG(SCTLR_EL2));
printk(" HCR_EL2: %"PRIregister"\n", READ_SYSREG(HCR_EL2));
+#ifdef CONFIG_MMU
+ printk(" VTTBR_EL2: %016"PRIx64"\n", ctxt->vttbr_el2);
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));
@@ -956,7 +958,9 @@ void show_registers(const struct cpu_user_regs *regs)
if ( guest_mode(regs) && is_32bit_domain(current->domain) )
ctxt.ifsr32_el2 = READ_SYSREG(IFSR32_EL2);
#endif
+#ifdef CONFIG_MMU
ctxt.vttbr_el2 = READ_SYSREG64(VTTBR_EL2);
+#endif
_show_registers(regs, &ctxt, guest_mode(regs), current);
}
--
2.25.1
|