[PATCH v2] docs: add supported host CPU architectures section

marcandre.lureau@redhat.com posted 1 patch 1 week, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210913130950.214756-1-marcandre.lureau@redhat.com
docs/about/build-platforms.rst | 28 ++++++++++++++++++++++++++++
meson.build                    |  2 +-
2 files changed, 29 insertions(+), 1 deletion(-)

[PATCH v2] docs: add supported host CPU architectures section

Posted by marcandre.lureau@redhat.com 1 week, 4 days ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

I was looking for such documentation, but couldn't find it. Add it to
the build-platform.rst document.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 docs/about/build-platforms.rst | 28 ++++++++++++++++++++++++++++
 meson.build                    |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst
index 692323609e..518a19aff7 100644
--- a/docs/about/build-platforms.rst
+++ b/docs/about/build-platforms.rst
@@ -29,6 +29,34 @@ The `Repology`_ site is a useful resource to identify
 currently shipped versions of software in various operating systems,
 though it does not cover all distros listed below.
 
+Supported host architectures
+----------------------------
+
+Those hosts have a native TCG backend and are regularly tested:
+
+  .. list-table::
+   :header-rows: 1
+
+   * - CPU Architecture
+     - Accelerators
+   * - Arm
+     - kvm (64 bit only), xen
+   * - MIPS
+     - kvm
+   * - PPC
+     - kvm
+   * - RISC-V
+     -
+   * - s390x
+     - kvm
+   * - SPARC
+     -
+   * - x86
+     - kvm, xen, hax, hvf (64 bit only), nvmm, whpx (64 bit only)
+
+Other architectures are not actively maintained. They may be removed in future
+releases.
+
 Linux OS, macOS, FreeBSD, NetBSD, OpenBSD
 -----------------------------------------
 
diff --git a/meson.build b/meson.build
index 9a64d16943..27593c9b90 100644
--- a/meson.build
+++ b/meson.build
@@ -78,7 +78,7 @@ endif
 
 accelerator_targets = { 'CONFIG_KVM': kvm_targets }
 if cpu in ['x86', 'x86_64', 'arm', 'aarch64']
-  # i368 emulator provides xenpv machine type for multiple architectures
+  # i386 emulator provides xenpv machine type for multiple architectures
   accelerator_targets += {
     'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu'],
   }
-- 
2.33.0.113.g6c40894d24


Re: [PATCH v2] docs: add supported host CPU architectures section

Posted by Peter Maydell 1 week, 4 days ago
On Mon, 13 Sept 2021 at 14:10, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> I was looking for such documentation, but couldn't find it. Add it to
> the build-platform.rst document.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  docs/about/build-platforms.rst | 28 ++++++++++++++++++++++++++++
>  meson.build                    |  2 +-
>  2 files changed, 29 insertions(+), 1 deletion(-)
>
> diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst
> index 692323609e..518a19aff7 100644
> --- a/docs/about/build-platforms.rst
> +++ b/docs/about/build-platforms.rst
> @@ -29,6 +29,34 @@ The `Repology`_ site is a useful resource to identify
>  currently shipped versions of software in various operating systems,
>  though it does not cover all distros listed below.
>
> +Supported host architectures
> +----------------------------
> +
> +Those hosts have a native TCG backend and are regularly tested:
> +
> +  .. list-table::
> +   :header-rows: 1
> +
> +   * - CPU Architecture
> +     - Accelerators
> +   * - Arm
> +     - kvm (64 bit only), xen
> +   * - MIPS
> +     - kvm
> +   * - PPC
> +     - kvm
> +   * - RISC-V
> +     -
> +   * - s390x
> +     - kvm
> +   * - SPARC
> +     -
> +   * - x86
> +     - kvm, xen, hax, hvf (64 bit only), nvmm, whpx (64 bit only)

I still wonder if this would be clearer if we listed 'tcg' as
an accelerator like all the others, rather than describing it as
a kind of special case in the text above the table. After all, you
can select it with '-accel tcg' the same as any other.

I think the information in the table is correct now.

Sort the list of accelerators alphabetically ?

> +
> +Other architectures are not actively maintained. They may be removed in future
> +releases.
> +
>  Linux OS, macOS, FreeBSD, NetBSD, OpenBSD
>  -----------------------------------------
>
> diff --git a/meson.build b/meson.build
> index 9a64d16943..27593c9b90 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -78,7 +78,7 @@ endif
>
>  accelerator_targets = { 'CONFIG_KVM': kvm_targets }
>  if cpu in ['x86', 'x86_64', 'arm', 'aarch64']
> -  # i368 emulator provides xenpv machine type for multiple architectures
> +  # i386 emulator provides xenpv machine type for multiple architectures
>    accelerator_targets += {
>      'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu'],
>    }

This change appears to be unrelated ?

thanks
-- PMM

Re: [PATCH v2] docs: add supported host CPU architectures section

Posted by Marc-André Lureau 1 week, 3 days ago
Hi

