qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 40/55] target/arm: Enable SVE for aarch64-linux-u


From: Alex Bennée
Subject: Re: [Qemu-devel] [PULL 40/55] target/arm: Enable SVE for aarch64-linux-user
Date: Mon, 12 Nov 2018 22:12:58 +0000
User-agent: mu4e 1.1.0; emacs 26.1.50

Laurent Vivier <address@hidden> writes:

> On 29/06/2018 16:53, Peter Maydell wrote:
>> 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.
>>           */
>>
>
> Running some tests for my pull request, I've found this commit breaks
> ltp-full-20180515 sigaltstack01 tests with ubuntu arm64/trusty.
>
> sigaltstack01  274  TBROK  :  tst_sig.c:233: unexpected signal
> SIGIOT/SIGABRT(6) received (pid = 15241).
> *** Error in `/opt/ltp/testcases/bin/sigaltstack01': free(): invalid
> pointer: 0x000000000042a010 ***

I wonder if that is the test case not handling the full frame size (or
us not checking the allocated size). What syscall or signal delivery was
happening at the time?

>
> Thanks,
> Laurent


--
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]