[PATCH v2 2/2] docs/about/deprecated.rst: document new restrictions for isapc CPU models

Mark Cave-Ayland posted 2 patches 2 days, 23 hours ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
[PATCH v2 2/2] docs/about/deprecated.rst: document new restrictions for isapc CPU models
Posted by Mark Cave-Ayland 2 days, 23 hours ago
Add a new paragraph in the "Backwards compatibility" section documenting that
the isapc machine is now restricted to 32-bit x86 CPUs, and -cpu host and
-cpu max are no longer supported.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
---
 docs/about/deprecated.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index aa300bbd50..4c7000650d 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -514,6 +514,19 @@ available firmwares that are using the current (wrong) name.  The
 property is kept as is in 9.1, together with "riscv,delegation", to
 give more time for firmware developers to change their code.
 
+x86 "isapc" board restricted to 32-bit x86 CPUs (since 10.2)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The "isapc" board represents a historical x86 ISA PC and is intended for
+older 32-bit x86 CPU models, defaulting to a 486 CPU model.  Previously it
+was possible (but non-sensical) to specify a more modern x86 CPU, including
+``-cpu host`` or ``-cpu max`` even if the features were incompatible with many
+of the intended guest OSs.
+
+Now the "isapc" board contains an explicit list of supported 32-bit x86 CPU
+models. If the user requests an unsupported CPU model then an error message is
+returned indicating the available CPU models.
+
 Migration
 ---------
 
-- 
2.43.0
Re: [PATCH v2 2/2] docs/about/deprecated.rst: document new restrictions for isapc CPU models
Posted by Peter Maydell 2 days, 3 hours ago
On Thu, 25 Sept 2025 at 17:07, Mark Cave-Ayland
<mark.caveayland@nutanix.com> wrote:
>
> Add a new paragraph in the "Backwards compatibility" section documenting that
> the isapc machine is now restricted to 32-bit x86 CPUs, and -cpu host and
> -cpu max are no longer supported.
>
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> ---
>  docs/about/deprecated.rst | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index aa300bbd50..4c7000650d 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -514,6 +514,19 @@ available firmwares that are using the current (wrong) name.  The
>  property is kept as is in 9.1, together with "riscv,delegation", to
>  give more time for firmware developers to change their code.
>
> +x86 "isapc" board restricted to 32-bit x86 CPUs (since 10.2)
> +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> +
> +The "isapc" board represents a historical x86 ISA PC and is intended for
> +older 32-bit x86 CPU models, defaulting to a 486 CPU model.  Previously it
> +was possible (but non-sensical) to specify a more modern x86 CPU, including
> +``-cpu host`` or ``-cpu max`` even if the features were incompatible with many
> +of the intended guest OSs.
> +
> +Now the "isapc" board contains an explicit list of supported 32-bit x86 CPU
> +models. If the user requests an unsupported CPU model then an error message is
> +returned indicating the available CPU models.

