Skip to contentSkip to conversation

xen/arm: Relax GIC version check

PATCH In review Vladimir Murzin 4 participants 5 messages Jan 20, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm: Relax GIC version check

Supported values are

0b0000 GIC CPU interface system registers not implemented.

0b0001 System register interface to versions 3.0 and 4.0 of the GIC
CPU interface is supported.

0b0011 System register interface to version 4.1 of the GIC CPU
interface is supported.

4.1 is still backward compatible with 4.0/3.0, moreover ARM ARM guarantees that future versions of the GIC CPU interface retain backwards compatible.

---
 xen/include/asm-arm/cpufeature.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/asm-arm/cpufeature.h +1 -1
index 13a2739a6..c6e5711b2 100644
@@ -17,7 +17,7 @@
 #define cpu_has_el3_64    (boot_cpu_feature64(el3) >= 1)
 #define cpu_has_fp        (boot_cpu_feature64(fp) < 8)
 #define cpu_has_simd      (boot_cpu_feature64(simd) < 8)
-#define cpu_has_gicv3     (boot_cpu_feature64(gic) == 1)
+#define cpu_has_gicv3     (boot_cpu_feature64(gic) >= 1)
 #endif
 
 #define cpu_feature32(c, feat)         ((c)->pfr32.feat)
Signature · 1 line
2.24.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Vladimir,

Quoted 9 lines · Vladimir Murzin

Supported values are

0b0000 GIC CPU interface system registers not implemented.

0b0001 System register interface to versions 3.0 and 4.0 of the GIC
CPU interface is supported.

Quoted 8 lines

0b0011 System register interface to version 4.1 of the GIC CPU
interface is supported.

4.1 is still backward compatible with 4.0/3.0, moreover ARM ARM guarantees that future versions of the GIC CPU interface retain backwards compatible.

Thanks a lot

Cheers
Bertrand

Quoted 21 lines

---
xen/include/asm-arm/cpufeature.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/asm-arm/cpufeature.h +1 -1
index 13a2739a6..c6e5711b2 100644
@@ -17,7 +17,7 @@
 #define cpu_has_el3_64    (boot_cpu_feature64(el3) >= 1)
 #define cpu_has_fp        (boot_cpu_feature64(fp) < 8)
 #define cpu_has_simd      (boot_cpu_feature64(simd) < 8)
-#define cpu_has_gicv3     (boot_cpu_feature64(gic) == 1)
+#define cpu_has_gicv3     (boot_cpu_feature64(gic) >= 1)
 #endif
 
 #define cpu_feature32(c, feat)         ((c)->pfr32.feat)
Signature · 1 line
2.24.0
Acked-by on v1 1/1
#2 lore raw
In reply to Vladimir Murzin

(+ Ian)

Hi Vladimir,

Quoted 7 lines · Vladimir Murzin

Supported values are

0b0000 GIC CPU interface system registers not implemented.

0b0001 System register interface to versions 3.0 and 4.0 of the GIC
CPU interface is supported.

Quoted 8 lines

0b0011 System register interface to version 4.1 of the GIC CPU
interface is supported.

4.1 is still backward compatible with 4.0/3.0, moreover ARM ARM guarantees that future versions of the GIC CPU interface retain backwards compatible.

@Ian: I would like your put as the RM for 4.15.

Technically, it could be consider as a new "feature" because Xen would fail to boot on such HW.

However, I think the change is small enough and doesn't introduce risk on existing supported HW.

Therefore, I would like to merge it for 4.15. @Ian does it sounds good to you?

Quoted 18 lines
---
  xen/include/asm-arm/cpufeature.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/asm-arm/cpufeature.h +1 -1
index 13a2739a6..c6e5711b2 100644
@@ -17,7 +17,7 @@
  #define cpu_has_el3_64    (boot_cpu_feature64(el3) >= 1)
  #define cpu_has_fp        (boot_cpu_feature64(fp) < 8)
  #define cpu_has_simd      (boot_cpu_feature64(simd) < 8)
-#define cpu_has_gicv3     (boot_cpu_feature64(gic) == 1)
+#define cpu_has_gicv3     (boot_cpu_feature64(gic) >= 1)
  #endif
 
  #define cpu_feature32(c, feat)         ((c)->pfr32.feat)
Signature · 1 line
Julien Grall
#3 lore raw

Julien Grall writes ("Re: [XEN PATCH] xen/arm: Relax GIC version check"):

Quoted 21 lines · Vladimir Murzin
Quoted 7 lines

Supported values are

0b0000 GIC CPU interface system registers not implemented.

0b0001 System register interface to versions 3.0 and 4.0 of the GIC
CPU interface is supported.

Quoted 8 lines

0b0011 System register interface to version 4.1 of the GIC CPU
interface is supported.

4.1 is still backward compatible with 4.0/3.0, moreover ARM ARM guarantees that future versions of the GIC CPU interface retain backwards compatible.

@Ian: I would like your put as the RM for 4.15.

Quoted 8 lines

Technically, it could be consider as a new "feature" because Xen would fail to boot on such HW.

However, I think the change is small enough and doesn't introduce risk on existing supported HW.

Therefore, I would like to merge it for 4.15. @Ian does it sounds good to you?

Thank you for this analysis. I think it does need a freeze exception. But your argument is convincing, so

#4 lore raw

Hi Ian,

Quoted 28 lines · Ian Jackson

Julien Grall writes ("Re: [XEN PATCH] xen/arm: Relax GIC version check"):

Quoted 27 lines · Vladimir Murzin
Quoted 7 lines

Supported values are

0b0000 GIC CPU interface system registers not implemented.

0b0001 System register interface to versions 3.0 and 4.0 of the GIC
CPU interface is supported.

Quoted 8 lines

0b0011 System register interface to version 4.1 of the GIC CPU
interface is supported.

4.1 is still backward compatible with 4.0/3.0, moreover ARM ARM guarantees that future versions of the GIC CPU interface retain backwards compatible.

@Ian: I would like your put as the RM for 4.15.

Technically, it could be consider as a new "feature" because Xen would fail to boot on such HW.

However, I think the change is small enough and doesn't introduce risk on existing supported HW.

Quoted 7 lines
Quoted 2 lines

Therefore, I would like to merge it for 4.15. @Ian does it sounds good to you?

Thank you for this analysis. I think it does need a freeze exception. But your argument is convincing, so

Thank you!

I have committed the patch.

Cheers,

Signature · 1 line
Julien Grall