qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] AArch64: ZCR and ARM_CP_SVE/ARM_CP_FPU flags


From: Richard Henderson
Subject: Re: [Qemu-devel] AArch64: ZCR and ARM_CP_SVE/ARM_CP_FPU flags
Date: Fri, 25 May 2018 07:07:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 05/22/2018 11:49 PM, Laurent Desnogues wrote:
> ZCR system registers are both flagged as ARM_CP_SVE and ARM_CP_FPU,
> which results in an assertion failure in fp_access_check due to the
> check of these flags in handle_sys:
> 
>     if ((ri->type & ARM_CP_SVE) && !sve_access_check(s)) {
>         return;
>     }
>     if ((ri->type & ARM_CP_FPU) && !fp_access_check(s)) {
>         return;
>     }
> 
> sve_access_check calls fp_access_check so the assert
> !s->fp_access_checked in the second call to fp_access_check will fail.

Hah.  Yes, these checks have migrated a bit since I first wrote them, and I
have (perhaps obviously) done zero system-level testing so far.

> I took a quick look at sve_exception_el and given that it checks that
> FPU is enabled, can't we just remove the ARM_CP_FPU flag from ZCR?
> 
> Alternatively the second call to fp_access_check when ARM_CP_FPU is
> defined could be skipped if ARM_CP_SVE is set.

I would say the first -- removing FPU -- but will defer to Peter.


r~



reply via email to

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