This should go in "removed.rst", I think. "deprecated.rst" is for
things that still work today (perhaps with a warning) but will stop
working in a future QEMU release, not for things that we have already
caused to stop working. (And we should only go directly to
'removed' for features that we are sure nobody's using, but
I assume we've already had that discussion for the code change.)

thanks
-- PMM
Re: [PATCH v2 2/2] docs/about/deprecated.rst: document new restrictions for isapc CPU models
Posted by Mark Cave-Ayland 2 days, 3 hours ago
On 26/09/2025 13:05, Peter Maydell wrote:

> On Thu, 25 Sept 2025 at 17:07, Mark Cave-Ayland
> <mark.caveayland@nutanix.com> wrote:
>>
>> Add a new paragraph in the "Backwards compatibility" section documenting that
>> the isapc machine is now restricted to 32-bit x86 CPUs, and -cpu host and
>> -cpu max are no longer supported.
>>
>> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
>> ---
>>   docs/about/deprecated.rst | 13 +++++++++++++
>>   1 file changed, 13 insertions(+)
>>
>> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
>> index aa300bbd50..4c7000650d 100644
>> --- a/docs/about/deprecated.rst
>> +++ b/docs/about/deprecated.rst
>> @@ -514,6 +514,19 @@ available firmwares that are using the current (wrong) name.  The
>>   property is kept as is in 9.1, together with "riscv,delegation", to
>>   give more time for firmware developers to change their code.
>>
>> +x86 "isapc" board restricted to 32-bit x86 CPUs (since 10.2)
>> +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
>> +
>> +The "isapc" board represents a historical x86 ISA PC and is intended for
>> +older 32-bit x86 CPU models, defaulting to a 486 CPU model.  Previously it
>> +was possible (but non-sensical) to specify a more modern x86 CPU, including
>> +``-cpu host`` or ``-cpu max`` even if the features were incompatible with many
>> +of the intended guest OSs.
>> +
>> +Now the "isapc" board contains an explicit list of supported 32-bit x86 CPU
>> +models. If the user requests an unsupported CPU model then an error message is
>> +returned indicating the available CPU models.
> 
> This should go in "removed.rst", I think. "deprecated.rst" is for
> things that still work today (perhaps with a warning) but will stop
> working in a future QEMU release, not for things that we have already
> caused to stop working. (And we should only go directly to
> 'removed' for features that we are sure nobody's using, but
> I assume we've already had that discussion for the code change.)

It's an interesting one because rather than removing something, we're 
adding a validation check to prevent the user from doing something that 
is nonsensical, i.e. using a modern CPU on a board/OSs that would never 
happen in real life. Given that just about everyone other than hobbyists 
is using the pc/q35 machines on x86, the target audience for isapc is 
comparatively small.

There was some concern that libvirt could generate -cpu host/-cpu max 
for isapc on the command line which is why I added the original 
workaround, but then Igor intervened as maintainer and requested this to 
be removed and enforced via valid_cpu_types instead.

Where do you think would be a suitable place in removed.rst? Maybe the 
"System emulator machines" section?


ATB,

Mark.
Re: [PATCH v2 2/2] docs/about/deprecated.rst: document new restrictions for isapc CPU models
Posted by Peter Maydell 2 days, 3 hours ago
On Fri, 26 Sept 2025 at 13:28, Mark Cave-Ayland
<mark.caveayland@nutanix.com> wrote:
>
> On 26/09/2025 13:05, Peter Maydell wrote:
>
> > On Thu, 25 Sept 2025 at 17:07, Mark Cave-Ayland
> > <mark.caveayland@nutanix.com> wrote:
> >>
> >> Add a new paragraph in the "Backwards compatibility" section documenting that
> >> the isapc machine is now restricted to 32-bit x86 CPUs, and -cpu host and
> >> -cpu max are no longer supported.
> >>
> >> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> >> ---
> >>   docs/about/deprecated.rst | 13 +++++++++++++
> >>   1 file changed, 13 insertions(+)
> >>
> >> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> >> index aa300bbd50..4c7000650d 100644
> >> --- a/docs/about/deprecated.rst
> >> +++ b/docs/about/deprecated.rst
> >> @@ -514,6 +514,19 @@ available firmwares that are using the current (wrong) name.  The
> >>   property is kept as is in 9.1, together with "riscv,delegation", to
> >>   give more time for firmware developers to change their code.
> >>
> >> +x86 "isapc" board restricted to 32-bit x86 CPUs (since 10.2)
> >> +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> >> +
> >> +The "isapc" board represents a historical x86 ISA PC and is intended for
> >> +older 32-bit x86 CPU models, defaulting to a 486 CPU model.  Previously it
> >> +was possible (but non-sensical) to specify a more modern x86 CPU, including
> >> +``-cpu host`` or ``-cpu max`` even if the features were incompatible with many
> >> +of the intended guest OSs.
> >> +
> >> +Now the "isapc" board contains an explicit list of supported 32-bit x86 CPU
> >> +models. If the user requests an unsupported CPU model then an error message is
> >> +returned indicating the available CPU models.
> >
> > This should go in "removed.rst", I think. "deprecated.rst" is for
> > things that still work today (perhaps with a warning) but will stop
> > working in a future QEMU release, not for things that we have already
> > caused to stop working. (And we should only go directly to
> > 'removed' for features that we are sure nobody's using, but
> > I assume we've already had that discussion for the code change.)
>
> It's an interesting one because rather than removing something, we're
> adding a validation check to prevent the user from doing something that
> is nonsensical, i.e. using a modern CPU on a board/OSs that would never
> happen in real life. Given that just about everyone other than hobbyists
> is using the pc/q35 machines on x86, the target audience for isapc is
> comparatively small.
>
> There was some concern that libvirt could generate -cpu host/-cpu max
> for isapc on the command line which is why I added the original
> workaround, but then Igor intervened as maintainer and requested this to
> be removed and enforced via valid_cpu_types instead.
>
> Where do you think would be a suitable place in removed.rst? Maybe the
> "System emulator machines" section?

That would be fine. In general I think deprecated.rst and
removed.rst are supposed to have the same structure of sections,
so that when we take something from "deprecated, might warn"
to "stops working entirely" we move that paragraph from wherever
it was in deprecated.rst to the equivalent section in
removed.rst.

-- PMM
Re: [PATCH v2 2/2] docs/about/deprecated.rst: document new restrictions for isapc CPU models
Posted by Markus Armbruster 2 days, 4 hours ago
Mark Cave-Ayland <mark.caveayland@nutanix.com> writes:

> Add a new paragraph in the "Backwards compatibility" section documenting that
> the isapc machine is now restricted to 32-bit x86 CPUs, and -cpu host and
> -cpu max are no longer supported.
>
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> ---
>  docs/about/deprecated.rst | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index aa300bbd50..4c7000650d 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -514,6 +514,19 @@ available firmwares that are using the current (wrong) name.  The
>  property is kept as is in 9.1, together with "riscv,delegation", to
>  give more time for firmware developers to change their code.
>  
> +x86 "isapc" board restricted to 32-bit x86 CPUs (since 10.2)
> +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> +
> +The "isapc" board represents a historical x86 ISA PC and is intended for
> +older 32-bit x86 CPU models, defaulting to a 486 CPU model.  Previously it
> +was possible (but non-sensical) to specify a more modern x86 CPU, including
> +``-cpu host`` or ``-cpu max`` even if the features were incompatible with many
> +of the intended guest OSs.
> +
> +Now the "isapc" board contains an explicit list of supported 32-bit x86 CPU
> +models. If the user requests an unsupported CPU model then an error message is
> +returned indicating the available CPU models.
> +
>  Migration
>  ---------

I couldn't see how this corresponds to PATCH 1 until I realized it
documents recent commit e1e2909f8e7 modified by PATCH 1.

A hint in the commit message could've saved me a few minutes :)

Reviewed-by: Markus Armbruster <armbru@redhat.com>