[kvm-unit-tests,v2,4/4] arm/run: clean-up setting of accel options
diff mbox

Message ID 1436252613-1540-5-git-send-email-alex.bennee@linaro.org
State New
Headers show

Commit Message

Alex Bennée July 7, 2015, 7:03 a.m. UTC
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.bennee@linaro.org>

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

Comments

Andrew Jones July 7, 2015, 11:40 a.m. UTC | #1
On Tue, Jul 07, 2015 at 08:03:33AM +0100, Alex Bennée wrote:
> 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.bennee@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

The "1" string here again

> +	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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

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'