mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
target/arm: Add ID_AA64SMFR0_EL1
This register is allocated from the existing block of id registers, so it is already RES0 for cpus that do not implement SME. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220607203306.657998-21-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
f305bf9436
commit
414c54d515
3 changed files with 34 additions and 6 deletions
|
@ -574,6 +574,8 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
|
|||
} else {
|
||||
err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64pfr1,
|
||||
ARM64_SYS_REG(3, 0, 0, 4, 1));
|
||||
err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64smfr0,
|
||||
ARM64_SYS_REG(3, 0, 0, 4, 5));
|
||||
err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64dfr0,
|
||||
ARM64_SYS_REG(3, 0, 0, 5, 0));
|
||||
err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64dfr1,
|
||||
|
@ -682,10 +684,11 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
|
|||
ahcf->isar.id_aa64pfr0 = t;
|
||||
|
||||
/*
|
||||
* Before v5.1, KVM did not support SVE and did not expose
|
||||
* ID_AA64ZFR0_EL1 even as RAZ. After v5.1, KVM still does
|
||||
* not expose the register to "user" requests like this
|
||||
* unless the host supports SVE.
|
||||
* There is a range of kernels between kernel commit 73433762fcae
|
||||
* and f81cb2c3ad41 which have a bug where the kernel doesn't expose
|
||||
* SYS_ID_AA64ZFR0_EL1 via the ONE_REG API unless the VM has enabled
|
||||
* SVE support, so we only read it here, rather than together with all
|
||||
* the other ID registers earlier.
|
||||
*/
|
||||
err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64zfr0,
|
||||
ARM64_SYS_REG(3, 0, 0, 4, 4));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue