diff mbox

[kvm-unit-tests,v2,6/5] x86/run: support accelerator controls

Message ID 20170629143215.13801-1-rkrcmar@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Radim Krčmář June 29, 2017, 2:32 p.m. UTC
It's easy to support and we do have the option for other architectures.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
 x86/run | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Paolo Bonzini June 30, 2017, 10:42 a.m. UTC | #1
Applied both, thanks.

Paolo

On 29/06/2017 16:32, Radim Krčmář wrote:
> It's easy to support and we do have the option for other architectures.
> 
> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
> ---
>  x86/run | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/x86/run b/x86/run
> index f319b68ef693..e59c6c590a20 100755
> --- a/x86/run
> +++ b/x86/run
> @@ -9,6 +9,9 @@ if [ -z "$STANDALONE" ]; then
>  	source scripts/arch-run.bash
>  fi
>  
> +ACCEL=$(get_qemu_accelerator) ||
> +	exit $?
> +
>  qemu=$(search_qemu_binary) ||
>  	exit $?
>  
> @@ -34,8 +37,8 @@ else
>  	pc_testdev="-device testdev,chardev=testlog -chardev file,id=testlog,path=msr.out"
>  fi
>  
> -command="${qemu} -nodefaults -enable-kvm $pc_testdev -vnc none -serial stdio $pci_testdev $hyperv_testdev"
> -command+=" -kernel"
> +command="${qemu} -nodefaults $pc_testdev -vnc none -serial stdio $pci_testdev $hyperv_testdev"
> +command+=" -machine accel=$ACCEL -kernel"
>  command="$(timeout_cmd) $command"
>  
>  run_qemu ${command} "$@"
>
diff mbox

Patch

diff --git a/x86/run b/x86/run
index f319b68ef693..e59c6c590a20 100755
--- a/x86/run
+++ b/x86/run
@@ -9,6 +9,9 @@  if [ -z "$STANDALONE" ]; then
 	source scripts/arch-run.bash
 fi
 
+ACCEL=$(get_qemu_accelerator) ||
+	exit $?
+
 qemu=$(search_qemu_binary) ||
 	exit $?
 
@@ -34,8 +37,8 @@  else
 	pc_testdev="-device testdev,chardev=testlog -chardev file,id=testlog,path=msr.out"
 fi
 
-command="${qemu} -nodefaults -enable-kvm $pc_testdev -vnc none -serial stdio $pci_testdev $hyperv_testdev"
-command+=" -kernel"
+command="${qemu} -nodefaults $pc_testdev -vnc none -serial stdio $pci_testdev $hyperv_testdev"
+command+=" -machine accel=$ACCEL -kernel"
 command="$(timeout_cmd) $command"
 
 run_qemu ${command} "$@"