It would be nice to use --no-kvm but that flags a warning on pure-TCG
builds. We echo the fact we are using TCG for the benefit of interactive
use.

Signed-off-by: Alex Bennée <alex.ben...@linaro.org>

---
v2
  - rm redundant M= statement
---
 arm/run | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arm/run b/arm/run
index 493ce0d..7266004 100755
--- a/arm/run
+++ b/arm/run
@@ -32,6 +32,12 @@ if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > 
/dev/null; then
 fi
 
 M='-machine virt'
+if [ $usingkvm = 1 ]; then
+       M+=",accel=kvm"
+else
+       echo "Running with TCG"
+       M+=',accel=tcg'
+fi
 
 if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then
        echo "$qpath doesn't support virtio-console for chr-testdev. Exiting."
@@ -44,7 +50,6 @@ if $qemu $M -chardev testdev,id=id -initrd . 2>&1 \
        exit 2
 fi
 
-M='-machine virt,accel=kvm:tcg'
 chr_testdev='-device virtio-serial-device'
 chr_testdev+=' -device virtconsole,chardev=ctd -chardev testdev,id=ctd'
 
-- 
2.4.5

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to