[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/47] target/arm: fix handling of HLT semihosting in system mode
From: |
Michael Tokarev |
Subject: |
[PATCH 05/47] target/arm: fix handling of HLT semihosting in system mode |
Date: |
Wed, 8 Mar 2023 19:57:08 +0300 |
From: Alex Bennée <alex.bennee@linaro.org>
The check semihosting_enabled() wants to know if the guest is
currently in user mode. Unlike the other cases the test was inverted
causing us to block semihosting calls in non-EL0 modes.
Cc: qemu-stable@nongnu.org
Fixes: 19b26317e9 (target/arm: Honour -semihosting-config userspace=on)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 9788d4c007cbde7cda1b7a577b8b836335eb2b73)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target/arm/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 74a903072f..1dcaefb8e7 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -1184,7 +1184,7 @@ static inline void gen_hlt(DisasContext *s, int imm)
* semihosting, to provide some semblance of security
* (and for consistency with our 32-bit semihosting).
*/
- if (semihosting_enabled(s->current_el != 0) &&
+ if (semihosting_enabled(s->current_el == 0) &&
(imm == (s->thumb ? 0x3c : 0xf000))) {
gen_exception_internal_insn(s, EXCP_SEMIHOST);
return;
--
2.30.2
- [RFC PATCH 00/47] Patch Round-up for stable 7.2.1, 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 <=
- [PATCH 13/47] target/arm: allow writes to SCR_EL3.HXEn bit when FEAT_HCX is enabled, 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 14/47] target/arm: Fix in_debug path in S1_ptw_translate, Michael Tokarev, 2023/03/08
- [PATCH 18/47] qcow2: Fix theoretical corruption in store_bitmap() error path, 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 24/47] target/i386: Fix BZHI instruction, Michael Tokarev, 2023/03/08
- [PATCH 19/47] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF, Michael Tokarev, 2023/03/08
- [PATCH 16/47] migration/ram: Fix error handling in ram_write_tracking_start(), Michael Tokarev, 2023/03/08