All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kvm-unit-tests] arm64: TCG: Use max cpu type
@ 2022-06-03 11:13 Andrew Jones
  2022-06-03 12:21 ` Cornelia Huck
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Jones @ 2022-06-03 11:13 UTC (permalink / raw)
  To: kvm; +Cc: nikos.nikoleris, alex.bennee

The max cpu type is a better default cpu type for running tests
with TCG as it provides the maximum possible feature set. Also,
the max cpu type was introduced in QEMU v2.12, so we should be
safe to switch to it at this point.

There's also a 32-bit arm max cpu type, but we leave the default
as cortex-a15, because compilation requires we specify for which
processor we want to compile and there's no such thing as a 'max'.

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 5b7daac3c6e8..1474dde2c70d 100755
--- a/configure
+++ b/configure
@@ -223,7 +223,7 @@ fi
 [ -z "$processor" ] && processor="$arch"
 
 if [ "$processor" = "arm64" ]; then
-    processor="cortex-a57"
+    processor="max"
 elif [ "$processor" = "arm" ]; then
     processor="cortex-a15"
 fi
-- 
2.34.3


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

* Re: [PATCH kvm-unit-tests] arm64: TCG: Use max cpu type
  2022-06-03 11:13 [PATCH kvm-unit-tests] arm64: TCG: Use max cpu type Andrew Jones
@ 2022-06-03 12:21 ` Cornelia Huck
  2022-06-03 13:15   ` Andrew Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Cornelia Huck @ 2022-06-03 12:21 UTC (permalink / raw)
  To: Andrew Jones, kvm; +Cc: nikos.nikoleris, alex.bennee

On Fri, Jun 03 2022, Andrew Jones <drjones@redhat.com> wrote:

> The max cpu type is a better default cpu type for running tests
> with TCG as it provides the maximum possible feature set. Also,
> the max cpu type was introduced in QEMU v2.12, so we should be
> safe to switch to it at this point.
>
> There's also a 32-bit arm max cpu type, but we leave the default
> as cortex-a15, because compilation requires we specify for which
> processor we want to compile and there's no such thing as a 'max'.
>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 5b7daac3c6e8..1474dde2c70d 100755
> --- a/configure
> +++ b/configure
> @@ -223,7 +223,7 @@ fi
>  [ -z "$processor" ] && processor="$arch"
>  
>  if [ "$processor" = "arm64" ]; then
> -    processor="cortex-a57"
> +    processor="max"
>  elif [ "$processor" = "arm" ]; then
>      processor="cortex-a15"
>  fi

This looks correct, but the "processor" usage is confusing, as it seems
to cover two different things:

- what processor to compile for; this is what configure help claims
  "processor" is used for, but it only seems to have that effect on
  32-bit arm
- which cpu model to use for tcg on 32-bit and 64-bit arm (other archs
  don't seem to care)

So, I wonder whether it would be less confusing to drop setting
"processor" for arm64, and set the cpu models for tcg in arm/run (if
none have been specified)?


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

* Re: [PATCH kvm-unit-tests] arm64: TCG: Use max cpu type
  2022-06-03 12:21 ` Cornelia Huck
@ 2022-06-03 13:15   ` Andrew Jones
  2022-06-03 13:38     ` Cornelia Huck
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Jones @ 2022-06-03 13:15 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: kvm, nikos.nikoleris, alex.bennee

