qemu-system-aarch64-wrapper: only enable gic version 3 with more than 8 vcpus
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 13 Jun 2019 10:54:59 +0000 (12:54 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 13 Jun 2019 10:54:59 +0000 (12:54 +0200)
as gic version 3 is not supported on conova-node01/02

modules/ganeti2/files/qemu-system-aarch64-wrapper

index 407f87d..900d6aa 100755 (executable)
@@ -11,7 +11,7 @@
 ##
 
 # Default to virt machine, forcing a gic version 3 to support more than 8 vcpus
-machine="virt,gic-version=3"
+machine="virt"
 
 # We want to always enable KVM. Contrary to what the Ganeti's documentation
 # says, enabling kvm_flag is not enough.
@@ -27,13 +27,13 @@ while [ "$1" ]; do
             fi
             shift
             ;;
-        -cpu)
+        -smp)
             # Check if the CPU is configured to run in 32-bit mode and
             # force the gvic to version 2 in that case
             args+=("$1")
             args+=("$2")
-            if echo "$2" | egrep -q '(^|,)aarch64=off(,|$)' ; then
-                machine="virt,gic-version=2"
+            if test "$2" -gt 8 ; then
+                machine="virt,gic-version=3"
             fi
             shift
             ;;