On Mon, Sep 13, 2021 at 6:28 PM Peter Maydell <peter.maydell@linaro.org>
wrote:

> On Mon, 13 Sept 2021 at 14:10, <marcandre.lureau@redhat.com> wrote:
> >
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > I was looking for such documentation, but couldn't find it. Add it to
> > the build-platform.rst document.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >  docs/about/build-platforms.rst | 28 ++++++++++++++++++++++++++++
> >  meson.build                    |  2 +-
> >  2 files changed, 29 insertions(+), 1 deletion(-)
> >
> > diff --git a/docs/about/build-platforms.rst
> b/docs/about/build-platforms.rst
> > index 692323609e..518a19aff7 100644
> > --- a/docs/about/build-platforms.rst
> > +++ b/docs/about/build-platforms.rst
> > @@ -29,6 +29,34 @@ The `Repology`_ site is a useful resource to identify
> >  currently shipped versions of software in various operating systems,
> >  though it does not cover all distros listed below.
> >
> > +Supported host architectures
> > +----------------------------
> > +
> > +Those hosts have a native TCG backend and are regularly tested:
> > +
> > +  .. list-table::
> > +   :header-rows: 1
> > +
> > +   * - CPU Architecture
> > +     - Accelerators
> > +   * - Arm
> > +     - kvm (64 bit only), xen
> > +   * - MIPS
> > +     - kvm
> > +   * - PPC
> > +     - kvm
> > +   * - RISC-V
> > +     -
> > +   * - s390x
> > +     - kvm
> > +   * - SPARC
> > +     -
> > +   * - x86
> > +     - kvm, xen, hax, hvf (64 bit only), nvmm, whpx (64 bit only)
>
> I still wonder if this would be clearer if we listed 'tcg' as
> an accelerator like all the others, rather than describing it as
> a kind of special case in the text above the table. After all, you
> can select it with '-accel tcg' the same as any other.
>

ok


> I think the information in the table is correct now.
>
> Sort the list of accelerators alphabetically ?
>

ok


> > +
> > +Other architectures are not actively maintained. They may be removed in
> future
> > +releases.
> > +
> >  Linux OS, macOS, FreeBSD, NetBSD, OpenBSD
> >  -----------------------------------------
> >
> > diff --git a/meson.build b/meson.build
> > index 9a64d16943..27593c9b90 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -78,7 +78,7 @@ endif
> >
> >  accelerator_targets = { 'CONFIG_KVM': kvm_targets }
> >  if cpu in ['x86', 'x86_64', 'arm', 'aarch64']
> > -  # i368 emulator provides xenpv machine type for multiple architectures
> > +  # i386 emulator provides xenpv machine type for multiple architectures
> >    accelerator_targets += {
> >      'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu'],
> >    }
>
> This change appears to be unrelated ?
>

minor typo found while looking at our related build script parts. Worth a
different patch?


-- 
Marc-André Lureau

Re: [PATCH v2] docs: add supported host CPU architectures section

Posted by Philippe Mathieu-Daudé 1 week, 4 days ago
On 9/13/21 3:50 PM, Peter Maydell wrote:
> On Mon, 13 Sept 2021 at 14:10, <marcandre.lureau@redhat.com> wrote:
>>
>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>
>> I was looking for such documentation, but couldn't find it. Add it to
>> the build-platform.rst document.
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>>  docs/about/build-platforms.rst | 28 ++++++++++++++++++++++++++++
>>  meson.build                    |  2 +-
>>  2 files changed, 29 insertions(+), 1 deletion(-)
>>
>> diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst
>> index 692323609e..518a19aff7 100644
>> --- a/docs/about/build-platforms.rst
>> +++ b/docs/about/build-platforms.rst
>> @@ -29,6 +29,34 @@ The `Repology`_ site is a useful resource to identify
>>  currently shipped versions of software in various operating systems,
>>  though it does not cover all distros listed below.
>>
>> +Supported host architectures
>> +----------------------------
>> +
>> +Those hosts have a native TCG backend and are regularly tested:
>> +
>> +  .. list-table::
>> +   :header-rows: 1
>> +
>> +   * - CPU Architecture
>> +     - Accelerators
>> +   * - Arm
>> +     - kvm (64 bit only), xen
>> +   * - MIPS
>> +     - kvm
>> +   * - PPC
>> +     - kvm
>> +   * - RISC-V
>> +     -
>> +   * - s390x
>> +     - kvm
>> +   * - SPARC
>> +     -
>> +   * - x86
>> +     - kvm, xen, hax, hvf (64 bit only), nvmm, whpx (64 bit only)
> 
> I still wonder if this would be clearer if we listed 'tcg' as
> an accelerator like all the others, rather than describing it as
> a kind of special case in the text above the table. After all, you
> can select it with '-accel tcg' the same as any other.
> 
> I think the information in the table is correct now.

What is TCI at this point?

