[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/47] target/arm: allow writes to SCR_EL3.HXEn bit when FEAT_HCX
From: |
Michael Tokarev |
Subject: |
[PATCH 13/47] target/arm: allow writes to SCR_EL3.HXEn bit when FEAT_HCX is enabled |
Date: |
Wed, 8 Mar 2023 19:57:16 +0300 |
From: Evgeny Iakovlev <eiakovlev@linux.microsoft.com>
ARM trusted firmware, when built with FEAT_HCX support, sets SCR_EL3.HXEn bit
to allow EL2 to modify HCRX_EL2 register without trapping it in EL3. Qemu
uses a valid mask to clear unsupported SCR_EL3 bits when emulating SCR_EL3
write, and that mask doesn't include SCR_EL3.HXEn bit even if FEAT_HCX is
enabled and exposed to the guest. As a result EL3 writes of that bit are
ignored.
Cc: qemu-stable@nongnu.org
Signed-off-by: Evgeny Iakovlev <eiakovlev@linux.microsoft.com>
Message-id: 20230105221251.17896-4-eiakovlev@linux.microsoft.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 08899b5c68a55a3780d707e2464073c8f2670d31)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target/arm/helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index d8c8223ec3..22bc935242 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -1820,6 +1820,9 @@ static void scr_write(CPUARMState *env, const
ARMCPRegInfo *ri, uint64_t value)
if (cpu_isar_feature(aa64_sme, cpu)) {
valid_mask |= SCR_ENTP2;
}
+ if (cpu_isar_feature(aa64_hcx, cpu)) {
+ valid_mask |= SCR_HXEN;
+ }
} else {
valid_mask &= ~(SCR_RW | SCR_ST);
if (cpu_isar_feature(aa32_ras, cpu)) {
--
2.30.2
- [RFC PATCH 00/47] Patch Round-up for stable 7.2.1, Michael Tokarev, 2023/03/08
- [PATCH 07/47] target/riscv: Set pc_succ_insn for !rvc illegal insn, Michael Tokarev, 2023/03/08
- [PATCH 10/47] hw/nvme: fix missing cq eventidx update, Michael Tokarev, 2023/03/08
- [PATCH 06/47] meson: accept relative symlinks in "meson introspect --installed" data, Michael Tokarev, 2023/03/08
- [PATCH 02/47] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled, Michael Tokarev, 2023/03/08
- [PATCH 05/47] target/arm: fix handling of HLT semihosting in system mode, Michael Tokarev, 2023/03/08
- [PATCH 13/47] target/arm: allow writes to SCR_EL3.HXEn bit when FEAT_HCX is enabled,
Michael Tokarev <=
- [PATCH 14/47] target/arm: Fix in_debug path in S1_ptw_translate, Michael Tokarev, 2023/03/08
- [PATCH 12/47] target/arm: Fix sve_probe_page, Michael Tokarev, 2023/03/08
- [PATCH 11/47] configure: fix GLIB_VERSION for cross-compilation, Michael Tokarev, 2023/03/08
- [PATCH 18/47] qcow2: Fix theoretical corruption in store_bitmap() error path, Michael Tokarev, 2023/03/08
- [PATCH 16/47] migration/ram: Fix error handling in ram_write_tracking_start(), Michael Tokarev, 2023/03/08
- [PATCH 22/47] target/i386: Fix C flag for BLSI, BLSMSK, BLSR, Michael Tokarev, 2023/03/08
- [PATCH 17/47] migration/ram: Fix populate_read_range(), Michael Tokarev, 2023/03/08
- [PATCH 15/47] target/arm: Fix physical address resolution for Stage2, Michael Tokarev, 2023/03/08
- [PATCH 20/47] tests/tcg/i386: Introduce and use reg_t consistently, Michael Tokarev, 2023/03/08
- [PATCH 19/47] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF, Michael Tokarev, 2023/03/08