Skip to content

x86: ACPI vCPU hot-add and hot-remove through SCI, GPE and AML Notify #497

Closed

Description

@lexoliu

QEMU/KVM and other ACPI hypervisors announce a vCPU hot-add or hot-remove by raising the SCI: the GPE handler (\_GPE._E02 on QEMU) runs the CPU hotplug AML (\_SB.CPUS.CSCN), which Notifys the processor device with 1 (device check, insert) or 3 (eject request). x86 parses ACPI tables only; it has no SCI route, no GPE block handling and no AML interpreter, and the acpi crate does not deliver Notify to the OS (6.1.1 panics on it; upstream main ignores it under a TODO for notify handlers).

Scope:

  • Route the FADT's SCI through the I/O APIC, enable and dispatch the GPE block, and evaluate the _Exx/_Lxx method in the acpi crate's AML interpreter.
  • Deliver Notify on a processor device to the kernel lifecycle: insert brings the processor online; eject offlines it, runs _EJ0, and reports the result through _OST.
  • Needs a Notify handler hook in the acpi crate.

Done when a guest booted with -smp 2,maxcpus=4 brings a device_added vCPU online and releases one on device_del, without a reboot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsmp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions