diff mbox series

[RFC,21/40] target/arm: Remove aarch64 check from aarch64_host_object_init

Message ID 20230103181646.55711-22-richard.henderson@linaro.org
State New
Headers show
Series Toward class init of cpu features | expand

Commit Message

Richard Henderson Jan. 3, 2023, 6:16 p.m. UTC
Since kvm32 was removed, all kvm hosts support aarch64.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/cpu64.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Philippe Mathieu-Daudé Jan. 5, 2023, 10:08 p.m. UTC | #1
On 3/1/23 19:16, Richard Henderson wrote:
> Since kvm32 was removed

Maybe add here:

   (see commit 82bf7ae84c: "target/arm: Remove KVM support for 32-bit
   Arm hosts")

> , all kvm hosts support aarch64.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/arm/cpu64.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
> index 28b5a07244..668e979a24 100644
> --- a/target/arm/cpu64.c
> +++ b/target/arm/cpu64.c
> @@ -1095,10 +1095,8 @@ static void aarch64_host_object_init(Object *obj)
>   #if defined(CONFIG_KVM)
>       ARMCPU *cpu = ARM_CPU(obj);
>       kvm_arm_set_cpu_features_from_host(cpu);
> -    if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {

Worth asserting this feature is enabled? I don't think so, so:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> -        aarch64_add_sve_properties(obj);
> -        aarch64_add_pauth_properties(obj);
> -    }
> +    aarch64_add_sve_properties(obj);
> +    aarch64_add_pauth_properties(obj);
>   #elif defined(CONFIG_HVF)
>       ARMCPU *cpu = ARM_CPU(obj);
>       hvf_arm_set_cpu_features_from_host(cpu);
Richard Henderson Jan. 6, 2023, 2:21 a.m. UTC | #2
On 1/5/23 14:08, Philippe Mathieu-Daudé wrote:
> On 3/1/23 19:16, Richard Henderson wrote:
>> Since kvm32 was removed
> 
> Maybe add here:
> 
>    (see commit 82bf7ae84c: "target/arm: Remove KVM support for 32-bit
>    Arm hosts")
> 
>> , all kvm hosts support aarch64.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>   target/arm/cpu64.c | 6 ++----
>>   1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
>> index 28b5a07244..668e979a24 100644
>> --- a/target/arm/cpu64.c
>> +++ b/target/arm/cpu64.c
>> @@ -1095,10 +1095,8 @@ static void aarch64_host_object_init(Object *obj)
>>   #if defined(CONFIG_KVM)
>>       ARMCPU *cpu = ARM_CPU(obj);
>>       kvm_arm_set_cpu_features_from_host(cpu);
>> -    if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
> 
> Worth asserting this feature is enabled? I don't think so, so:
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Indeed not.  In the next patch we hoist this feature setting out of kvm+hvf to common code 
just above here.


r~

> 
>> -        aarch64_add_sve_properties(obj);
>> -        aarch64_add_pauth_properties(obj);
>> -    }
>> +    aarch64_add_sve_properties(obj);
>> +    aarch64_add_pauth_properties(obj);
>>   #elif defined(CONFIG_HVF)
>>       ARMCPU *cpu = ARM_CPU(obj);
>>       hvf_arm_set_cpu_features_from_host(cpu);
>
diff mbox series

Patch

diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 28b5a07244..668e979a24 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -1095,10 +1095,8 @@  static void aarch64_host_object_init(Object *obj)
 #if defined(CONFIG_KVM)
     ARMCPU *cpu = ARM_CPU(obj);
     kvm_arm_set_cpu_features_from_host(cpu);
-    if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
-        aarch64_add_sve_properties(obj);
-        aarch64_add_pauth_properties(obj);
-    }
+    aarch64_add_sve_properties(obj);
+    aarch64_add_pauth_properties(obj);
 #elif defined(CONFIG_HVF)
     ARMCPU *cpu = ARM_CPU(obj);
     hvf_arm_set_cpu_features_from_host(cpu);