[PATCH v3 20/33] target/arm/helper: replace target_ulong by vaddr

Pierrick Bouvier posted 33 patches 5 months, 2 weeks ago
There is a newer version of this series
[PATCH v3 20/33] target/arm/helper: replace target_ulong by vaddr
Posted by Pierrick Bouvier 5 months, 2 weeks ago
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 target/arm/helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/arm/helper.c b/target/arm/helper.c
index 085c1656027..595d9334977 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -10641,7 +10641,7 @@ static void arm_cpu_do_interrupt_aarch64(CPUState *cs)
     ARMCPU *cpu = ARM_CPU(cs);
     CPUARMState *env = &cpu->env;
     unsigned int new_el = env->exception.target_el;
-    target_ulong addr = env->cp15.vbar_el[new_el];
+    vaddr addr = env->cp15.vbar_el[new_el];
     unsigned int new_mode = aarch64_pstate_mode(new_el, true);
     unsigned int old_mode;
     unsigned int cur_el = arm_current_el(env);
-- 
2.47.2
Re: [PATCH v3 20/33] target/arm/helper: replace target_ulong by vaddr
Posted by Philippe Mathieu-Daudé 5 months, 2 weeks ago
On 1/5/25 08:23, Pierrick Bouvier wrote:
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   target/arm/helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 085c1656027..595d9334977 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -10641,7 +10641,7 @@ static void arm_cpu_do_interrupt_aarch64(CPUState *cs)
>       ARMCPU *cpu = ARM_CPU(cs);
>       CPUARMState *env = &cpu->env;
>       unsigned int new_el = env->exception.target_el;
> -    target_ulong addr = env->cp15.vbar_el[new_el];
> +    vaddr addr = env->cp15.vbar_el[new_el];

Why not directly use the symbol type (uint64_t)? Anyway,

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH v3 20/33] target/arm/helper: replace target_ulong by vaddr
Posted by Pierrick Bouvier 5 months, 2 weeks ago
On 5/1/25 12:28 PM, Philippe Mathieu-Daudé wrote:
> On 1/5/25 08:23, Pierrick Bouvier wrote:
>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> ---
>>    target/arm/helper.c | 2 +-
>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/target/arm/helper.c b/target/arm/helper.c
>> index 085c1656027..595d9334977 100644
>> --- a/target/arm/helper.c
>> +++ b/target/arm/helper.c
>> @@ -10641,7 +10641,7 @@ static void arm_cpu_do_interrupt_aarch64(CPUState *cs)
>>        ARMCPU *cpu = ARM_CPU(cs);
>>        CPUARMState *env = &cpu->env;
>>        unsigned int new_el = env->exception.target_el;
>> -    target_ulong addr = env->cp15.vbar_el[new_el];
>> +    vaddr addr = env->cp15.vbar_el[new_el];
> 
> Why not directly use the symbol type (uint64_t)? Anyway,
>

Nothing in particular, I was just in the mood following patch 17.
vbar_el is an address, so it makes more sense to use vaddr.

> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 


Re: [PATCH v3 20/33] target/arm/helper: replace target_ulong by vaddr
Posted by Richard Henderson 5 months, 2 weeks ago
On 4/30/25 23:23, Pierrick Bouvier wrote:
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   target/arm/helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 085c1656027..595d9334977 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -10641,7 +10641,7 @@ static void arm_cpu_do_interrupt_aarch64(CPUState *cs)
>       ARMCPU *cpu = ARM_CPU(cs);
>       CPUARMState *env = &cpu->env;
>       unsigned int new_el = env->exception.target_el;
> -    target_ulong addr = env->cp15.vbar_el[new_el];
> +    vaddr addr = env->cp15.vbar_el[new_el];
>       unsigned int new_mode = aarch64_pstate_mode(new_el, true);
>       unsigned int old_mode;
>       unsigned int cur_el = arm_current_el(env);

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~