hw/acpi: Update ACPI `_STA` method with QOM vCPU ACPI Hotplug states
authorSalil Mehta <salil.mehta@huawei.com>
Sun, 3 Nov 2024 10:24:17 +0000 (10:24 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 4 Nov 2024 21:03:25 +0000 (16:03 -0500)
commitbf1ecc8dad6061914730a2a2d57af6b37c3a4f8d
tree1e3b4f210a14b403f585296a3f13ded454057536
parente98411c2cbbac24ff49992a09226a2662726a031
hw/acpi: Update ACPI `_STA` method with QOM vCPU ACPI Hotplug states

Reflect the QOM vCPUs ACPI CPU hotplug states in the `_STA.Present` and
and `_STA.Enabled` bits when the guest kernel evaluates the ACPI
`_STA` method during initialization, as well as when vCPUs are
hot-plugged or hot-unplugged. If the CPU is present then the its
`enabled` status can be fetched using architecture-specific code [1].

Reference:
[1] Example implementation of architecture-specific hook to fetch CPU
    `enabled status
Link: https://github.com/salil-mehta/qemu/commit/c0b416b11e5af6505e558866f0eb6c9f3709173e
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Message-Id: <20241103102419.202225-4-salil.mehta@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/cpu.c
include/hw/core/cpu.h