> Sort the list of accelerators alphabetically ?
> 
>> +
>> +Other architectures are not actively maintained. They may be removed in future
>> +releases.

What are the other archs which could be removed?

FYI QEMU is still being built by Debian on alpha/hppa/ia64:

https://buildd.debian.org/status/package.php?p=qemu&suite=sid

Recent failures comes from:

../meson.build:1218:6: ERROR: Problem encountered: virtio-9p (virtfs)
needs system emulation support

Which is a bug but I hadn't time to look at it.

Re: [PATCH v2] docs: add supported host CPU architectures section

Posted by Peter Maydell 1 week, 4 days ago
On Mon, 13 Sept 2021 at 16:22, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On 9/13/21 3:50 PM, Peter Maydell wrote:
> > On Mon, 13 Sept 2021 at 14:10, <marcandre.lureau@redhat.com> wrote:


> > I still wonder if this would be clearer if we listed 'tcg' as
> > an accelerator like all the others, rather than describing it as
> > a kind of special case in the text above the table. After all, you
> > can select it with '-accel tcg' the same as any other.
> >
> > I think the information in the table is correct now.
>
> What is TCI at this point?

It's a different backend to TCG. (Almost always you do not want it.)
It's not a separate accelerator type.

> >> +Other architectures are not actively maintained. They may be removed in future
> >> +releases.
>
> What are the other archs which could be removed?

It's not so much that we have explicit code to handle any other host
architectures which we might remove. It's more that we do not specifically
say "we don't know what this host arch is and we don't have a TCG backend
for it, sorry" for unknown host architectures; instead we suggest that
the user might try using TCI.

In future in theory we might:
 * just say "unsupported" there instead (making unknown
   host CPU arch a fatal error, in the same way unknown host OS
   is a fatal error)
 * drop TCI entirely

I think both of those would be controversial (but I'm not against
them myself ;-)).

We could perhaps rephrase the sentence to something like:

  Other host architectures are not supported. It is possible to
  build QEMU on an unsupported host architecture using the configure
  ``--enable-tcg-interpreter`` option to enable the experimental
  TCI support, but note that this is very slow and is not recommended.

If we want to actually deprecate building on non-supported host
architectures we should say that via the usual deprecation process.

-- PMM

Re: [PATCH v2] docs: add supported host CPU architectures section

Posted by Philippe Mathieu-Daudé 1 week, 4 days ago
On 9/13/21 5:56 PM, Peter Maydell wrote:
> On Mon, 13 Sept 2021 at 16:22, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>> On 9/13/21 3:50 PM, Peter Maydell wrote:
>>> On Mon, 13 Sept 2021 at 14:10, <marcandre.lureau@redhat.com> wrote:
>>> I still wonder if this would be clearer if we listed 'tcg' as
>>> an accelerator like all the others, rather than describing it as
>>> a kind of special case in the text above the table. After all, you
>>> can select it with '-accel tcg' the same as any other.
>>>
>>> I think the information in the table is correct now.
>>
>> What is TCI at this point?
> 
> It's a different backend to TCG. (Almost always you do not want it.)

It might become a TCG sub-type.

> It's not a separate accelerator type.

Indeed.

>>>> +Other architectures are not actively maintained. They may be removed in future
>>>> +releases.
>>
>> What are the other archs which could be removed?
> 
> It's not so much that we have explicit code to handle any other host
> architectures which we might remove. It's more that we do not specifically
> say "we don't know what this host arch is and we don't have a TCG backend
> for it, sorry" for unknown host architectures; instead we suggest that
> the user might try using TCI.
> 
> In future in theory we might:
>  * just say "unsupported" there instead (making unknown
>    host CPU arch a fatal error, in the same way unknown host OS
>    is a fatal error)
>  * drop TCI entirely
> 
> I think both of those would be controversial (but I'm not against
> them myself ;-)).

So we had this discussion 5/6 months ago, and 2 users said they use
it for research, so Richard did a tremendous work to update it to
remove any limitation on TCG, which mostly ended in a rewrite:

$ for i in tcg/tci*;do git blame $i;done|cut -c25-47|sort|uniq -c|sort -nr
   1106 Richard Henderson
    274 Stefan Weil
      6 Daniele Buono
      4 Pranith Kumar
      4 Emilio G. Cota
      2 Paolo Bonzini
      2 Aurelien Jarno
      1 Philippe Mathieu-Daudé
      1 Peter Maydell

Then it took me various week-ends to review/test it. At this point
I consider it stable and removing it isn't justified anymore.

> We could perhaps rephrase the sentence to something like:
> 
>   Other host architectures are not supported. It is possible to
>   build QEMU on an unsupported host architecture using the configure
>   ``--enable-tcg-interpreter`` option to enable the experimental
>   TCI support, but note that this is very slow and is not recommended.

Sounds good.

> If we want to actually deprecate building on non-supported host
> architectures we should say that via the usual deprecation process.

Agreed.

Regards,

Phil.