* [PATCH 0/2] isapc: warn rather than reject modern x86 CPU models
@ 2025-10-23 14:28 Mark Cave-Ayland
2025-10-23 14:28 ` [PATCH 1/2] hw/i386/isapc.c: " Mark Cave-Ayland
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Mark Cave-Ayland @ 2025-10-23 14:28 UTC (permalink / raw)
To: imammedo, mst, marcel.apfelbaum, pbonzini, richard.henderson,
eduardo, qemu-devel
Following on from the original discussion and series which has been merged for
the 10.2 release, there are still some concerns as to whether this will have
an impact on users.
Rather than outright reject modern x86 CPU models for the isapc machine, take a
gentler approach by starting the normal deprecation process as suggested by
Igor.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Mark Cave-Ayland (2):
hw/i386/isapc.c: warn rather than reject modern x86 CPU models
docs/about/deprecated.rst: document isapc deprecation for modern x86
CPU models
docs/about/deprecated.rst | 14 +++++++++++
hw/i386/isapc.c | 53 ++++++++++++++++-----------------------
2 files changed, 35 insertions(+), 32 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] hw/i386/isapc.c: warn rather than reject modern x86 CPU models
2025-10-23 14:28 [PATCH 0/2] isapc: warn rather than reject modern x86 CPU models Mark Cave-Ayland
@ 2025-10-23 14:28 ` Mark Cave-Ayland
2025-10-23 14:36 ` Philippe Mathieu-Daudé
2025-10-23 14:28 ` [PATCH 2/2] docs/about/deprecated.rst: document isapc deprecation for " Mark Cave-Ayland
2025-10-24 7:15 ` [PATCH 0/2] isapc: warn rather than reject " Paolo Bonzini
2 siblings, 1 reply; 6+ messages in thread
From: Mark Cave-Ayland @ 2025-10-23 14:28 UTC (permalink / raw)
To: imammedo, mst, marcel.apfelbaum, pbonzini, richard.henderson,
eduardo, qemu-devel
Commit e1e2909f8e ("hw/i386/pc_piix.c: restrict isapc machine to 32-bit CPUs")
restricted the isapc machine to 32-bit CPUs, but subsequent concern has been
expressed as to the effect this could have on users.
The outcome of the latest discussion is that we should exercise more caution
and follow the official deprecation route, so instead of rejecting modern x86
CPUs issue a deprecation warning but allow the user to continue.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
---
hw/i386/isapc.c | 53 ++++++++++++++++++++-----------------------------
1 file changed, 21 insertions(+), 32 deletions(-)
diff --git a/hw/i386/isapc.c b/hw/i386/isapc.c
index 44f4a44672..1ba9ae22cc 100644
--- a/hw/i386/isapc.c
+++ b/hw/i386/isapc.c
@@ -41,29 +41,31 @@ static void pc_init_isa(MachineState *machine)
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
int i;
+ bool valid_cpu_type = false;
+ static const char * const valid_cpu_types[] = {
+ X86_CPU_TYPE_NAME("486"),
+ X86_CPU_TYPE_NAME("athlon"),
+ X86_CPU_TYPE_NAME("kvm32"),
+ X86_CPU_TYPE_NAME("pentium"),
+ X86_CPU_TYPE_NAME("pentium2"),
+ X86_CPU_TYPE_NAME("pentium3"),
+ X86_CPU_TYPE_NAME("qemu32"),
+ };
+
/*
- * There is a small chance that someone unintentionally passes "-cpu max"
- * for the isapc machine, which will provide a much more modern 32-bit
- * CPU than would be expected for an ISA-era PC. If the "max" cpu type has
- * been specified, choose the "best" 32-bit cpu possible which we consider
- * be the pentium3 (deliberately choosing an Intel CPU given that the
- * default 486 CPU for the isapc machine is also an Intel CPU).
+ * The isapc machine is supposed to represent a legacy ISA-only PC with a
+ * 32-bit processor. For historical reasons the machine can still accept
+ * almost any valid processor, but this is now deprecated in 10.2. Emit
+ * a warning if anyone tries to use a deprecated CPU.
*/
- if (!strcmp(machine->cpu_type, X86_CPU_TYPE_NAME("max"))) {
- machine->cpu_type = X86_CPU_TYPE_NAME("pentium3");
- warn_report("-cpu max is invalid for isapc machine, using pentium3");
+ for (i = 0; i < ARRAY_SIZE(valid_cpu_types); i++) {
+ if (!strcmp(machine->cpu_type, valid_cpu_types[i])) {
+ valid_cpu_type = true;
+ }
}
- /*
- * Similarly if someone unintentionally passes "-cpu host" for the isapc
- * machine then display a warning and also switch to the "best" 32-bit
- * cpu possible which we consider to be the pentium3. This is because any
- * host CPU will already be modern than this, but it also ensures any
- * newer CPU flags/features are filtered out for older guests.
- */
- if (!strcmp(machine->cpu_type, X86_CPU_TYPE_NAME("host"))) {
- machine->cpu_type = X86_CPU_TYPE_NAME("pentium3");
- warn_report("-cpu host is invalid for isapc machine, using pentium3");
+ if (!valid_cpu_type) {
+ warn_report("cpu type %s is deprecated for isapc machine", machine->cpu_type);
}
if (machine->ram_size > 3.5 * GiB) {
@@ -154,18 +156,6 @@ static void pc_init_isa(MachineState *machine)
static void isapc_machine_options(MachineClass *m)
{
- static const char * const valid_cpu_types[] = {
- X86_CPU_TYPE_NAME("486"),
- X86_CPU_TYPE_NAME("athlon"),
- X86_CPU_TYPE_NAME("kvm32"),
- X86_CPU_TYPE_NAME("pentium"),
- X86_CPU_TYPE_NAME("pentium2"),
- X86_CPU_TYPE_NAME("pentium3"),
- X86_CPU_TYPE_NAME("qemu32"),
- X86_CPU_TYPE_NAME("max"),
- X86_CPU_TYPE_NAME("host"),
- NULL
- };
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
m->desc = "ISA-only PC";
@@ -180,7 +170,6 @@ static void isapc_machine_options(MachineClass *m)
pcmc->has_reserved_memory = false;
m->default_nic = "ne2k_isa";
m->default_cpu_type = X86_CPU_TYPE_NAME("486");
- m->valid_cpu_types = valid_cpu_types;
m->no_floppy = !module_object_class_by_name(TYPE_ISA_FDC);
m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] docs/about/deprecated.rst: document isapc deprecation for modern x86 CPU models
2025-10-23 14:28 [PATCH 0/2] isapc: warn rather than reject modern x86 CPU models Mark Cave-Ayland
2025-10-23 14:28 ` [PATCH 1/2] hw/i386/isapc.c: " Mark Cave-Ayland
@ 2025-10-23 14:28 ` Mark Cave-Ayland
2025-10-23 14:36 ` Philippe Mathieu-Daudé
2025-10-24 7:15 ` [PATCH 0/2] isapc: warn rather than reject " Paolo Bonzini
2 siblings, 1 reply; 6+ messages in thread
From: Mark Cave-Ayland @ 2025-10-23 14:28 UTC (permalink / raw)
To: imammedo, mst, marcel.apfelbaum, pbonzini, richard.henderson,
eduardo, qemu-devel
Add a new paragraph in the "Backwards compatibility" section documenting that
using modern x86 CPU models with the isapc machine is deprecated, and will be
rejected in a future release.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
---
docs/about/deprecated.rst | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index dacf2882e4..020610132f 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -544,6 +544,20 @@ 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 use of modern 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.
+
+If the user requests a modern x86 CPU model (i.e. not one of ``486``,
+``athlon``, ``kvm32``, ``pentium``, ``pentium2``, ``pentium3``or ``qemu32``)
+a warning will be displayed until a future QEMU version when such CPUs will
+be rejected.
+
Migration
---------
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] hw/i386/isapc.c: warn rather than reject modern x86 CPU models
2025-10-23 14:28 ` [PATCH 1/2] hw/i386/isapc.c: " Mark Cave-Ayland
@ 2025-10-23 14:36 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-10-23 14:36 UTC (permalink / raw)
To: Mark Cave-Ayland, imammedo, mst, marcel.apfelbaum, pbonzini,
richard.henderson, eduardo, qemu-devel
On 23/10/25 16:28, Mark Cave-Ayland wrote:
> Commit e1e2909f8e ("hw/i386/pc_piix.c: restrict isapc machine to 32-bit CPUs")
> restricted the isapc machine to 32-bit CPUs, but subsequent concern has been
> expressed as to the effect this could have on users.
>
> The outcome of the latest discussion is that we should exercise more caution
> and follow the official deprecation route, so instead of rejecting modern x86
> CPUs issue a deprecation warning but allow the user to continue.
>
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> ---
> hw/i386/isapc.c | 53 ++++++++++++++++++++-----------------------------
> 1 file changed, 21 insertions(+), 32 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] docs/about/deprecated.rst: document isapc deprecation for modern x86 CPU models
2025-10-23 14:28 ` [PATCH 2/2] docs/about/deprecated.rst: document isapc deprecation for " Mark Cave-Ayland
@ 2025-10-23 14:36 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-10-23 14:36 UTC (permalink / raw)
To: Mark Cave-Ayland, imammedo, mst, marcel.apfelbaum, pbonzini,
richard.henderson, eduardo, qemu-devel
On 23/10/25 16:28, Mark Cave-Ayland wrote:
> Add a new paragraph in the "Backwards compatibility" section documenting that
> using modern x86 CPU models with the isapc machine is deprecated, and will be
> rejected in a future release.
>
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> ---
> docs/about/deprecated.rst | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] isapc: warn rather than reject modern x86 CPU models
2025-10-23 14:28 [PATCH 0/2] isapc: warn rather than reject modern x86 CPU models Mark Cave-Ayland
2025-10-23 14:28 ` [PATCH 1/2] hw/i386/isapc.c: " Mark Cave-Ayland
2025-10-23 14:28 ` [PATCH 2/2] docs/about/deprecated.rst: document isapc deprecation for " Mark Cave-Ayland
@ 2025-10-24 7:15 ` Paolo Bonzini
2 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2025-10-24 7:15 UTC (permalink / raw)
To: Mark Cave-Ayland
Cc: imammedo, mst, marcel.apfelbaum, pbonzini, richard.henderson,
eduardo, qemu-devel
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-10-24 7:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-23 14:28 [PATCH 0/2] isapc: warn rather than reject modern x86 CPU models Mark Cave-Ayland
2025-10-23 14:28 ` [PATCH 1/2] hw/i386/isapc.c: " Mark Cave-Ayland
2025-10-23 14:36 ` Philippe Mathieu-Daudé
2025-10-23 14:28 ` [PATCH 2/2] docs/about/deprecated.rst: document isapc deprecation for " Mark Cave-Ayland
2025-10-23 14:36 ` Philippe Mathieu-Daudé
2025-10-24 7:15 ` [PATCH 0/2] isapc: warn rather than reject " Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).