All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems
@ 2022-03-17 16:56 ` Alexandru Elisei
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandru Elisei @ 2022-03-17 16:56 UTC (permalink / raw)
  To: drjones, kvm, kvmarm

From: Andrew Jones <drjones@redhat.com>

If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only
be run by using the TCG accelerator. In this case use TCG instead of KVM.

Signed-off-by: Andrew Jones <drjones@redhat.com>
[ Alex E: Added commit message ]
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
---
 arm/run | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/arm/run b/arm/run
index 28a0b4ad2729..128489125dcb 100755
--- a/arm/run
+++ b/arm/run
@@ -10,16 +10,24 @@ if [ -z "$KUT_STANDALONE" ]; then
 fi
 processor="$PROCESSOR"
 
-ACCEL=$(get_qemu_accelerator) ||
+accel=$(get_qemu_accelerator) ||
 	exit $?
 
-if [ "$ACCEL" = "kvm" ]; then
+if [ "$accel" = "kvm" ]; then
 	QEMU_ARCH=$HOST
 fi
 
 qemu=$(search_qemu_binary) ||
 	exit $?
 
+if [ "$QEMU" ] && [ -z "$ACCEL" ] &&
+   [ "$HOST" = "aarch64" ] && [ "$ARCH" = "arm" ] &&
+   [ "$(basename $QEMU)" = "qemu-system-arm" ]; then
+	accel=tcg
+fi
+
+ACCEL=$accel
+
 if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
 	echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
 	exit 2
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems
@ 2022-03-17 16:56 ` Alexandru Elisei
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandru Elisei @ 2022-03-17 16:56 UTC (permalink / raw)
  To: drjones, kvm, kvmarm

From: Andrew Jones <drjones@redhat.com>

If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only
be run by using the TCG accelerator. In this case use TCG instead of KVM.

Signed-off-by: Andrew Jones <drjones@redhat.com>
[ Alex E: Added commit message ]
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
---
 arm/run | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/arm/run b/arm/run
index 28a0b4ad2729..128489125dcb 100755
--- a/arm/run
+++ b/arm/run
@@ -10,16 +10,24 @@ if [ -z "$KUT_STANDALONE" ]; then
 fi
 processor="$PROCESSOR"
 
-ACCEL=$(get_qemu_accelerator) ||
+accel=$(get_qemu_accelerator) ||
 	exit $?
 
-if [ "$ACCEL" = "kvm" ]; then
+if [ "$accel" = "kvm" ]; then
 	QEMU_ARCH=$HOST
 fi
 
 qemu=$(search_qemu_binary) ||
 	exit $?
 
+if [ "$QEMU" ] && [ -z "$ACCEL" ] &&
+   [ "$HOST" = "aarch64" ] && [ "$ARCH" = "arm" ] &&
+   [ "$(basename $QEMU)" = "qemu-system-arm" ]; then
+	accel=tcg
+fi
+
+ACCEL=$accel
+
 if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
 	echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
 	exit 2
-- 
2.35.1

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems
  2022-03-17 16:56 ` Alexandru Elisei
@ 2022-03-17 17:45   ` Andrew Jones
  -1 siblings, 0 replies; 8+ messages in thread
From: Andrew Jones @ 2022-03-17 17:45 UTC (permalink / raw)
  To: Alexandru Elisei; +Cc: kvm, kvmarm

On Thu, Mar 17, 2022 at 04:56:01PM +0000, Alexandru Elisei wrote:
> From: Andrew Jones <drjones@redhat.com>
> 
> If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only
> be run by using the TCG accelerator. In this case use TCG instead of KVM.
> 
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> [ Alex E: Added commit message ]
> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> ---
>  arm/run | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/arm/run b/arm/run
> index 28a0b4ad2729..128489125dcb 100755
> --- a/arm/run
> +++ b/arm/run
> @@ -10,16 +10,24 @@ if [ -z "$KUT_STANDALONE" ]; then
>  fi
>  processor="$PROCESSOR"
>  
> -ACCEL=$(get_qemu_accelerator) ||
> +accel=$(get_qemu_accelerator) ||
>  	exit $?
>  
> -if [ "$ACCEL" = "kvm" ]; then
> +if [ "$accel" = "kvm" ]; then
>  	QEMU_ARCH=$HOST
>  fi
>  
>  qemu=$(search_qemu_binary) ||
>  	exit $?
>  
> +if [ "$QEMU" ] && [ -z "$ACCEL" ] &&
> +   [ "$HOST" = "aarch64" ] && [ "$ARCH" = "arm" ] &&
> +   [ "$(basename $QEMU)" = "qemu-system-arm" ]; then
> +	accel=tcg
> +fi
> +
> +ACCEL=$accel
> +
>  if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
>  	echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
>  	exit 2
> -- 
> 2.35.1
>

