[RFC PATCH v2 11/22] target/arm: Set pstate.ALLINT in arm_cpu_reset_hold

Jinjie Ruan via posted 22 patches 9 months, 1 week ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
[RFC PATCH v2 11/22] target/arm: Set pstate.ALLINT in arm_cpu_reset_hold
Posted by Jinjie Ruan via 9 months, 1 week ago
Set pstate.ALLINT in arm_cpu_reset_hold as daif do it.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 target/arm/cpu.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 055670343e..e850763158 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -357,6 +357,10 @@ static void arm_cpu_reset_hold(Object *obj)
     }
     env->daif = PSTATE_D | PSTATE_A | PSTATE_I | PSTATE_F;
 
+    if (cpu_isar_feature(aa64_nmi, cpu)) {
+        env->allint = PSTATE_ALLINT;
+    }
+
     /* AArch32 has a hard highvec setting of 0xFFFF0000.  If we are currently
      * executing as AArch32 then check if highvecs are enabled and
      * adjust the PC accordingly.
-- 
2.34.1
Re: [RFC PATCH v2 11/22] target/arm: Set pstate.ALLINT in arm_cpu_reset_hold
Posted by Richard Henderson 9 months, 1 week ago
On 2/21/24 03:08, Jinjie Ruan via wrote:
> Set pstate.ALLINT in arm_cpu_reset_hold as daif do it.
> 
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
>   target/arm/cpu.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index 055670343e..e850763158 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -357,6 +357,10 @@ static void arm_cpu_reset_hold(Object *obj)
>       }
>       env->daif = PSTATE_D | PSTATE_A | PSTATE_I | PSTATE_F;
>   
> +    if (cpu_isar_feature(aa64_nmi, cpu)) {
> +        env->allint = PSTATE_ALLINT;
> +    }
> +

Reset value of ALLINT is UNKNOWN.
I think you should drop this patch.


r~
Re: [RFC PATCH v2 11/22] target/arm: Set pstate.ALLINT in arm_cpu_reset_hold
Posted by Jinjie Ruan via 9 months, 1 week ago

On 2024/2/22 4:43, Richard Henderson wrote:
> On 2/21/24 03:08, Jinjie Ruan via wrote:
>> Set pstate.ALLINT in arm_cpu_reset_hold as daif do it.
>>
>> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
>> ---
>>   target/arm/cpu.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
>> index 055670343e..e850763158 100644
>> --- a/target/arm/cpu.c
>> +++ b/target/arm/cpu.c
>> @@ -357,6 +357,10 @@ static void arm_cpu_reset_hold(Object *obj)
>>       }
>>       env->daif = PSTATE_D | PSTATE_A | PSTATE_I | PSTATE_F;
>>   +    if (cpu_isar_feature(aa64_nmi, cpu)) {
>> +        env->allint = PSTATE_ALLINT;
>> +    }
>> +
> 
> Reset value of ALLINT is UNKNOWN.
> I think you should drop this patch.

Yes. I have ignore the mannual comment.

> 
> 
> r~
>