X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Ffiles%2Fqemu-system-aarch64-wrapper;h=412d8b3fa7453bdbb0b806a2387196b1966ccc02;hb=4ea7519709997c63f04eec23234e8f1596748c22;hp=d00d1557b0ef1678d86834701754cda7ee826f02;hpb=600b3651dfb7fe1c4016debdfbd7d035a39b79c1;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/files/qemu-system-aarch64-wrapper b/modules/ganeti2/files/qemu-system-aarch64-wrapper index d00d1557b..412d8b3fa 100755 --- a/modules/ganeti2/files/qemu-system-aarch64-wrapper +++ b/modules/ganeti2/files/qemu-system-aarch64-wrapper @@ -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. @@ -23,25 +23,24 @@ while [ "$1" ]; do # Ignore the machine argument (it will be defined below), # except when querying the list of machines if [ "$2" = "?" ] ; then - args+=("-M") - args+=("?") + machine="?" 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 ;; *) # Replace PCI devices by their bus agnostic variant, and drop # all the PCI related options - args+=("$(echo $1 | sed -e 's/virtio-\(\w\+\)-pci/virtio-\1-device/' -e 's/,bus=[^,]\+,addr=[^,]\+//')") + args+=("$(echo $1 | sed -e 's/virtio-\(\w\+\)-pci/virtio-\1-device/' -e 's/,bus=[^,]\+//' -e 's/,addr=[^,]\+//')") ;; esac shift