[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/29] target/arm: add RAZ/WI handling for DBGDTR[TX|RX]
|
From: |
Peter Maydell |
|
Subject: |
[PULL 05/29] target/arm: add RAZ/WI handling for DBGDTR[TX|RX] |
|
Date: |
Thu, 18 May 2023 13:50:43 +0100 |
From: Alex Bennée <alex.bennee@linaro.org>
The commit b3aa2f2128 (target/arm: provide stubs for more external
debug registers) was added to handle HyperV's unconditional usage of
Debug Communications Channel. It turns out that Linux will similarly
break if you enable CONFIG_HVC_DCC "ARM JTAG DCC console".
Extend the registers we RAZ/WI set to avoid this.
Cc: Anders Roxell <anders.roxell@linaro.org>
Cc: Evgeny Iakovlev <eiakovlev@linux.microsoft.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230516104420.407912-1-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/debug_helper.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c
index dfc8b2a1a5d..d41cc643b1b 100644
--- a/target/arm/debug_helper.c
+++ b/target/arm/debug_helper.c
@@ -949,8 +949,10 @@ static const ARMCPRegInfo debug_cp_reginfo[] = {
.access = PL0_R, .accessfn = access_tdcc,
.type = ARM_CP_CONST, .resetvalue = 0 },
/*
- * OSDTRRX_EL1/OSDTRTX_EL1 are used for save and restore of DBGDTRRX_EL0.
- * It is a component of the Debug Communications Channel, which is not
implemented.
+ * These registers belong to the Debug Communications Channel,
+ * which is not implemented. However we implement RAZ/WI behaviour
+ * with trapping to prevent spurious SIGILLs if the guest OS does
+ * access them as the support cannot be probed for.
*/
{ .name = "OSDTRRX_EL1", .state = ARM_CP_STATE_BOTH, .cp = 14,
.opc0 = 2, .opc1 = 0, .crn = 0, .crm = 0, .opc2 = 2,
@@ -960,6 +962,11 @@ static const ARMCPRegInfo debug_cp_reginfo[] = {
.opc0 = 2, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 2,
.access = PL1_RW, .accessfn = access_tdcc,
.type = ARM_CP_CONST, .resetvalue = 0 },
+ /* DBGDTRTX_EL0/DBGDTRRX_EL0 depend on direction */
+ { .name = "DBGDTR_EL0", .state = ARM_CP_STATE_BOTH, .cp = 14,
+ .opc0 = 2, .opc1 = 3, .crn = 0, .crm = 5, .opc2 = 0,
+ .access = PL0_RW, .accessfn = access_tdcc,
+ .type = ARM_CP_CONST, .resetvalue = 0 },
/*
* OSECCR_EL1 provides a mechanism for an operating system
* to access the contents of EDECCR. EDECCR is not implemented though,
--
2.34.1
- [PULL 00/29] target-arm queue, Peter Maydell, 2023/05/18
- [PULL 01/29] sbsa-ref: switch default cpu core to Neoverse-N1, Peter Maydell, 2023/05/18
- [PULL 04/29] arm/kvm: add support for MTE, Peter Maydell, 2023/05/18
- [PULL 08/29] target/arm: Create decodetree skeleton for A64, Peter Maydell, 2023/05/18
- [PULL 07/29] target/arm: Split out disas_a64_legacy, Peter Maydell, 2023/05/18
- [PULL 05/29] target/arm: add RAZ/WI handling for DBGDTR[TX|RX],
Peter Maydell <=
- [PULL 26/29] target/arm: Convert ERET, ERETAA, ERETAB to decodetree, Peter Maydell, 2023/05/18
- [PULL 02/29] target/arm: Fix vd == vm overlap in sve_ldff1_z, Peter Maydell, 2023/05/18
- [PULL 03/29] Maintainers: add myself as reviewer for sbsa-ref, Peter Maydell, 2023/05/18
- [PULL 09/29] target/arm: Pull calls to disas_sve() and disas_sme() out of legacy decoder, Peter Maydell, 2023/05/18
- [PULL 10/29] target/arm: Convert PC-rel addressing to decodetree, Peter Maydell, 2023/05/18
- [PULL 11/29] target/arm: Split gen_add_CC and gen_sub_CC, Peter Maydell, 2023/05/18
- [PULL 15/29] target/arm: Convert Logical (immediate) to decodetree, Peter Maydell, 2023/05/18
- [PULL 06/29] sbsa-ref: use Bochs graphics card instead of VGA, Peter Maydell, 2023/05/18
- [PULL 28/29] hw/arm/vexpress: Avoid trivial memory leak of 'flashalias', Peter Maydell, 2023/05/18
- [PULL 20/29] target/arm: Convert CBZ, CBNZ to decodetree, Peter Maydell, 2023/05/18