On Mon, Apr 28 2025, Eric Auger <eric.au...@redhat.com> wrote: > On 4/9/25 4:42 PM, Cornelia Huck wrote: >> From: Eric Auger <eric.au...@redhat.com> >> >> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> >> Reviewed-by: Sebastian Ott <seb...@redhat.com> >> Signed-off-by: Eric Auger <eric.au...@redhat.com> >> Signed-off-by: Cornelia Huck <coh...@redhat.com> >> --- >> target/arm/cpu-features.h | 40 ++++++++++++++++----------------- >> target/arm/cpu.c | 29 ++++++++---------------- >> target/arm/cpu.h | 2 -- >> target/arm/cpu64.c | 14 ++++-------- >> target/arm/helper.c | 6 ++--- >> target/arm/hvf/hvf.c | 9 ++++---- >> target/arm/kvm.c | 24 +++++++++----------- >> target/arm/tcg/cpu64.c | 47 ++++++++++++++++++--------------------- >> 8 files changed, 73 insertions(+), 98 deletions(-)
>> @@ -380,10 +378,8 @@ static bool >> kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) >> * than skipping the reads and leaving 0, as we must avoid >> * considering the values in every case. >> */ >> - err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_pfr0, >> - ARM64_SYS_REG(3, 0, 0, 1, 0)); >> - err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_pfr1, >> - ARM64_SYS_REG(3, 0, 0, 1, 1)); >> + err |= get_host_cpu_reg(fd, ahcf, ID_AA64PFR0_EL1_IDX); > Hum I think we have a conversion mistake here: > > +DEF(ID_PFR0_EL1, 3, 0, 0, 1, 0) > +DEF(ID_PFR1_EL1, 3, 0, 0, 1, 1) Indeed, wrong regs. Will fix.