Ha, OK, I guess you posting this is a strong vote in favor of this
behavior. I've queued it

https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue

Thanks,
drew 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems
@ 2022-03-17 17:45   ` Andrew Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Jones @ 2022-03-17 17:45 UTC (permalink / raw)
  To: Alexandru Elisei; +Cc: kvmarm, kvm

On Thu, Mar 17, 2022 at 04:56:01PM +0000, Alexandru Elisei wrote:
> From: Andrew Jones <drjones@redhat.com>
> 
> If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only
> be run by using the TCG accelerator. In this case use TCG instead of KVM.
> 
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> [ Alex E: Added commit message ]
> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> ---
>  arm/run | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/arm/run b/arm/run
> index 28a0b4ad2729..128489125dcb 100755
> --- a/arm/run
> +++ b/arm/run
> @@ -10,16 +10,24 @@ if [ -z "$KUT_STANDALONE" ]; then
>  fi
>  processor="$PROCESSOR"
>  
> -ACCEL=$(get_qemu_accelerator) ||
> +accel=$(get_qemu_accelerator) ||
>  	exit $?
>  
> -if [ "$ACCEL" = "kvm" ]; then
> +if [ "$accel" = "kvm" ]; then
>  	QEMU_ARCH=$HOST
>  fi
>  
>  qemu=$(search_qemu_binary) ||
>  	exit $?
>  
> +if [ "$QEMU" ] && [ -z "$ACCEL" ] &&
> +   [ "$HOST" = "aarch64" ] && [ "$ARCH" = "arm" ] &&
> +   [ "$(basename $QEMU)" = "qemu-system-arm" ]; then
> +	accel=tcg
> +fi
> +
> +ACCEL=$accel
> +
>  if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
>  	echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
>  	exit 2
> -- 
> 2.35.1
>

Ha, OK, I guess you posting this is a strong vote in favor of this
behavior. I've queued it

https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue

Thanks,
drew 

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems
  2022-03-17 17:45   ` Andrew Jones
@ 2022-03-17 18:03     ` Alexandru Elisei
  -1 siblings, 0 replies; 8+ messages in thread
From: Alexandru Elisei @ 2022-03-17 18:03 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kvm, kvmarm

Hi,

On Thu, Mar 17, 2022 at 06:45:07PM +0100, Andrew Jones wrote:
> On Thu, Mar 17, 2022 at 04:56:01PM +0000, Alexandru Elisei wrote:
> > From: Andrew Jones <drjones@redhat.com>
> > 
> > If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only
> > be run by using the TCG accelerator. In this case use TCG instead of KVM.
> > 
> > Signed-off-by: Andrew Jones <drjones@redhat.com>
> > [ Alex E: Added commit message ]
> > Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> > ---
> >  arm/run | 12 ++++++++++--
> >  1 file changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arm/run b/arm/run
> > index 28a0b4ad2729..128489125dcb 100755
> > --- a/arm/run
> > +++ b/arm/run
> > @@ -10,16 +10,24 @@ if [ -z "$KUT_STANDALONE" ]; then
> >  fi
> >  processor="$PROCESSOR"
> >  
> > -ACCEL=$(get_qemu_accelerator) ||
> > +accel=$(get_qemu_accelerator) ||
> >  	exit $?
> >  
> > -if [ "$ACCEL" = "kvm" ]; then
> > +if [ "$accel" = "kvm" ]; then
> >  	QEMU_ARCH=$HOST
> >  fi
> >  
> >  qemu=$(search_qemu_binary) ||
> >  	exit $?
> >  
> > +if [ "$QEMU" ] && [ -z "$ACCEL" ] &&
> > +   [ "$HOST" = "aarch64" ] && [ "$ARCH" = "arm" ] &&
> > +   [ "$(basename $QEMU)" = "qemu-system-arm" ]; then
> > +	accel=tcg
> > +fi
> > +
> > +ACCEL=$accel
> > +
> >  if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
> >  	echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
> >  	exit 2
> > -- 
> > 2.35.1
> >
> 
> Ha, OK, I guess you posting this is a strong vote in favor of this
> behavior. I've queued it

Ah, yes, maybe I should've been more clear about it. I think this is more
intuitive for the new users who might not be very familiar with
run_tests.sh internals, and like you've said it won't break existing users
who had to set ACCEL=tcg to get the desired behaviour anyway.

Thanks you for queueing it so fast! Should probably have also mentioned
this as a comment in the commit, but I take full responsibility for
breaking stuff.

Alex

> 
> https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue
> 
> Thanks,
> drew 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems
@ 2022-03-17 18:03     ` Alexandru Elisei
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandru Elisei @ 2022-03-17 18:03 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kvmarm, kvm