On Fri, Jun 03, 2022 at 02:21:10PM +0200, Cornelia Huck wrote:
> On Fri, Jun 03 2022, Andrew Jones <drjones@redhat.com> wrote:
> 
> > The max cpu type is a better default cpu type for running tests
> > with TCG as it provides the maximum possible feature set. Also,
> > the max cpu type was introduced in QEMU v2.12, so we should be
> > safe to switch to it at this point.
> >
> > There's also a 32-bit arm max cpu type, but we leave the default
> > as cortex-a15, because compilation requires we specify for which
> > processor we want to compile and there's no such thing as a 'max'.
> >
> > Signed-off-by: Andrew Jones <drjones@redhat.com>
> > ---
> >  configure | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/configure b/configure
> > index 5b7daac3c6e8..1474dde2c70d 100755
> > --- a/configure
> > +++ b/configure
> > @@ -223,7 +223,7 @@ fi
> >  [ -z "$processor" ] && processor="$arch"
> >  
> >  if [ "$processor" = "arm64" ]; then
> > -    processor="cortex-a57"
> > +    processor="max"
> >  elif [ "$processor" = "arm" ]; then
> >      processor="cortex-a15"
> >  fi
> 
> This looks correct, but the "processor" usage is confusing, as it seems
> to cover two different things:
> 
> - what processor to compile for; this is what configure help claims
>   "processor" is used for, but it only seems to have that effect on
>   32-bit arm
> - which cpu model to use for tcg on 32-bit and 64-bit arm (other archs
>   don't seem to care)
> 
> So, I wonder whether it would be less confusing to drop setting
> "processor" for arm64, and set the cpu models for tcg in arm/run (if
> none have been specified)?
>

Good observation, Conny. So, I should probably leave configure alone,
cortex-a57 is a reasonable processor to compile for, max is based off
that. Then, I can select max in arm/run for both arm and arm64 tests
instead of using processor there.

Thanks,
drew


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

* Re: [PATCH kvm-unit-tests] arm64: TCG: Use max cpu type
  2022-06-03 13:15   ` Andrew Jones
@ 2022-06-03 13:38     ` Cornelia Huck
  2022-06-03 15:10       ` Andrew Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Cornelia Huck @ 2022-06-03 13:38 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kvm, nikos.nikoleris, alex.bennee

On Fri, Jun 03 2022, Andrew Jones <drjones@redhat.com> wrote:

> On Fri, Jun 03, 2022 at 02:21:10PM +0200, Cornelia Huck wrote:
>> On Fri, Jun 03 2022, Andrew Jones <drjones@redhat.com> wrote:
>> 
>> > The max cpu type is a better default cpu type for running tests
>> > with TCG as it provides the maximum possible feature set. Also,
>> > the max cpu type was introduced in QEMU v2.12, so we should be
>> > safe to switch to it at this point.
>> >
>> > There's also a 32-bit arm max cpu type, but we leave the default
>> > as cortex-a15, because compilation requires we specify for which
>> > processor we want to compile and there's no such thing as a 'max'.
>> >
>> > Signed-off-by: Andrew Jones <drjones@redhat.com>
>> > ---
>> >  configure | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/configure b/configure
>> > index 5b7daac3c6e8..1474dde2c70d 100755
>> > --- a/configure
>> > +++ b/configure
>> > @@ -223,7 +223,7 @@ fi
>> >  [ -z "$processor" ] && processor="$arch"
>> >  
>> >  if [ "$processor" = "arm64" ]; then
>> > -    processor="cortex-a57"
>> > +    processor="max"
>> >  elif [ "$processor" = "arm" ]; then
>> >      processor="cortex-a15"
>> >  fi
>> 
>> This looks correct, but the "processor" usage is confusing, as it seems
>> to cover two different things:
>> 
>> - what processor to compile for; this is what configure help claims
>>   "processor" is used for, but it only seems to have that effect on
>>   32-bit arm
>> - which cpu model to use for tcg on 32-bit and 64-bit arm (other archs
>>   don't seem to care)
>> 
>> So, I wonder whether it would be less confusing to drop setting
>> "processor" for arm64, and set the cpu models for tcg in arm/run (if
>> none have been specified)?
>>
>
> Good observation, Conny. So, I should probably leave configure alone,
> cortex-a57 is a reasonable processor to compile for, max is based off
> that.

Yes, it would be reasonable; however, I only see Makefile.arm put it
into CFLAGS, not Makefile.arm64, unless I'm missing something here. But
it doesn't hurt, either.

> Then, I can select max in arm/run for both arm and arm64 tests
> instead of using processor there.

Unless you want to be able to override this via -processor=
explicitly... although I doubt that this is in common use.


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

* Re: [PATCH kvm-unit-tests] arm64: TCG: Use max cpu type
  2022-06-03 13:38     ` Cornelia Huck
@ 2022-06-03 15:10       ` Andrew Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Jones @ 2022-06-03 15:10 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: kvm, nikos.nikoleris, alex.bennee

On Fri, Jun 03, 2022 at 03:38:08PM +0200, Cornelia Huck wrote:
> On Fri, Jun 03 2022, Andrew Jones <drjones@redhat.com> wrote:
> 
> > On Fri, Jun 03, 2022 at 02:21:10PM +0200, Cornelia Huck wrote:
> >> On Fri, Jun 03 2022, Andrew Jones <drjones@redhat.com> wrote:
> >> 
> >> > The max cpu type is a better default cpu type for running tests
> >> > with TCG as it provides the maximum possible feature set. Also,
> >> > the max cpu type was introduced in QEMU v2.12, so we should be
> >> > safe to switch to it at this point.
> >> >
> >> > There's also a 32-bit arm max cpu type, but we leave the default
> >> > as cortex-a15, because compilation requires we specify for which
> >> > processor we want to compile and there's no such thing as a 'max'.
> >> >
> >> > Signed-off-by: Andrew Jones <drjones@redhat.com>
> >> > ---
> >> >  configure | 2 +-
> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/configure b/configure
> >> > index 5b7daac3c6e8..1474dde2c70d 100755
> >> > --- a/configure
> >> > +++ b/configure
> >> > @@ -223,7 +223,7 @@ fi
> >> >  [ -z "$processor" ] && processor="$arch"
> >> >  
> >> >  if [ "$processor" = "arm64" ]; then
> >> > -    processor="cortex-a57"
> >> > +    processor="max"
> >> >  elif [ "$processor" = "arm" ]; then
> >> >      processor="cortex-a15"
> >> >  fi
> >> 
> >> This looks correct, but the "processor" usage is confusing, as it seems
> >> to cover two different things:
> >> 
> >> - what processor to compile for; this is what configure help claims
> >>   "processor" is used for, but it only seems to have that effect on
> >>   32-bit arm
> >> - which cpu model to use for tcg on 32-bit and 64-bit arm (other archs
> >>   don't seem to care)
> >> 
> >> So, I wonder whether it would be less confusing to drop setting
> >> "processor" for arm64, and set the cpu models for tcg in arm/run (if
> >> none have been specified)?
> >>
> >
> > Good observation, Conny. So, I should probably leave configure alone,
> > cortex-a57 is a reasonable processor to compile for, max is based off
> > that.
> 
> Yes, it would be reasonable; however, I only see Makefile.arm put it
> into CFLAGS, not Makefile.arm64, unless I'm missing something here. But
> it doesn't hurt, either.

You're not missing anything, but I'd rather leave it set to something
than nothing.

> 
> > Then, I can select max in arm/run for both arm and arm64 tests
> > instead of using processor there.
> 
> Unless you want to be able to override this via -processor=
> explicitly... although I doubt that this is in common use.
> 

If we want to give users the ability to override the CPU QEMU uses, then
I think I'd rather they do it with an environment variable like they do
the QEMU version and accelerator. While changing to the max cpu in
arm/run I could also start checking a new variable (QEMU_CPU).

Thanks,
drew


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

end of thread, other threads:[~2022-06-03 15:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 11:13 [PATCH kvm-unit-tests] arm64: TCG: Use max cpu type Andrew Jones
2022-06-03 12:21 ` Cornelia Huck
2022-06-03 13:15   ` Andrew Jones
2022-06-03 13:38     ` Cornelia Huck
2022-06-03 15:10       ` 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.