Skip to contentSkip to conversation

arm/arm64: Use 'max' cpu and gic types

PATCH Superseded Andrew Jones 1 participant 3 messages Apr 2, 2024 KVM arm64

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover arm/arm64: Use 'max' cpu and gic types

The arm64 'max' CPU type enables all features, so it makes sense to use it for testing to ensure we're testing the latest models. The 'max' GIC is used to pick the latest GIC model by default which is better than defaulting to gicv2 since it tests a later model and, when more than 8 CPUs are configured, it'll actually work. We don't need to convert 'max' to 'host' with KVM/HVF since 'max' is an alias for 'host' when those accelerators are enabled.

Andrew Jones (2):
arm/arm64: Use 'max' gic type
arm64: Use 'max' cpu type

 arm/run   | 8 +-------
 configure | 2 +-
 2 files changed, 2 insertions(+), 8 deletions(-)
Signature · 1 line
2.44.0
#1 lore raw

PATCH 1/2 arm/arm64: Use 'max' gic type

The 'max' GIC type has been supported for six years (Mar. 2018). Ever since its introduction we've considered switching to it for the default in the run scripts. Now, with commit 5dd20ec76ea6 ("runtime:
Update MAX_SMP probe"), we no longer always check and restrict MAX_SMP, so we'd have better luck with configurations working by default by finally doing the switch. Of course we also get the benefits of testing more modern models by default and requiring less command line modifications when converting TCG to KVM/HVF.

---
 arm/run | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
arm/run +1 -7
index efdd44ce86a7..120e406fc703 100755
@@ -29,13 +29,7 @@ if ! $qemu -machine '?' | grep -q 'ARM Virtual Machine'; then
 	exit 2
 fi
 
-M='-machine virt'
-
-if [ "$ACCEL" = "kvm" ]; then
-	if $qemu $M,\? | grep -q gic-version; then
-		M+=',gic-version=host'
-	fi
-fi
+M='-machine virt,gic-version=max'
 
 if [ "$ACCEL" = "kvm" ] || [ "$ACCEL" = "hvf" ]; then
 	if [ "$HOST" = "aarch64" ] || [ "$HOST" = "arm" ]; then
Signature · 1 line
2.44.0
#2 lore raw

PATCH 2/2 arm64: Use 'max' cpu type

In reply to Andrew Jones

The 'max' GIC type has been supported for six years (Mar. 2018). Ever since its introduction we've considered switching to it for the default in the run scripts in order to test more modern models by default. Let's finally do it!

(HVF's support for '-cpu max' is younger (only 2 years), but that should also be old enough.)

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 49f047cb2d7d..078271822b10 100755
@@ -273,7 +273,7 @@ fi
 [ -z "$processor" ] && processor="$arch"
 
 if [ "$processor" = "arm64" ]; then
-    processor="cortex-a57"
+    processor="max"
 elif [ "$processor" = "arm" ]; then
     processor="cortex-a15"
 fi
Signature · 1 line
2.44.0