Hi,

On Thu, Mar 17, 2022 at 06:45:07PM +0100, Andrew Jones wrote:
> On Thu, Mar 17, 2022 at 04:56:01PM +0000, Alexandru Elisei wrote:
> > From: Andrew Jones <drjones@redhat.com>
> > 
> > If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only
> > be run by using the TCG accelerator. In this case use TCG instead of KVM.
> > 
> > Signed-off-by: Andrew Jones <drjones@redhat.com>
> > [ Alex E: Added commit message ]
> > Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> > ---
> >  arm/run | 12 ++++++++++--
> >  1 file changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arm/run b/arm/run
> > index 28a0b4ad2729..128489125dcb 100755
> > --- a/arm/run
> > +++ b/arm/run
> > @@ -10,16 +10,24 @@ if [ -z "$KUT_STANDALONE" ]; then
> >  fi
> >  processor="$PROCESSOR"
> >  
> > -ACCEL=$(get_qemu_accelerator) ||
> > +accel=$(get_qemu_accelerator) ||
> >  	exit $?
> >  
> > -if [ "$ACCEL" = "kvm" ]; then
> > +if [ "$accel" = "kvm" ]; then
> >  	QEMU_ARCH=$HOST
> >  fi
> >  
> >  qemu=$(search_qemu_binary) ||
> >  	exit $?
> >  
> > +if [ "$QEMU" ] && [ -z "$ACCEL" ] &&
> > +   [ "$HOST" = "aarch64" ] && [ "$ARCH" = "arm" ] &&
> > +   [ "$(basename $QEMU)" = "qemu-system-arm" ]; then
> > +	accel=tcg
> > +fi
> > +
> > +ACCEL=$accel
> > +
> >  if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
> >  	echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
> >  	exit 2
> > -- 
> > 2.35.1
> >
> 
> Ha, OK, I guess you posting this is a strong vote in favor of this
> behavior. I've queued it

Ah, yes, maybe I should've been more clear about it. I think this is more
intuitive for the new users who might not be very familiar with
run_tests.sh internals, and like you've said it won't break existing users
who had to set ACCEL=tcg to get the desired behaviour anyway.

Thanks you for queueing it so fast! Should probably have also mentioned
this as a comment in the commit, but I take full responsibility for
breaking stuff.

Alex

> 
> https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue
> 
> Thanks,
> drew 
> 
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems
  2022-03-17 18:03     ` Alexandru Elisei
@ 2022-05-17 14:43       ` Andrew Jones
  -1 siblings, 0 replies; 8+ messages in thread
From: Andrew Jones @ 2022-05-17 14:43 UTC (permalink / raw)
  To: Alexandru Elisei; +Cc: kvm, kvmarm

On Thu, Mar 17, 2022 at 06:03:07PM +0000, Alexandru Elisei wrote:
> Hi,
> 
> On Thu, Mar 17, 2022 at 06:45:07PM +0100, Andrew Jones wrote:
> > On Thu, Mar 17, 2022 at 04:56:01PM +0000, Alexandru Elisei wrote:
> > > From: Andrew Jones <drjones@redhat.com>
> > > 
> > > If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only
> > > be run by using the TCG accelerator. In this case use TCG instead of KVM.
> > > 
> > > Signed-off-by: Andrew Jones <drjones@redhat.com>
> > > [ Alex E: Added commit message ]
> > > Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> > > ---
> > >  arm/run | 12 ++++++++++--
> > >  1 file changed, 10 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/arm/run b/arm/run
> > > index 28a0b4ad2729..128489125dcb 100755
> > > --- a/arm/run
> > > +++ b/arm/run
> > > @@ -10,16 +10,24 @@ if [ -z "$KUT_STANDALONE" ]; then
> > >  fi
> > >  processor="$PROCESSOR"
> > >  
> > > -ACCEL=$(get_qemu_accelerator) ||
> > > +accel=$(get_qemu_accelerator) ||
> > >  	exit $?
> > >  
> > > -if [ "$ACCEL" = "kvm" ]; then
> > > +if [ "$accel" = "kvm" ]; then
> > >  	QEMU_ARCH=$HOST
> > >  fi
> > >  
> > >  qemu=$(search_qemu_binary) ||
> > >  	exit $?
> > >  
> > > +if [ "$QEMU" ] && [ -z "$ACCEL" ] &&
> > > +   [ "$HOST" = "aarch64" ] && [ "$ARCH" = "arm" ] &&
> > > +   [ "$(basename $QEMU)" = "qemu-system-arm" ]; then
> > > +	accel=tcg
> > > +fi
> > > +
> > > +ACCEL=$accel
> > > +
> > >  if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
> > >  	echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
> > >  	exit 2
> > > -- 
> > > 2.35.1
> > >
> > 
> > Ha, OK, I guess you posting this is a strong vote in favor of this
> > behavior. I've queued it
> 
> Ah, yes, maybe I should've been more clear about it. I think this is more
> intuitive for the new users who might not be very familiar with
> run_tests.sh internals, and like you've said it won't break existing users
> who had to set ACCEL=tcg to get the desired behaviour anyway.
> 
> Thanks you for queueing it so fast! Should probably have also mentioned
> this as a comment in the commit, but I take full responsibility for
> breaking stuff.
> 
> Alex
> 
> > 
> > https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue

