Hi,
On 1/7/25 19:06, Peter Maydell wrote:
From: Eric Auger <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Sebastian Ott <[email protected]>
Signed-off-by: Eric Auger <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
---
target/arm/cpu-features.h | 40 ++++++++++++++++-----------------
target/arm/cpu.h | 2 --
target/arm/cpu.c | 29 ++++++++----------------
target/arm/cpu64.c | 14 ++++--------
target/arm/helper.c | 6 ++---
target/arm/hvf/hvf.c | 9 ++++----
target/arm/kvm.c | 12 +++++-----
target/arm/tcg/cpu64.c | 47 ++++++++++++++++++---------------------
8 files changed, 68 insertions(+), 91 deletions(-)
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 7554282410f..e1bfca5947c 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -911,7 +911,8 @@ static bool
hvf_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
* - fix any assumptions we made that SME implies SVE (since
* on the M4 there is SME but not SVE)
*/
- host_isar.id_aa64pfr1 &= ~R_ID_AA64PFR1_SME_MASK;
+ SET_IDREG(&host_isar, ID_AA64PFR1,
+ GET_IDREG(&host_isar, ID_AA64PFR1) & ~R_ID_AA64PFR1_SME_MASK);
FYI when using:
C compiler for the host machine: gcc-15 (gcc 15.1.0 "gcc-15 (Homebrew
GCC 15.1.0) 15.1.0")
on macOS, I'm getting:
[757/815] Compiling C object
libqemu-aarch64-softmmu.a.p/target_arm_hvf_hvf.c.o
target/arm/hvf/hvf.c: In function 'hvf_arm_get_host_cpu_features':
target/arm/cpu.h:897:32: warning: declaration of 'i_' shadows a previous
local [-Wshadow=local]
897 | const ARMISARegisters *i_ = (ISAR);
\
| ^~
target/arm/cpu.h:892:39: note: in definition of macro 'SET_IDREG'
892 | i_->idregs[REG ## _EL1_IDX] = VALUE;
\
| ^~~~~
target/arm/hvf/hvf.c:818:15: note: in expansion of macro 'GET_IDREG'
818 | GET_IDREG(&host_isar, ID_AA64PFR1) &
~R_ID_AA64PFR1_SME_MASK);
| ^~~~~~~~~
target/arm/cpu.h:891:26: note: shadowed declaration is here
891 | ARMISARegisters *i_ = (ISAR);
\
| ^~
target/arm/hvf/hvf.c:817:5: note: in expansion of macro 'SET_IDREG'
817 | SET_IDREG(&host_isar, ID_AA64PFR1,
| ^~~~~~~~~