@@ -10,7 +10,12 @@ if [ -z "$STANDALONE" ]; then
fi
processor="$PROCESSOR"
-ACCEL=$(get_accel '([ "$HOST" = "arm" ] && [ "$ARCH" = "arm" ]) || [ "$HOST" = "aarch64" ]') ||
+arch_kvm_available ()
+{
+ ([ "$HOST" = "arm" ] && [ "$ARCH" = "arm" ]) || [ "$HOST" = "aarch64" ]
+}
+
+ACCEL=$(get_accel) ||
exit 2
qemu=$(search_qemu_binary) ||
@@ -9,7 +9,12 @@ if [ -z "$STANDALONE" ]; then
source scripts/arch-run.bash
fi
-ACCEL=$(get_accel '[ "$HOST" = "ppc64" ] && [ "$ARCH" = "ppc64" ]') ||
+arch_kvm_available ()
+{
+ [ "$HOST" = "ppc64" ] && [ "$ARCH" = "ppc64" ]
+}
+
+ACCEL=$(get_accel) ||
exit 2
qemu=$(search_qemu_binary) ||
@@ -9,7 +9,12 @@ if [ -z "$STANDALONE" ]; then
source scripts/arch-run.bash
fi
-ACCEL=$(get_accel '[ "$HOST" = "s390x" ] && [ "$ARCH" = "s390x" ]') ||
+arch_kvm_available ()
+{
+ [ "$HOST" = "s390x" ] && [ "$ARCH" = "s390x" ]
+}
+
+ACCEL=$(get_accel) ||
exit 2
qemu=$(search_qemu_binary) ||
@@ -277,7 +277,7 @@ get_accel ()
{
local kvm_available
- if [ -c /dev/kvm ] && eval "$@"; then
+ if [ -c /dev/kvm ] && arch_kvm_available; then
kvm_available=yes
fi