I finally merged this.

Thanks,
drew


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems
@ 2022-05-17 14:43       ` Andrew Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Jones @ 2022-05-17 14:43 UTC (permalink / raw)
  To: Alexandru Elisei; +Cc: kvmarm, kvm

On Thu, Mar 17, 2022 at 06:03:07PM +0000, Alexandru Elisei wrote:
> Hi,
> 
> On Thu, Mar 17, 2022 at 06:45:07PM +0100, Andrew Jones wrote:
> > On Thu, Mar 17, 2022 at 04:56:01PM +0000, Alexandru Elisei wrote:
> > > From: Andrew Jones <drjones@redhat.com>
> > > 
> > > If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only
> > > be run by using the TCG accelerator. In this case use TCG instead of KVM.
> > > 
> > > Signed-off-by: Andrew Jones <drjones@redhat.com>
> > > [ Alex E: Added commit message ]
> > > Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> > > ---
> > >  arm/run | 12 ++++++++++--
> > >  1 file changed, 10 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/arm/run b/arm/run
> > > index 28a0b4ad2729..128489125dcb 100755
> > > --- a/arm/run
> > > +++ b/arm/run
> > > @@ -10,16 +10,24 @@ if [ -z "$KUT_STANDALONE" ]; then
> > >  fi
> > >  processor="$PROCESSOR"
> > >  
> > > -ACCEL=$(get_qemu_accelerator) ||
> > > +accel=$(get_qemu_accelerator) ||
> > >  	exit $?
> > >  
> > > -if [ "$ACCEL" = "kvm" ]; then
> > > +if [ "$accel" = "kvm" ]; then
> > >  	QEMU_ARCH=$HOST
> > >  fi
> > >  
> > >  qemu=$(search_qemu_binary) ||
> > >  	exit $?
> > >  
> > > +if [ "$QEMU" ] && [ -z "$ACCEL" ] &&
> > > +   [ "$HOST" = "aarch64" ] && [ "$ARCH" = "arm" ] &&
> > > +   [ "$(basename $QEMU)" = "qemu-system-arm" ]; then
> > > +	accel=tcg
> > > +fi
> > > +
> > > +ACCEL=$accel
> > > +
> > >  if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
> > >  	echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
> > >  	exit 2
> > > -- 
> > > 2.35.1
> > >
> > 
> > Ha, OK, I guess you posting this is a strong vote in favor of this
> > behavior. I've queued it
> 
> Ah, yes, maybe I should've been more clear about it. I think this is more
> intuitive for the new users who might not be very familiar with
> run_tests.sh internals, and like you've said it won't break existing users
> who had to set ACCEL=tcg to get the desired behaviour anyway.
> 
> Thanks you for queueing it so fast! Should probably have also mentioned
> this as a comment in the commit, but I take full responsibility for
> breaking stuff.
> 
> Alex
> 
> > 
> > https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue

I finally merged this.

Thanks,
drew

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-17 14:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 16:56 [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems Alexandru Elisei
2022-03-17 16:56 ` Alexandru Elisei
2022-03-17 17:45 ` Andrew Jones
2022-03-17 17:45   ` Andrew Jones
2022-03-17 18:03   ` Alexandru Elisei
2022-03-17 18:03     ` Alexandru Elisei
2022-05-17 14:43     ` Andrew Jones
2022-05-17 14:43       ` Andrew Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.