[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 40/55] target/arm: Enable SVE for aarch64-linux-user
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 40/55] target/arm: Enable SVE for aarch64-linux-user |
Date: |
Fri, 29 Jun 2018 15:53:32 +0100 |
From: Richard Henderson <address@hidden>
Enable ARM_FEATURE_SVE for the generic "max" cpu.
Tested-by: Alex Bennée <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
---
linux-user/elfload.c | 1 +
target/arm/cpu.c | 7 +++++++
target/arm/cpu64.c | 1 +
3 files changed, 9 insertions(+)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 13bc78d0c86..d1231ad07a3 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -584,6 +584,7 @@ static uint32_t get_elf_hwcap(void)
GET_FEATURE(ARM_FEATURE_V8_ATOMICS, ARM_HWCAP_A64_ATOMICS);
GET_FEATURE(ARM_FEATURE_V8_RDM, ARM_HWCAP_A64_ASIMDRDM);
GET_FEATURE(ARM_FEATURE_V8_FCMA, ARM_HWCAP_A64_FCMA);
+ GET_FEATURE(ARM_FEATURE_SVE, ARM_HWCAP_A64_SVE);
#undef GET_FEATURE
return hwcaps;
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 2ae4fffafb9..6dcc552e143 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -164,6 +164,13 @@ static void arm_cpu_reset(CPUState *s)
env->cp15.sctlr_el[1] |= SCTLR_UCT | SCTLR_UCI | SCTLR_DZE;
/* and to the FP/Neon instructions */
env->cp15.cpacr_el1 = deposit64(env->cp15.cpacr_el1, 20, 2, 3);
+ /* and to the SVE instructions */
+ env->cp15.cpacr_el1 = deposit64(env->cp15.cpacr_el1, 16, 2, 3);
+ env->cp15.cptr_el[3] |= CPTR_EZ;
+ /* with maximum vector length */
+ env->vfp.zcr_el[1] = ARM_MAX_VQ - 1;
+ env->vfp.zcr_el[2] = ARM_MAX_VQ - 1;
+ env->vfp.zcr_el[3] = ARM_MAX_VQ - 1;
#else
/* Reset into the highest available EL */
if (arm_feature(env, ARM_FEATURE_EL3)) {
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index c50dcd4077d..0360d7efc5e 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -252,6 +252,7 @@ static void aarch64_max_initfn(Object *obj)
set_feature(&cpu->env, ARM_FEATURE_V8_RDM);
set_feature(&cpu->env, ARM_FEATURE_V8_FP16);
set_feature(&cpu->env, ARM_FEATURE_V8_FCMA);
+ set_feature(&cpu->env, ARM_FEATURE_SVE);
/* For usermode -cpu max we can use a larger and more efficient DCZ
* blocksize since we don't have to follow what the hardware does.
*/
--
2.17.1
- [Qemu-devel] [PULL 44/55] i.mx7d: Change SRC unimplemented device name from sdma to src, (continued)
- [Qemu-devel] [PULL 44/55] i.mx7d: Change SRC unimplemented device name from sdma to src, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 34/55] target/arm: Implement SVE floating-point complex add, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 41/55] target/arm: Implement ARMv8.2-DotProd, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 48/55] target/arm: Mark PMINTENSET accesses as possibly doing IO, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 49/55] sd: Don't trace SDRequest crc field, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 45/55] i.mx7d: Change IRQ number type from hwaddr to int, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 51/55] target/arm: Fix SVE signed division vs x86 overflow exception, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 52/55] target/arm: Fix SVE system register access checks, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 47/55] target/arm: Remove redundant DIV detection for KVM, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 31/55] target/arm: Implement SVE floating-point round to integral value, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 40/55] target/arm: Enable SVE for aarch64-linux-user,
Peter Maydell <=
- [Qemu-devel] [PULL 42/55] target/arm: support reading of CNT[VCT|FRQ]_EL0 from user-space, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 46/55] target/arm: Add ARM_FEATURE_V7VE for v7 Virtualization Extensions, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 53/55] target/arm: Prune a57 features from max, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 54/55] target/arm: Prune a15 features from max, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 55/55] target/arm: Add ID_ISAR6, Peter Maydell, 2018/06/29
- [Qemu-devel] [PULL 50/55] sdcard: Use the ldst API, Peter Maydell, 2018/06/29
- Re: [Qemu-devel] [PULL 00/55] target-arm queue, Peter Maydell, 2018/06/30