[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/12] hw/intc/arm_gicv3: Fix writes to ICC_CTLR_EL3
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 08/12] hw/intc/arm_gicv3: Fix writes to ICC_CTLR_EL3 |
Date: |
Thu, 23 May 2019 15:23:53 +0100 |
The ICC_CTLR_EL3 register includes some bits which are aliases
of bits in the ICC_CTLR_EL1(S) and (NS) registers. QEMU chooses
to keep those bits in the cs->icc_ctlr_el1[] struct fields.
Unfortunately a missing '~' in the code to update the bits
in those fields meant that writing to ICC_CTLR_EL3 would corrupt
the ICC_CLTR_EL1 register values.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
---
hw/intc/arm_gicv3_cpuif.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c
index 000bdbd6247..3b212d91c8f 100644
--- a/hw/intc/arm_gicv3_cpuif.c
+++ b/hw/intc/arm_gicv3_cpuif.c
@@ -1856,7 +1856,7 @@ static void icc_ctlr_el3_write(CPUARMState *env, const
ARMCPRegInfo *ri,
trace_gicv3_icc_ctlr_el3_write(gicv3_redist_affid(cs), value);
/* *_EL1NS and *_EL1S bits are aliases into the ICC_CTLR_EL1 bits. */
- cs->icc_ctlr_el1[GICV3_NS] &= (ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE);
+ cs->icc_ctlr_el1[GICV3_NS] &= ~(ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE);
if (value & ICC_CTLR_EL3_EOIMODE_EL1NS) {
cs->icc_ctlr_el1[GICV3_NS] |= ICC_CTLR_EL1_EOIMODE;
}
@@ -1864,7 +1864,7 @@ static void icc_ctlr_el3_write(CPUARMState *env, const
ARMCPRegInfo *ri,
cs->icc_ctlr_el1[GICV3_NS] |= ICC_CTLR_EL1_CBPR;
}
- cs->icc_ctlr_el1[GICV3_S] &= (ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE);
+ cs->icc_ctlr_el1[GICV3_S] &= ~(ICC_CTLR_EL1_CBPR | ICC_CTLR_EL1_EOIMODE);
if (value & ICC_CTLR_EL3_EOIMODE_EL1S) {
cs->icc_ctlr_el1[GICV3_S] |= ICC_CTLR_EL1_EOIMODE;
}
--
2.20.1
- [Qemu-devel] [PULL 00/12] target-arm queue, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 01/12] target/arm: Use extract2 for EXTR, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 02/12] target/arm: Simplify BFXIL expansion, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 03/12] target/arm: Fix vector operation segfault, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 04/12] arm: Move system_clock_scale to armv7m_systick.h, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 05/12] arm: Remove unnecessary includes of hw/arm/arm.h, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 11/12] hw/arm/exynos4210: Add DMA support for the Exynos4210, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 07/12] hw/intc/arm_gicv3: Fix write of ICH_VMCR_EL2.{VBPR0, VBPR1}, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 12/12] hw/arm/exynos4210: QOM'ify the Exynos4210 SoC, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 08/12] hw/intc/arm_gicv3: Fix writes to ICC_CTLR_EL3,
Peter Maydell <=
- [Qemu-devel] [PULL 10/12] hw/arm/exynos4: Use the IEC binary prefix definitions, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 09/12] hw/arm/exynos4: Remove unuseful debug code, Peter Maydell, 2019/05/23
- [Qemu-devel] [PULL 06/12] arm: Rename hw/arm/arm.h to hw/arm/boot.h, Peter Maydell, 2019/05/23
- Re: [Qemu-devel] [PULL 00/12] target-arm queue, Peter Maydell, 2019/05/24