[PATCH v5 06/28] docs/specs/acpi_cpu_hotplug: Remove legacy cpu hotplug descriptions

Zhao Liu posted 28 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH v5 06/28] docs/specs/acpi_cpu_hotplug: Remove legacy cpu hotplug descriptions
Posted by Zhao Liu 2 months, 1 week ago
Legacy cpu hotplug has been removed totally and machines start with
modern cpu hotplug interface directly.

Therefore, update the documentation to describe current QEMU cpu hotplug
logic.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
Changes since v4:
 * New patch.
---
 docs/specs/acpi_cpu_hotplug.rst | 28 +++-------------------------
 1 file changed, 3 insertions(+), 25 deletions(-)

diff --git a/docs/specs/acpi_cpu_hotplug.rst b/docs/specs/acpi_cpu_hotplug.rst
index 351057c96761..f49678100044 100644
--- a/docs/specs/acpi_cpu_hotplug.rst
+++ b/docs/specs/acpi_cpu_hotplug.rst
@@ -8,22 +8,6 @@ ACPI BIOS GPE.2 handler is dedicated for notifying OS about CPU hot-add
 and hot-remove events.
 
 
-Legacy ACPI CPU hotplug interface registers
--------------------------------------------
-
-CPU present bitmap for:
-
-- ICH9-LPC (IO port 0x0cd8-0xcf7, 1-byte access)
-- PIIX-PM  (IO port 0xaf00-0xaf1f, 1-byte access)
-- One bit per CPU. Bit position reflects corresponding CPU APIC ID. Read-only.
-- The first DWORD in bitmap is used in write mode to switch from legacy
-  to modern CPU hotplug interface, write 0 into it to do switch.
-
-QEMU sets corresponding CPU bit on hot-add event and issues SCI
-with GPE.2 event set. CPU present map is read by ACPI BIOS GPE.2 handler
-to notify OS about CPU hot-add events. CPU hot-remove isn't supported.
-
-
 Modern ACPI CPU hotplug interface registers
 -------------------------------------------
 
@@ -189,20 +173,14 @@ Typical usecases
 (x86) Detecting and enabling modern CPU hotplug interface
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-QEMU starts with legacy CPU hotplug interface enabled. Detecting and
-switching to modern interface is based on the 2 legacy CPU hotplug features:
-
-#. Writes into CPU bitmap are ignored.
-#. CPU bitmap always has bit #0 set, corresponding to boot CPU.
-
-Use following steps to detect and enable modern CPU hotplug interface:
+QEMU starts with modern CPU hotplug interface enabled. Use following steps to
+detect modern CPU hotplug interface:
 
-#. Store 0x0 to the 'CPU selector' register, attempting to switch to modern mode
 #. Store 0x0 to the 'CPU selector' register, to ensure valid selector value
 #. Store 0x0 to the 'Command field' register
 #. Read the 'Command data 2' register.
    If read value is 0x0, the modern interface is enabled.
-   Otherwise legacy or no CPU hotplug interface available
+   Otherwise no CPU hotplug interface available
 
 Get a cpu with pending event
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- 
2.34.1
Re: [PATCH v5 06/28] docs/specs/acpi_cpu_hotplug: Remove legacy cpu hotplug descriptions
Posted by Igor Mammedov 1 month, 3 weeks ago
On Wed,  3 Dec 2025 00:28:13 +0800
Zhao Liu <zhao1.liu@intel.com> wrote:

> Legacy cpu hotplug has been removed totally and machines start with
> modern cpu hotplug interface directly.
> 
> Therefore, update the documentation to describe current QEMU cpu hotplug
> logic.
> 
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
> Changes since v4:
>  * New patch.
> ---
>  docs/specs/acpi_cpu_hotplug.rst | 28 +++-------------------------
>  1 file changed, 3 insertions(+), 25 deletions(-)
> 
> diff --git a/docs/specs/acpi_cpu_hotplug.rst b/docs/specs/acpi_cpu_hotplug.rst
> index 351057c96761..f49678100044 100644
> --- a/docs/specs/acpi_cpu_hotplug.rst
> +++ b/docs/specs/acpi_cpu_hotplug.rst
> @@ -8,22 +8,6 @@ ACPI BIOS GPE.2 handler is dedicated for notifying OS about CPU hot-add
>  and hot-remove events.
>  
>  
> -Legacy ACPI CPU hotplug interface registers
> --------------------------------------------
> -
> -CPU present bitmap for:
> -
> -- ICH9-LPC (IO port 0x0cd8-0xcf7, 1-byte access)
> -- PIIX-PM  (IO port 0xaf00-0xaf1f, 1-byte access)
> -- One bit per CPU. Bit position reflects corresponding CPU APIC ID. Read-only.
> -- The first DWORD in bitmap is used in write mode to switch from legacy
> -  to modern CPU hotplug interface, write 0 into it to do switch.
> -
> -QEMU sets corresponding CPU bit on hot-add event and issues SCI
> -with GPE.2 event set. CPU present map is read by ACPI BIOS GPE.2 handler
> -to notify OS about CPU hot-add events. CPU hot-remove isn't supported.
> -
> -
>  Modern ACPI CPU hotplug interface registers
>  -------------------------------------------
>  
> @@ -189,20 +173,14 @@ Typical usecases
>  (x86) Detecting and enabling modern CPU hotplug interface
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  
> -QEMU starts with legacy CPU hotplug interface enabled. Detecting and
> -switching to modern interface is based on the 2 legacy CPU hotplug features:
> -
> -#. Writes into CPU bitmap are ignored.
> -#. CPU bitmap always has bit #0 set, corresponding to boot CPU.
> -
> -Use following steps to detect and enable modern CPU hotplug interface:
> +QEMU starts with modern CPU hotplug interface enabled. Use following steps to
> +detect modern CPU hotplug interface:
>  
> -#. Store 0x0 to the 'CPU selector' register, attempting to switch to modern mode
>  #. Store 0x0 to the 'CPU selector' register, to ensure valid selector value
>  #. Store 0x0 to the 'Command field' register
>  #. Read the 'Command data 2' register.
>     If read value is 0x0, the modern interface is enabled.
> -   Otherwise legacy or no CPU hotplug interface available
> +   Otherwise no CPU hotplug interface available
>  
>  Get a cpu with pending event
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^