diff mbox series

[kvm-unit-tests,v2,5/5] arm64: Use -cpu max as the default for TCG

Message ID 20250314154904.3946484-7-jean-philippe@linaro.org (mailing list archive)
State New, archived
Headers show
Series arm64: Change the default QEMU CPU type to "max" | expand

Commit Message

Jean-Philippe Brucker March 14, 2025, 3:49 p.m. UTC
In order to test all the latest features, default to "max" as the QEMU
CPU type on arm64.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
 arm/run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Auger March 17, 2025, 10:13 a.m. UTC | #1
Hi Jean-Philippe,


On 3/14/25 4:49 PM, Jean-Philippe Brucker wrote:
> In order to test all the latest features, default to "max" as the QEMU
> CPU type on arm64.
>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Eric
> ---
>  arm/run | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arm/run b/arm/run
> index 561bafab..84232e28 100755
> --- a/arm/run
> +++ b/arm/run
> @@ -45,7 +45,7 @@ if [ -z "$qemu_cpu" ]; then
>  			qemu_cpu+=",aarch64=off"
>  		fi
>  	elif [ "$ARCH" = "arm64" ]; then
> -		qemu_cpu="cortex-a57"
> +		qemu_cpu="max"
>  	else
>  		qemu_cpu="cortex-a15"
>  	fi
Andrew Jones March 22, 2025, 11:27 a.m. UTC | #2
On Fri, Mar 14, 2025 at 03:49:05PM +0000, Jean-Philippe Brucker wrote:
> In order to test all the latest features, default to "max" as the QEMU
> CPU type on arm64.
> 
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> ---
>  arm/run | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arm/run b/arm/run
> index 561bafab..84232e28 100755
> --- a/arm/run
> +++ b/arm/run
> @@ -45,7 +45,7 @@ if [ -z "$qemu_cpu" ]; then
>  			qemu_cpu+=",aarch64=off"
>  		fi
>  	elif [ "$ARCH" = "arm64" ]; then
> -		qemu_cpu="cortex-a57"
> +		qemu_cpu="max"
>  	else
>  		qemu_cpu="cortex-a15"

arm should also be able to default to 'max', right?

Thanks,
drew

>  	fi
> -- 
> 2.48.1
> 
> 
> -- 
> kvm-riscv mailing list
> kvm-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kvm-riscv
Jean-Philippe Brucker March 24, 2025, 3:50 p.m. UTC | #3
On Sat, Mar 22, 2025 at 12:27:56PM +0100, Andrew Jones wrote:
> On Fri, Mar 14, 2025 at 03:49:05PM +0000, Jean-Philippe Brucker wrote:
> > In order to test all the latest features, default to "max" as the QEMU
> > CPU type on arm64.
> > 
> > Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> > ---
> >  arm/run | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arm/run b/arm/run
> > index 561bafab..84232e28 100755
> > --- a/arm/run
> > +++ b/arm/run
> > @@ -45,7 +45,7 @@ if [ -z "$qemu_cpu" ]; then
> >  			qemu_cpu+=",aarch64=off"
> >  		fi
> >  	elif [ "$ARCH" = "arm64" ]; then
> > -		qemu_cpu="cortex-a57"
> > +		qemu_cpu="max"
> >  	else
> >  		qemu_cpu="cortex-a15"
> 
> arm should also be able to default to 'max', right?

Yes I'll change this.

I didn't earlier because it failed when I tried it, but it looks like I
had QEMU=.../qemu-system-aarch64 in my environment variables, overriding
the default qemu-system-arm (32-bit only). "qemu-system-aarch64 -cpu max"
doesn't boot 32-bit code, but "qemu-system-aarch64 -cpu cortex-a15" does.
Anyway, without explicitly setting the wrong QEMU, "-cpu max" works for
32-bit.

Thanks,
Jean
Andrew Jones March 24, 2025, 4:33 p.m. UTC | #4
On Mon, Mar 24, 2025 at 03:50:45PM +0000, Jean-Philippe Brucker wrote:
> On Sat, Mar 22, 2025 at 12:27:56PM +0100, Andrew Jones wrote:
> > On Fri, Mar 14, 2025 at 03:49:05PM +0000, Jean-Philippe Brucker wrote:
> > > In order to test all the latest features, default to "max" as the QEMU
> > > CPU type on arm64.
> > > 
> > > Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> > > ---
> > >  arm/run | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/arm/run b/arm/run
> > > index 561bafab..84232e28 100755
> > > --- a/arm/run
> > > +++ b/arm/run
> > > @@ -45,7 +45,7 @@ if [ -z "$qemu_cpu" ]; then
> > >  			qemu_cpu+=",aarch64=off"
> > >  		fi
> > >  	elif [ "$ARCH" = "arm64" ]; then
> > > -		qemu_cpu="cortex-a57"
> > > +		qemu_cpu="max"
> > >  	else
> > >  		qemu_cpu="cortex-a15"
> > 
> > arm should also be able to default to 'max', right?
> 
> Yes I'll change this.
> 
> I didn't earlier because it failed when I tried it, but it looks like I
> had QEMU=.../qemu-system-aarch64 in my environment variables, overriding
> the default qemu-system-arm (32-bit only). "qemu-system-aarch64 -cpu max"
> doesn't boot 32-bit code, but "qemu-system-aarch64 -cpu cortex-a15" does.
> Anyway, without explicitly setting the wrong QEMU, "-cpu max" works for
> 32-bit.

Hmm, so now I'm not sure we want to change arm to max. Maybe? People
have certainly gotten used to only needing qemu-system-aarch64 to run
both arm64 and arm, so this change would break that. It seems like
qemu-system-aarch64 should also have a 'max32' cpu model, but it
doesn't. So, let's hold off on changing arm to max for now. Users who
want it will have to both change their QEMU binary and specify -qemu-cpu.

Thanks,
drew
diff mbox series

Patch

diff --git a/arm/run b/arm/run
index 561bafab..84232e28 100755
--- a/arm/run
+++ b/arm/run
@@ -45,7 +45,7 @@  if [ -z "$qemu_cpu" ]; then
 			qemu_cpu+=",aarch64=off"
 		fi
 	elif [ "$ARCH" = "arm64" ]; then
-		qemu_cpu="cortex-a57"
+		qemu_cpu="max"
 	else
 		qemu_cpu="cortex-a15"
 	fi