Skip to contentSkip to conversation

Fix broken cpu hotplug after migration

PATCH In review Igor Mammedov 2 participants 10 messages Nov 12, 2024 – Nov 27, 2024

lore
Share & tools
lore
#0 lore raw

cover Fix broken cpu hotplug after migration

1st 4 patches are fixing regression and getting rid of not needed changes that were merged out of context (ARM CPU hotplug) without proper review, by simply reverting offendining patches to keep history clean as patches not 9.2 material to begin with.

The rest [5-7/7] are not tested RFC (not for merging to 9.2) for how problem could be dealt with and could be adopted/changed for the future ARM CPU hotplug series.

Igor Mammedov (6):
Revert "hw/acpi: Update ACPI _STA method with QOM vCPU ACPI Hotplug
states"
Revert "hw/acpi: Make CPUs ACPI presence conditional during vCPU
hot-unplug"
tests/acpi: update expected blobs
acpi: cpuhp: add option to AML genrator to opt-in to always present
vCPUs
acpi: cpuhp: use 'realized' status of vCPU to check if CPU is enabled
acpi: cpuhp: preserve always present vCPUs on unplug

Salil Mehta (1):
qtest: allow ACPI DSDT Table changes

 include/hw/acpi/cpu.h                         |   5 +-
 include/hw/core/cpu.h                         |   2 -
 hw/acpi/acpi-cpu-hotplug-stub.c               |   3 +-
 hw/acpi/cpu.c                                 |  72 +++++-------------
 hw/acpi/cpu_hotplug.c                         |   2 +-
 hw/acpi/generic_event_device.c                |   2 +-
 tests/data/acpi/x86/pc/DSDT                   | Bin 8560 -> 8526 bytes
 tests/data/acpi/x86/pc/DSDT.acpierst          | Bin 8471 -> 8437 bytes
 tests/data/acpi/x86/pc/DSDT.acpihmat          | Bin 9885 -> 9851 bytes
 tests/data/acpi/x86/pc/DSDT.bridge            | Bin 15431 -> 15397 bytes
 tests/data/acpi/x86/pc/DSDT.cphp              | Bin 9024 -> 8990 bytes
 tests/data/acpi/x86/pc/DSDT.dimmpxm           | Bin 10214 -> 10180 bytes
 tests/data/acpi/x86/pc/DSDT.hpbridge          | Bin 8511 -> 8477 bytes
 tests/data/acpi/x86/pc/DSDT.hpbrroot          | Bin 5067 -> 5033 bytes
 tests/data/acpi/x86/pc/DSDT.ipmikcs           | Bin 8632 -> 8598 bytes
 tests/data/acpi/x86/pc/DSDT.memhp             | Bin 9919 -> 9885 bytes
 tests/data/acpi/x86/pc/DSDT.nohpet            | Bin 8418 -> 8384 bytes
 tests/data/acpi/x86/pc/DSDT.numamem           | Bin 8566 -> 8532 bytes
 tests/data/acpi/x86/pc/DSDT.roothp            | Bin 12353 -> 12319 bytes
 tests/data/acpi/x86/q35/DSDT                  | Bin 8389 -> 8355 bytes
 tests/data/acpi/x86/q35/DSDT.acpierst         | Bin 8406 -> 8372 bytes
 tests/data/acpi/x86/q35/DSDT.acpihmat         | Bin 9714 -> 9680 bytes
 .../acpi/x86/q35/DSDT.acpihmat-noinitiator    | Bin 8668 -> 8634 bytes
 tests/data/acpi/x86/q35/DSDT.applesmc         | Bin 8435 -> 8401 bytes
 tests/data/acpi/x86/q35/DSDT.bridge           | Bin 12002 -> 11968 bytes
 tests/data/acpi/x86/q35/DSDT.core-count       | Bin 12947 -> 12913 bytes
 tests/data/acpi/x86/q35/DSDT.core-count2      | Bin 33804 -> 33770 bytes
 tests/data/acpi/x86/q35/DSDT.cphp             | Bin 8853 -> 8819 bytes
 tests/data/acpi/x86/q35/DSDT.cxl              | Bin 13180 -> 13146 bytes
 tests/data/acpi/x86/q35/DSDT.dimmpxm          | Bin 10043 -> 10009 bytes
 tests/data/acpi/x86/q35/DSDT.ipmibt           | Bin 8464 -> 8430 bytes
 tests/data/acpi/x86/q35/DSDT.ipmismbus        | Bin 8477 -> 8443 bytes
 tests/data/acpi/x86/q35/DSDT.ivrs             | Bin 8406 -> 8372 bytes
 tests/data/acpi/x86/q35/DSDT.memhp            | Bin 9748 -> 9714 bytes
 tests/data/acpi/x86/q35/DSDT.mmio64           | Bin 9519 -> 9485 bytes
 tests/data/acpi/x86/q35/DSDT.multi-bridge     | Bin 13242 -> 13208 bytes
 tests/data/acpi/x86/q35/DSDT.noacpihp         | Bin 8269 -> 8235 bytes
 tests/data/acpi/x86/q35/DSDT.nohpet           | Bin 8247 -> 8213 bytes
 tests/data/acpi/x86/q35/DSDT.numamem          | Bin 8395 -> 8361 bytes
 tests/data/acpi/x86/q35/DSDT.pvpanic-isa      | Bin 8490 -> 8456 bytes
 tests/data/acpi/x86/q35/DSDT.thread-count     | Bin 12947 -> 12913 bytes
 tests/data/acpi/x86/q35/DSDT.thread-count2    | Bin 33804 -> 33770 bytes
 tests/data/acpi/x86/q35/DSDT.tis.tpm12        | Bin 8995 -> 8961 bytes
 tests/data/acpi/x86/q35/DSDT.tis.tpm2         | Bin 9021 -> 8987 bytes
 tests/data/acpi/x86/q35/DSDT.type4-count      | Bin 18623 -> 18589 bytes
 tests/data/acpi/x86/q35/DSDT.viot             | Bin 14646 -> 14612 bytes
 tests/data/acpi/x86/q35/DSDT.xapic            | Bin 35752 -> 35718 bytes
 47 files changed, 29 insertions(+), 57 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/7 qtest: allow ACPI DSDT Table changes

From: Salil Mehta <[email protected]>

list changed files in tests/qtest/bios-tables-test-allowed-diff.h

Message-ID: <[email protected]>

---
 tests/qtest/bios-tables-test-allowed-diff.h | 41 +++++++++++++++++++++
 1 file changed, 41 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +41 -0
index dfb8523c8b..512d40665d 100644
@@ -1 +1,42 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/x86/pc/DSDT",
+"tests/data/acpi/x86/pc/DSDT.acpierst",
+"tests/data/acpi/x86/pc/DSDT.acpihmat",
+"tests/data/acpi/x86/pc/DSDT.bridge",
+"tests/data/acpi/x86/pc/DSDT.cphp",
+"tests/data/acpi/x86/pc/DSDT.dimmpxm",
+"tests/data/acpi/x86/pc/DSDT.hpbridge",
+"tests/data/acpi/x86/pc/DSDT.hpbrroot",
+"tests/data/acpi/x86/pc/DSDT.ipmikcs",
+"tests/data/acpi/x86/pc/DSDT.memhp",
+"tests/data/acpi/x86/pc/DSDT.nohpet",
+"tests/data/acpi/x86/pc/DSDT.numamem",
+"tests/data/acpi/x86/pc/DSDT.roothp",
+"tests/data/acpi/x86/q35/DSDT",
+"tests/data/acpi/x86/q35/DSDT.acpierst",
+"tests/data/acpi/x86/q35/DSDT.acpihmat",
+"tests/data/acpi/x86/q35/DSDT.acpihmat-noinitiator",
+"tests/data/acpi/x86/q35/DSDT.applesmc",
+"tests/data/acpi/x86/q35/DSDT.bridge",
+"tests/data/acpi/x86/q35/DSDT.core-count",
+"tests/data/acpi/x86/q35/DSDT.core-count2",
+"tests/data/acpi/x86/q35/DSDT.cphp",
+"tests/data/acpi/x86/q35/DSDT.cxl",
+"tests/data/acpi/x86/q35/DSDT.dimmpxm",
+"tests/data/acpi/x86/q35/DSDT.ipmibt",
+"tests/data/acpi/x86/q35/DSDT.ipmismbus",
+"tests/data/acpi/x86/q35/DSDT.ivrs",
+"tests/data/acpi/x86/q35/DSDT.memhp",
+"tests/data/acpi/x86/q35/DSDT.mmio64",
+"tests/data/acpi/x86/q35/DSDT.multi-bridge",
+"tests/data/acpi/x86/q35/DSDT.noacpihp",
+"tests/data/acpi/x86/q35/DSDT.nohpet",
+"tests/data/acpi/x86/q35/DSDT.numamem",
+"tests/data/acpi/x86/q35/DSDT.pvpanic-isa",
+"tests/data/acpi/x86/q35/DSDT.thread-count",
+"tests/data/acpi/x86/q35/DSDT.thread-count2",
+"tests/data/acpi/x86/q35/DSDT.tis.tpm12",
+"tests/data/acpi/x86/q35/DSDT.tis.tpm2",
+"tests/data/acpi/x86/q35/DSDT.type4-count",
+"tests/data/acpi/x86/q35/DSDT.viot",
+"tests/data/acpi/x86/q35/DSDT.xapic",
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/7 Revert "hw/acpi: Update ACPI `_STA` method with QOM vCPU ACPI Hotplug states"

In reply to Igor Mammedov

This reverts commit bf1ecc8dad6061914730a2a2d57af6b37c3a4f8d which broke cpu hotplug in x86 after migration to older QEMU

Fixes bf1ecc8dad606 (w/acpi: Update ACPI `_STA` method with QOM vCPU ACPI Hotplug states)
---
 include/hw/core/cpu.h |  1 -
 hw/acpi/cpu.c         | 38 ++++----------------------------------
 2 files changed, 4 insertions(+), 35 deletions(-)
include/hw/core/cpu.h +0 -1
index db8a6fbc6e..e7de77dc6d 100644
@@ -159,7 +159,6 @@ struct CPUClass {
     void (*query_cpu_fast)(CPUState *cpu, CpuInfoFast *value);
     int64_t (*get_arch_id)(CPUState *cpu);
     bool (*cpu_persistent_status)(CPUState *cpu);
-    bool (*cpu_enabled_status)(CPUState *cpu);
     void (*set_pc)(CPUState *cpu, vaddr value);
     vaddr (*get_pc)(CPUState *cpu);
     int (*gdb_read_register)(CPUState *cpu, GByteArray *buf, int reg);
hw/acpi/cpu.c +4 -34
index 23443f09a5..9b03b4292e 100644
@@ -50,18 +50,6 @@ void acpi_cpu_ospm_status(CPUHotplugState *cpu_st, ACPIOSTInfoList ***list)
     }
 }
 
-static bool check_cpu_enabled_status(DeviceState *dev)
-{
-    CPUClass *k = dev ? CPU_GET_CLASS(dev) : NULL;
-    CPUState *cpu = CPU(dev);
-
-    if (cpu && (!k->cpu_enabled_status || k->cpu_enabled_status(cpu))) {
-        return true;
-    }
-
-    return false;
-}
-
 static uint64_t cpu_hotplug_rd(void *opaque, hwaddr addr, unsigned size)
 {
     uint64_t val = 0;
@@ -75,11 +63,10 @@ static uint64_t cpu_hotplug_rd(void *opaque, hwaddr addr, unsigned size)
     cdev = &cpu_st->devs[cpu_st->selector];
     switch (addr) {
     case ACPI_CPU_FLAGS_OFFSET_RW: /* pack and return is_* fields */
-        val |= check_cpu_enabled_status(DEVICE(cdev->cpu)) ? 1 : 0;
+        val |= cdev->cpu ? 1 : 0;
         val |= cdev->is_inserting ? 2 : 0;
         val |= cdev->is_removing  ? 4 : 0;
         val |= cdev->fw_remove  ? 16 : 0;
-        val |= cdev->cpu ? 32 : 0;
         trace_cpuhp_acpi_read_flags(cpu_st->selector, val);
         break;
     case ACPI_CPU_CMD_DATA_OFFSET_RW:
@@ -362,7 +349,6 @@ const VMStateDescription vmstate_cpu_hotplug = {
 #define CPU_REMOVE_EVENT  "CRMV"
 #define CPU_EJECT_EVENT   "CEJ0"
 #define CPU_FW_EJECT_EVENT "CEJF"
-#define CPU_PRESENT       "CPRS"
 
 void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
                     build_madt_cpu_fn build_madt_cpu, hwaddr base_addr,
@@ -423,9 +409,7 @@ void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
         aml_append(field, aml_named_field(CPU_EJECT_EVENT, 1));
         /* tell firmware to do device eject, write only */
         aml_append(field, aml_named_field(CPU_FW_EJECT_EVENT, 1));
-        /* 1 if present, read only */
-        aml_append(field, aml_named_field(CPU_PRESENT, 1));
-        aml_append(field, aml_reserved_field(2));
+        aml_append(field, aml_reserved_field(3));
         aml_append(field, aml_named_field(CPU_COMMAND, 8));
         aml_append(cpu_ctrl_dev, field);
 
@@ -455,7 +439,6 @@ void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
         Aml *ctrl_lock = aml_name("%s.%s", cphp_res_path, CPU_LOCK);
         Aml *cpu_selector = aml_name("%s.%s", cphp_res_path, CPU_SELECTOR);
         Aml *is_enabled = aml_name("%s.%s", cphp_res_path, CPU_ENABLED);
-        Aml *is_present = aml_name("%s.%s", cphp_res_path, CPU_PRESENT);
         Aml *cpu_cmd = aml_name("%s.%s", cphp_res_path, CPU_COMMAND);
         Aml *cpu_data = aml_name("%s.%s", cphp_res_path, CPU_DATA);
         Aml *ins_evt = aml_name("%s.%s", cphp_res_path, CPU_INSERT_EVENT);
@@ -484,26 +467,13 @@ void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
         {
             Aml *idx = aml_arg(0);
             Aml *sta = aml_local(0);
-            Aml *ifctx2;
-            Aml *else_ctx;
 
             aml_append(method, aml_acquire(ctrl_lock, 0xFFFF));
             aml_append(method, aml_store(idx, cpu_selector));
             aml_append(method, aml_store(zero, sta));
-            ifctx = aml_if(aml_equal(is_present, one));
+            ifctx = aml_if(aml_equal(is_enabled, one));
             {
-                ifctx2 = aml_if(aml_equal(is_enabled, one));
-                {
-                    /* cpu is present and enabled */
-                    aml_append(ifctx2, aml_store(aml_int(0xF), sta));
-                }
-                aml_append(ifctx, ifctx2);
-                else_ctx = aml_else();
-                {
-                    /* cpu is present but disabled */
-                    aml_append(else_ctx, aml_store(aml_int(0xD), sta));
-                }
-                aml_append(ifctx, else_ctx);
+                aml_append(ifctx, aml_store(aml_int(0xF), sta));
             }
             aml_append(method, ifctx);
             aml_append(method, aml_release(ctrl_lock));
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/7 Revert "hw/acpi: Make CPUs ACPI `presence` conditional during vCPU hot-unplug"

In reply to Igor Mammedov

This reverts commit 2d6cfbaf174b91dfa9a50065f7494634afb39c23.

The patch is supposed to be part of ARM CPU hotplug series and has not value on its own without it. The series however is still in RFC stage and outside of scope 9.2 release.

On top of that it introduces not needed callback that pokes directly into CPU state without any need for that. Instead properties and AML generator option should be used to configure static platform depended vCPU presence state.

Drop the patch so that corrected version could be posted along with ARM CPU hotplug series and properly reviewed in relevant context. That also helps us to keep history cleaner with new patch being against original code vs a string of fixups on top of current mess.

---
 include/hw/core/cpu.h |  1 -
 hw/acpi/cpu.c         | 15 +--------------
 2 files changed, 1 insertion(+), 15 deletions(-)
include/hw/core/cpu.h +0 -1
index e7de77dc6d..c3ca0babcb 100644
@@ -158,7 +158,6 @@ struct CPUClass {
     void (*dump_state)(CPUState *cpu, FILE *, int flags);
     void (*query_cpu_fast)(CPUState *cpu, CpuInfoFast *value);
     int64_t (*get_arch_id)(CPUState *cpu);
-    bool (*cpu_persistent_status)(CPUState *cpu);
     void (*set_pc)(CPUState *cpu, vaddr value);
     vaddr (*get_pc)(CPUState *cpu);
     int (*gdb_read_register)(CPUState *cpu, GByteArray *buf, int reg);
hw/acpi/cpu.c +1 -14
index 9b03b4292e..5cb60ca8bc 100644
@@ -233,17 +233,6 @@ void cpu_hotplug_hw_init(MemoryRegion *as, Object *owner,
     memory_region_add_subregion(as, base_addr, &state->ctrl_reg);
 }
 
-static bool should_remain_acpi_present(DeviceState *dev)
-{
-    CPUClass *k = CPU_GET_CLASS(dev);
-    /*
-     * A system may contain CPUs that are always present on one die, NUMA node,
-     * or socket, yet may be non-present on another simultaneously. Check from
-     * architecture specific code.
-     */
-    return k->cpu_persistent_status && k->cpu_persistent_status(CPU(dev));
-}
-
 static AcpiCpuStatus *get_cpu_status(CPUHotplugState *cpu_st, DeviceState *dev)
 {
     CPUClass *k = CPU_GET_CLASS(dev);
@@ -300,9 +289,7 @@ void acpi_cpu_unplug_cb(CPUHotplugState *cpu_st,
         return;
     }
 
-    if (!should_remain_acpi_present(dev)) {
-        cdev->cpu = NULL;
-    }
+    cdev->cpu = NULL;
 }
 
 static const VMStateDescription vmstate_cpuhp_sts = {
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/7 tests/acpi: update expected blobs

In reply to Igor Mammedov

Expected AML return to the state before
bf1ecc8dad606 (w/acpi: Update ACPI _STA method with QOM vCPU ACPI Hotplug states)
droping not needed CPRS and _STA logic that broke cpu hotplug

@@ -2887,7 +2887,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001)
CRMV, 1,
CEJ0, 1,
CEJF, 1,
- CPRS, 1,
Offset (0x05),
CCMD, 8
}
@@ -2922,16 +2921,9 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001)
Acquire (\_SB.PCI0.PRES.CPLK, 0xFFFF) \_SB.PCI0.PRES.CSEL = Arg0 Local0 = Zero
- If ((\_SB.PCI0.PRES.CPRS == One))
+ If ((\_SB.PCI0.PRES.CPEN == One))
{
- If ((\_SB.PCI0.PRES.CPEN == One))
- {
- Local0 = 0x0F
- }
- Else
- {
- Local0 = 0x0D
- }
+ Local0 = 0x0F
}

---
 tests/qtest/bios-tables-test-allowed-diff.h   |  41 ------------------
 tests/data/acpi/x86/pc/DSDT                   | Bin 8560 -> 8526 bytes
 tests/data/acpi/x86/pc/DSDT.acpierst          | Bin 8471 -> 8437 bytes
 tests/data/acpi/x86/pc/DSDT.acpihmat          | Bin 9885 -> 9851 bytes
 tests/data/acpi/x86/pc/DSDT.bridge            | Bin 15431 -> 15397 bytes
 tests/data/acpi/x86/pc/DSDT.cphp              | Bin 9024 -> 8990 bytes
 tests/data/acpi/x86/pc/DSDT.dimmpxm           | Bin 10214 -> 10180 bytes
 tests/data/acpi/x86/pc/DSDT.hpbridge          | Bin 8511 -> 8477 bytes
 tests/data/acpi/x86/pc/DSDT.hpbrroot          | Bin 5067 -> 5033 bytes
 tests/data/acpi/x86/pc/DSDT.ipmikcs           | Bin 8632 -> 8598 bytes
 tests/data/acpi/x86/pc/DSDT.memhp             | Bin 9919 -> 9885 bytes
 tests/data/acpi/x86/pc/DSDT.nohpet            | Bin 8418 -> 8384 bytes
 tests/data/acpi/x86/pc/DSDT.numamem           | Bin 8566 -> 8532 bytes
 tests/data/acpi/x86/pc/DSDT.roothp            | Bin 12353 -> 12319 bytes
 tests/data/acpi/x86/q35/DSDT                  | Bin 8389 -> 8355 bytes
 tests/data/acpi/x86/q35/DSDT.acpierst         | Bin 8406 -> 8372 bytes
 tests/data/acpi/x86/q35/DSDT.acpihmat         | Bin 9714 -> 9680 bytes
 .../acpi/x86/q35/DSDT.acpihmat-noinitiator    | Bin 8668 -> 8634 bytes
 tests/data/acpi/x86/q35/DSDT.applesmc         | Bin 8435 -> 8401 bytes
 tests/data/acpi/x86/q35/DSDT.bridge           | Bin 12002 -> 11968 bytes
 tests/data/acpi/x86/q35/DSDT.core-count       | Bin 12947 -> 12913 bytes
 tests/data/acpi/x86/q35/DSDT.core-count2      | Bin 33804 -> 33770 bytes
 tests/data/acpi/x86/q35/DSDT.cphp             | Bin 8853 -> 8819 bytes
 tests/data/acpi/x86/q35/DSDT.cxl              | Bin 13180 -> 13146 bytes
 tests/data/acpi/x86/q35/DSDT.dimmpxm          | Bin 10043 -> 10009 bytes
 tests/data/acpi/x86/q35/DSDT.ipmibt           | Bin 8464 -> 8430 bytes
 tests/data/acpi/x86/q35/DSDT.ipmismbus        | Bin 8477 -> 8443 bytes
 tests/data/acpi/x86/q35/DSDT.ivrs             | Bin 8406 -> 8372 bytes
 tests/data/acpi/x86/q35/DSDT.memhp            | Bin 9748 -> 9714 bytes
 tests/data/acpi/x86/q35/DSDT.mmio64           | Bin 9519 -> 9485 bytes
 tests/data/acpi/x86/q35/DSDT.multi-bridge     | Bin 13242 -> 13208 bytes
 tests/data/acpi/x86/q35/DSDT.noacpihp         | Bin 8269 -> 8235 bytes
 tests/data/acpi/x86/q35/DSDT.nohpet           | Bin 8247 -> 8213 bytes
 tests/data/acpi/x86/q35/DSDT.numamem          | Bin 8395 -> 8361 bytes
 tests/data/acpi/x86/q35/DSDT.pvpanic-isa      | Bin 8490 -> 8456 bytes
 tests/data/acpi/x86/q35/DSDT.thread-count     | Bin 12947 -> 12913 bytes
 tests/data/acpi/x86/q35/DSDT.thread-count2    | Bin 33804 -> 33770 bytes
 tests/data/acpi/x86/q35/DSDT.tis.tpm12        | Bin 8995 -> 8961 bytes
 tests/data/acpi/x86/q35/DSDT.tis.tpm2         | Bin 9021 -> 8987 bytes
 tests/data/acpi/x86/q35/DSDT.type4-count      | Bin 18623 -> 18589 bytes
 tests/data/acpi/x86/q35/DSDT.viot             | Bin 14646 -> 14612 bytes
 tests/data/acpi/x86/q35/DSDT.xapic            | Bin 35752 -> 35718 bytes
 42 files changed, 41 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -41
index 512d40665d..dfb8523c8b 100644
@@ -1,42 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/x86/pc/DSDT",
-"tests/data/acpi/x86/pc/DSDT.acpierst",
-"tests/data/acpi/x86/pc/DSDT.acpihmat",
-"tests/data/acpi/x86/pc/DSDT.bridge",
-"tests/data/acpi/x86/pc/DSDT.cphp",
-"tests/data/acpi/x86/pc/DSDT.dimmpxm",
-"tests/data/acpi/x86/pc/DSDT.hpbridge",
-"tests/data/acpi/x86/pc/DSDT.hpbrroot",
-"tests/data/acpi/x86/pc/DSDT.ipmikcs",
-"tests/data/acpi/x86/pc/DSDT.memhp",
-"tests/data/acpi/x86/pc/DSDT.nohpet",
-"tests/data/acpi/x86/pc/DSDT.numamem",
-"tests/data/acpi/x86/pc/DSDT.roothp",
-"tests/data/acpi/x86/q35/DSDT",
-"tests/data/acpi/x86/q35/DSDT.acpierst",
-"tests/data/acpi/x86/q35/DSDT.acpihmat",
-"tests/data/acpi/x86/q35/DSDT.acpihmat-noinitiator",
-"tests/data/acpi/x86/q35/DSDT.applesmc",
-"tests/data/acpi/x86/q35/DSDT.bridge",
-"tests/data/acpi/x86/q35/DSDT.core-count",
-"tests/data/acpi/x86/q35/DSDT.core-count2",
-"tests/data/acpi/x86/q35/DSDT.cphp",
-"tests/data/acpi/x86/q35/DSDT.cxl",
-"tests/data/acpi/x86/q35/DSDT.dimmpxm",
-"tests/data/acpi/x86/q35/DSDT.ipmibt",
-"tests/data/acpi/x86/q35/DSDT.ipmismbus",
-"tests/data/acpi/x86/q35/DSDT.ivrs",
-"tests/data/acpi/x86/q35/DSDT.memhp",
-"tests/data/acpi/x86/q35/DSDT.mmio64",
-"tests/data/acpi/x86/q35/DSDT.multi-bridge",
-"tests/data/acpi/x86/q35/DSDT.noacpihp",
-"tests/data/acpi/x86/q35/DSDT.nohpet",
-"tests/data/acpi/x86/q35/DSDT.numamem",
-"tests/data/acpi/x86/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/x86/q35/DSDT.thread-count",
-"tests/data/acpi/x86/q35/DSDT.thread-count2",
-"tests/data/acpi/x86/q35/DSDT.tis.tpm12",
-"tests/data/acpi/x86/q35/DSDT.tis.tpm2",
-"tests/data/acpi/x86/q35/DSDT.type4-count",
-"tests/data/acpi/x86/q35/DSDT.viot",
-"tests/data/acpi/x86/q35/DSDT.xapic",
tests/data/acpi/x86/pc/DSDT binary +0 -0
index f68a32e6068788c3fdfaff139206b725ba2bf1d1..8b8235fe79e2fa08a6f840c8479edb75f5a047b9 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.acpierst binary +0 -0
index 0fd79699ebbfb650a5bbe49faecbebf2fc13a86c..06829b9c6c6d726d955dc7c99bc9f42448e22aeb 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.acpihmat binary +0 -0
index a4dd09e5ef71a47c31be0d9a57e93767f5d15b3c..2fe355ebdbb858fa9247d09112e21712e3eddc45 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.bridge binary +0 -0
index 7ef58152d281c1e2c8da5b15bd30f23e61439d69..4d4067c182a6625db1e877408eb7436113884b50 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.cphp binary +0 -0
index 1079ff81c1ab05f0d5991835b3a0b014687924f4..045a52e75b7fcd4e5f840a758c548231498b96e4 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.dimmpxm binary +0 -0
index 34fe3fcad9dc245eb173ca5a9655d17f15bd42ef..205219b99d903555125c4b07fc047c42993eb338 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.hpbridge binary +0 -0
index 33c7529f5c8a6ec651f979b3cebadb18774a781f..8fa8b519ec65bd5099c45f4e1c85b11b47a23845 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.hpbrroot binary +0 -0
index 2661170c833e23ae1985d31512a81a29afc858bd..01719462a72fd6d40ce433dac601e4b94eae574c 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.ipmikcs binary +0 -0
index 688faf83cbd7395e1112ba04303d66e11934bf8d..0ca664688b16baa3a06b8440181de4f17511c6b0 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.memhp binary +0 -0
index 6ede4361f4b7bf18c496d7ca117310675126bbbf..03ff464ba4e72082fce0921815cfc09ca20b561a 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.nohpet binary +0 -0
index 9d6040733f57f243056ee8f7601af84dd3cf2fa2..b081030f0ed171e52b13e28cfdc8770a04c2806e 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.numamem binary +0 -0
index aa9986f74bbd9f20ea9c886901a34122700f33b2..2c98cafbff5db04410b35a1151eaf18723a4dad7 100644
GIT binary patch
tests/data/acpi/x86/pc/DSDT.roothp binary +0 -0
index 86c2ae11dc601008cd4dbbbd34d4e5adcb9236cd..da018dca9e3102e811107994248719ab5278c505 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT binary +0 -0
index b0bbff7686c9a56129bfa3408e62f142cc482713..fb89ae0ac6d4346e33156e9e4d3718698a0a1a8e 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.acpierst binary +0 -0
index f91cbe55fcfeea319babf7c9a0c6a6ccdc3320d1..46fd25400b7c00ee9149ddb64cb5d5bd73f6a82b 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.acpihmat binary +0 -0
index 0949fb9d67c70dc882e50501ece421114ad8080b..61c5bd52a42242e85090934e8e45bf01642609d6 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.acpihmat-noinitiator binary +0 -0
index 0fa4daa35cf95f93ba8c15f478460fe4e14e6d9e..3aaa2bbdf54a0d0cade14421e84c6ec5a42f96fa 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.applesmc binary +0 -0
index a5d032b7d96113c9393036b2ba831adb6d584142..944209adeaa5bbb722431161c404cb51b8209993 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.bridge binary +0 -0
index 3464f552974672bde25eb15f1c93c309c57ef5cb..d9938dba8fa5d405f7696c0dbdc24f3ae42ec934 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.core-count binary +0 -0
index 08f5d5f54bcb61235b98fc85bb814046dd038c13..a24b04cbdbf09383b933a42a2a15182545543a87 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.core-count2 binary +0 -0
index d29a7108f82110ce9f9b4e006501215d41c5420a..3a0cb8c581c8cc630a2ec21712b7f8b75fcad1c8 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.cphp binary +0 -0
index 7fd59bf6702c04a622f05ae356a2ea37312ab403..20955d0aa30120553da35d5a6640055d26255cf9 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.cxl binary +0 -0
index 613a40b957dab99fd97b465bd89f6afac3a5b047..3c34d4dcab16783abe65f6fa5e64eb69d40795fb 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.dimmpxm binary +0 -0
index 1db0bf454a203006f866e6752d06422ae675cbd3..228374b55bd544116e359f659e546fc66cf8a895 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.ipmibt binary +0 -0
index 25f43ae8efb55364a739e6b5e3cb4e71e61862b0..45f911ada5645f158f3d6c0c430ec1d52cadc5d8 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.ipmismbus binary +0 -0
index 32bcd25bda9e9d2775790385f8da6a11e9d5cb46..e5d6811bee1233d74236453c49060390d74d4416 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.ivrs binary +0 -0
index f91cbe55fcfeea319babf7c9a0c6a6ccdc3320d1..46fd25400b7c00ee9149ddb64cb5d5bd73f6a82b 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.memhp binary +0 -0
index be90eb71d8dda8fe54c79ffffe103986ee06ae3a..5ce081187a578ba7145a9ba20d30be36c13b7663 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.mmio64 binary +0 -0
index 01f276a6aff38a1d4f58640a9e6d120fc9a04b61..bdf36c4d575bfc4eb2eac3f00c9b7b4270f88677 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.multi-bridge binary +0 -0
index 1bd2ee8d2ebd3c9e0ed89a86478691f2e06f2590..1db43a69e4c2affd8bd678bbef4d3c228380288e 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.noacpihp binary +0 -0
index 45cc2bcffa42d73db110afd5075556dcfe5d9936..8bc16887e1c963c61aaecf71712a09c0554f6d67 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.nohpet binary +0 -0
index f110504b9c813aa07802fc17d2869596a2eeca6f..c13e45e3612646cc2e30f00b3b7e53335da816ea 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.numamem binary +0 -0
index 6090958f39875f5806e72e23f32cb4b3ae840627..ba6669437e65952f24516ded954b33fe54bdedfb 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.pvpanic-isa binary +0 -0
index 7a8e568315a43f1fa98068d8e78995c98064fb91..6ad42873e91c80cef5a42224cb4d31936dad59b4 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.thread-count binary +0 -0
index 08f5d5f54bcb61235b98fc85bb814046dd038c13..a24b04cbdbf09383b933a42a2a15182545543a87 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.thread-count2 binary +0 -0
index d29a7108f82110ce9f9b4e006501215d41c5420a..3a0cb8c581c8cc630a2ec21712b7f8b75fcad1c8 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.tis.tpm12 binary +0 -0
index 29a416f0508655d2bfde01fff4d25ad7f89581d9..e381ce4cbf2b11f56a2d0537db4d21acc97450c9 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.tis.tpm2 binary +0 -0
index 59288f02c43cf2efc1555599131fde05dbbaa1cd..a09253042ce4a715922027245de8a2ab7449c5b7 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.type4-count binary +0 -0
index eaca76e8e61eb62f75dbdf093e803eea34330deb..edc23198cdb47a981bcbc82bc8e392b815abb554 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.viot binary +0 -0
index de0942a13dc65b75e78e66ee8df904b31bf6079a..4c93dfd5c4b362714d3f9aa606a838d4625b3369 100644
GIT binary patch
tests/data/acpi/x86/q35/DSDT.xapic binary +0 -0
index 9059812b5892ba7ac5c9bd312fd9f45a4f59f105..d4acd851c62c956436a436f9fa6d08fc5f370fa7 100644
GIT binary patch
Signature · 1 line
2.43.0
#5 lore raw

RFC 5/7 DO NOT MERGE: acpi: cpuhp: add option to AML genrator to opt-in to always present vCPUs

In reply to Igor Mammedov

Looking at [1] what 'present' bit would do, it's no necessary as it's statically defined for VM instance. So instead of introducing new ABI in cpuhp flags register, add CPUHotplugFeatures::always_present_cpus config option, that when set change _STA default return value to always present but not enabled. And the interpose 'enabled' check on top of it, which would set 'enabled' bit in return value if vCPU is enabled.

Platforms that need the feature can opt in by setting
CPUHotplugFeatures::always_present_cpus = true
for other plaforms _STA will revert to the behavior before [1]

1)
bf1ecc8dad606 (w/acpi: Update ACPI _STA method with QOM vCPU ACPI Hotplug states)

---
 include/hw/acpi/cpu.h | 1 +
 hw/acpi/cpu.c         | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)
include/hw/acpi/cpu.h +1 -0
index 32654dc274..e9e9c28359 100644
@@ -56,6 +56,7 @@ typedef struct CPUHotplugFeatures {
     bool acpi_1_compatible;
     bool has_legacy_cphp;
     bool fw_unplugs_cpu;
+    bool always_present_cpus;
     const char *smi_path;
 } CPUHotplugFeatures;
 
hw/acpi/cpu.c +7 -2
index 5cb60ca8bc..67513450f9 100644
@@ -452,15 +452,20 @@ void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
 
         method = aml_method(CPU_STS_METHOD, 1, AML_SERIALIZED);
         {
+            /*
+             * For always present CPUs set all bits except of 'enabled'
+             * ACPI 1.0b: chapter '6.3.5 _STA'
+             */
+            uint8_t default_sta = opts.always_present_cpus ? 0xd : 0;
             Aml *idx = aml_arg(0);
-            Aml *sta = aml_local(0);
+            Aml *sta = aml_local(default_sta);
 
             aml_append(method, aml_acquire(ctrl_lock, 0xFFFF));
             aml_append(method, aml_store(idx, cpu_selector));
             aml_append(method, aml_store(zero, sta));
             ifctx = aml_if(aml_equal(is_enabled, one));
             {
-                aml_append(ifctx, aml_store(aml_int(0xF), sta));
+                aml_append(ifctx, aml_or(aml_int(0xF), sta, sta));
             }
             aml_append(method, ifctx);
             aml_append(method, aml_release(ctrl_lock));
Signature · 1 line
2.43.0
#6 lore raw

RFC 6/7 DO NOT MERGE: acpi: cpuhp: use 'realized' status of vCPU to check if CPU is enabled

In reply to Igor Mammedov

it still correct for x86 and other users, and can serve us as simpler to
[1] cpu_enabled_status() callback that does the same in a roundabout way.

It's still an RFC, and probably there we should add another property 'enabled' instead of abusing 'realized' and/or handle enabled state using hotplug handlers chain. i.e. in plug handler store enabled state AcpiCpuStatus and clear it in unplug handler instead of asking cpu from MMIO handler directly.

1) bf1ecc8dad606 (w/acpi: Update ACPI _STA method with QOM vCPU ACPI Hotplug states)

---
 hw/acpi/cpu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
hw/acpi/cpu.c +3 -1
index 67513450f9..992ae5d233 100644
@@ -63,7 +63,9 @@ static uint64_t cpu_hotplug_rd(void *opaque, hwaddr addr, unsigned size)
     cdev = &cpu_st->devs[cpu_st->selector];
     switch (addr) {
     case ACPI_CPU_FLAGS_OFFSET_RW: /* pack and return is_* fields */
-        val |= cdev->cpu ? 1 : 0;
+        val |= cdev->cpu ? object_property_get_bool(OBJECT(cdev->cpu),
+                                                    "realized", NULL)
+                           : 0;
         val |= cdev->is_inserting ? 2 : 0;
         val |= cdev->is_removing  ? 4 : 0;
         val |= cdev->fw_remove  ? 16 : 0;
Signature · 1 line
2.43.0
#7 lore raw

RFC 7/7 DO NOT MERGE: acpi: cpuhp: preserve always present vCPUs on unplug

In reply to Igor Mammedov

do not drop reference to always present vCPU and also avoid destroying it (unparent) on unplug.

Based-on: 2d6cfbaf174 (hw/acpi: Make CPUs ACPI presence conditional during vCPU hot-unplug)

---
 include/hw/acpi/cpu.h           |  4 +++-
 hw/acpi/acpi-cpu-hotplug-stub.c |  3 ++-
 hw/acpi/cpu.c                   | 10 ++++++++--
 hw/acpi/cpu_hotplug.c           |  2 +-
 hw/acpi/generic_event_device.c  |  2 +-
 5 files changed, 15 insertions(+), 6 deletions(-)
include/hw/acpi/cpu.h +3 -1
index e9e9c28359..f6708cafba 100644
@@ -36,6 +36,7 @@ typedef struct CPUHotplugState {
     uint32_t selector;
     uint8_t command;
     uint32_t dev_count;
+    bool always_present_cpus;
     AcpiCpuStatus *devs;
 } CPUHotplugState;
 
@@ -50,7 +51,8 @@ void acpi_cpu_unplug_cb(CPUHotplugState *cpu_st,
                         DeviceState *dev, Error **errp);
 
 void cpu_hotplug_hw_init(MemoryRegion *as, Object *owner,
-                         CPUHotplugState *state, hwaddr base_addr);
+                         CPUHotplugState *state, hwaddr base_addr,
+                         bool always_present_cpus);
 
 typedef struct CPUHotplugFeatures {
     bool acpi_1_compatible;
hw/acpi/acpi-cpu-hotplug-stub.c +2 -1
index c6c61bb9cd..748fd04006 100644
@@ -20,7 +20,8 @@ void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner,
 }
 
 void cpu_hotplug_hw_init(MemoryRegion *as, Object *owner,
-                         CPUHotplugState *state, hwaddr base_addr)
+                         CPUHotplugState *state, hwaddr base_addr,
+                         bool always_present_cpus)
 {
     return;
 }
hw/acpi/cpu.c +8 -2
index 992ae5d233..d85d4add60 100644
@@ -145,7 +145,6 @@ static void cpu_hotplug_wr(void *opaque, hwaddr addr, uint64_t data,
             dev = DEVICE(cdev->cpu);
             hotplug_ctrl = qdev_get_hotplug_handler(dev);
             hotplug_handler_unplug(hotplug_ctrl, dev, NULL);
-            object_unparent(OBJECT(dev));
             cdev->fw_remove = false;
         } else if (data & 16) {
             if (!cdev->cpu || cdev->cpu == first_cpu) {
@@ -215,7 +214,8 @@ static const MemoryRegionOps cpu_hotplug_ops = {
 };
 
 void cpu_hotplug_hw_init(MemoryRegion *as, Object *owner,
-                         CPUHotplugState *state, hwaddr base_addr)
+                         CPUHotplugState *state, hwaddr base_addr,
+                         bool always_present_cpus)
 {
     MachineState *machine = MACHINE(qdev_get_machine());
     MachineClass *mc = MACHINE_GET_CLASS(machine);
@@ -226,6 +226,7 @@ void cpu_hotplug_hw_init(MemoryRegion *as, Object *owner,
     id_list = mc->possible_cpu_arch_ids(machine);
     state->dev_count = id_list->len;
     state->devs = g_new0(typeof(*state->devs), state->dev_count);
+    state->always_present_cpus = always_present_cpus;
     for (i = 0; i < id_list->len; i++) {
         state->devs[i].cpu =  CPU(id_list->cpus[i].cpu);
         state->devs[i].arch_id = id_list->cpus[i].arch_id;
@@ -286,12 +287,17 @@ void acpi_cpu_unplug_cb(CPUHotplugState *cpu_st,
 {
     AcpiCpuStatus *cdev;
 
+    if (cpu_st->always_present_cpus) {
+        return;
+    }
+
     cdev = get_cpu_status(cpu_st, dev);
     if (!cdev) {
         return;
     }
 
     cdev->cpu = NULL;
+    object_unparent(OBJECT(dev));
 }
 
 static const VMStateDescription vmstate_cpuhp_sts = {
hw/acpi/cpu_hotplug.c +1 -1
index 83b8bc5deb..8c3618680f 100644
@@ -115,7 +115,7 @@ void acpi_switch_to_modern_cphp(AcpiCpuHotplug *gpe_cpu,
     MemoryRegion *parent = pci_address_space_io(PCI_DEVICE(gpe_cpu->device));
 
     memory_region_del_subregion(parent, &gpe_cpu->io);
-    cpu_hotplug_hw_init(parent, gpe_cpu->device, cpuhp_state, io_port);
+    cpu_hotplug_hw_init(parent, gpe_cpu->device, cpuhp_state, io_port, false);
 }
 
 void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine,
hw/acpi/generic_event_device.c +1 -1
index 663d9cb093..9099b76f80 100644
@@ -427,7 +427,7 @@ static void acpi_ged_realize(DeviceState *dev, Error **errp)
                                 ACPI_CPU_HOTPLUG_REG_LEN);
             sysbus_init_mmio(sbd, &s->container_cpuhp);
             cpu_hotplug_hw_init(&s->container_cpuhp, OBJECT(dev),
-                                &s->cpuhp_state, 0);
+                                &s->cpuhp_state, 0, false);
             break;
         }
         ged_events--;
Signature · 1 line
2.43.0
#8 lore raw
In reply to Igor Mammedov
Quoted 9 lines · On Tue, 12 Nov 2024 18:02:51 +0100 Igor Mammedov <[email protected]> wrote:

1st 4 patches are fixing regression and getting rid of not needed changes that were merged out of context (ARM CPU hotplug) without proper review, by simply reverting offendining patches to keep history clean as patches not 9.2 material to begin with.

The rest [5-7/7] are not tested RFC (not for merging to 9.2) for how problem could be dealt with and could be adopted/changed for the future ARM CPU hotplug series.

Quoted 5 lines

Igor Mammedov (6):
Revert "hw/acpi: Update ACPI _STA method with QOM vCPU ACPI Hotplug
states"
Revert "hw/acpi: Make CPUs ACPI presence conditional during vCPU
hot-unplug"

ping

Michael,
are you going to pick it up for 9.2?

Quoted 58 lines

tests/acpi: update expected blobs
acpi: cpuhp: add option to AML genrator to opt-in to always present
vCPUs
acpi: cpuhp: use 'realized' status of vCPU to check if CPU is enabled
acpi: cpuhp: preserve always present vCPUs on unplug

Salil Mehta (1):
qtest: allow ACPI DSDT Table changes

 include/hw/acpi/cpu.h                         |   5 +-
 include/hw/core/cpu.h                         |   2 -
 hw/acpi/acpi-cpu-hotplug-stub.c               |   3 +-
 hw/acpi/cpu.c                                 |  72 +++++-------------
 hw/acpi/cpu_hotplug.c                         |   2 +-
 hw/acpi/generic_event_device.c                |   2 +-
 tests/data/acpi/x86/pc/DSDT                   | Bin 8560 -> 8526 bytes
 tests/data/acpi/x86/pc/DSDT.acpierst          | Bin 8471 -> 8437 bytes
 tests/data/acpi/x86/pc/DSDT.acpihmat          | Bin 9885 -> 9851 bytes
 tests/data/acpi/x86/pc/DSDT.bridge            | Bin 15431 -> 15397 bytes
 tests/data/acpi/x86/pc/DSDT.cphp              | Bin 9024 -> 8990 bytes
 tests/data/acpi/x86/pc/DSDT.dimmpxm           | Bin 10214 -> 10180 bytes
 tests/data/acpi/x86/pc/DSDT.hpbridge          | Bin 8511 -> 8477 bytes
 tests/data/acpi/x86/pc/DSDT.hpbrroot          | Bin 5067 -> 5033 bytes
 tests/data/acpi/x86/pc/DSDT.ipmikcs           | Bin 8632 -> 8598 bytes
 tests/data/acpi/x86/pc/DSDT.memhp             | Bin 9919 -> 9885 bytes
 tests/data/acpi/x86/pc/DSDT.nohpet            | Bin 8418 -> 8384 bytes
 tests/data/acpi/x86/pc/DSDT.numamem           | Bin 8566 -> 8532 bytes
 tests/data/acpi/x86/pc/DSDT.roothp            | Bin 12353 -> 12319 bytes
 tests/data/acpi/x86/q35/DSDT                  | Bin 8389 -> 8355 bytes
 tests/data/acpi/x86/q35/DSDT.acpierst         | Bin 8406 -> 8372 bytes
 tests/data/acpi/x86/q35/DSDT.acpihmat         | Bin 9714 -> 9680 bytes
 .../acpi/x86/q35/DSDT.acpihmat-noinitiator    | Bin 8668 -> 8634 bytes
 tests/data/acpi/x86/q35/DSDT.applesmc         | Bin 8435 -> 8401 bytes
 tests/data/acpi/x86/q35/DSDT.bridge           | Bin 12002 -> 11968 bytes
 tests/data/acpi/x86/q35/DSDT.core-count       | Bin 12947 -> 12913 bytes
 tests/data/acpi/x86/q35/DSDT.core-count2      | Bin 33804 -> 33770 bytes
 tests/data/acpi/x86/q35/DSDT.cphp             | Bin 8853 -> 8819 bytes
 tests/data/acpi/x86/q35/DSDT.cxl              | Bin 13180 -> 13146 bytes
 tests/data/acpi/x86/q35/DSDT.dimmpxm          | Bin 10043 -> 10009 bytes
 tests/data/acpi/x86/q35/DSDT.ipmibt           | Bin 8464 -> 8430 bytes
 tests/data/acpi/x86/q35/DSDT.ipmismbus        | Bin 8477 -> 8443 bytes
 tests/data/acpi/x86/q35/DSDT.ivrs             | Bin 8406 -> 8372 bytes
 tests/data/acpi/x86/q35/DSDT.memhp            | Bin 9748 -> 9714 bytes
 tests/data/acpi/x86/q35/DSDT.mmio64           | Bin 9519 -> 9485 bytes
 tests/data/acpi/x86/q35/DSDT.multi-bridge     | Bin 13242 -> 13208 bytes
 tests/data/acpi/x86/q35/DSDT.noacpihp         | Bin 8269 -> 8235 bytes
 tests/data/acpi/x86/q35/DSDT.nohpet           | Bin 8247 -> 8213 bytes
 tests/data/acpi/x86/q35/DSDT.numamem          | Bin 8395 -> 8361 bytes
 tests/data/acpi/x86/q35/DSDT.pvpanic-isa      | Bin 8490 -> 8456 bytes
 tests/data/acpi/x86/q35/DSDT.thread-count     | Bin 12947 -> 12913 bytes
 tests/data/acpi/x86/q35/DSDT.thread-count2    | Bin 33804 -> 33770 bytes
 tests/data/acpi/x86/q35/DSDT.tis.tpm12        | Bin 8995 -> 8961 bytes
 tests/data/acpi/x86/q35/DSDT.tis.tpm2         | Bin 9021 -> 8987 bytes
 tests/data/acpi/x86/q35/DSDT.type4-count      | Bin 18623 -> 18589 bytes
 tests/data/acpi/x86/q35/DSDT.viot             | Bin 14646 -> 14612 bytes
 tests/data/acpi/x86/q35/DSDT.xapic            | Bin 35752 -> 35718 bytes
 47 files changed, 29 insertions(+), 57 deletions(-)
#9 lore raw
Quoted 18 lines · Igor Mammedov
Quoted 9 lines · On Tue, 12 Nov 2024 18:02:51 +0100 Igor Mammedov <[email protected]> wrote:

1st 4 patches are fixing regression and getting rid of not needed changes that were merged out of context (ARM CPU hotplug) without proper review, by simply reverting offendining patches to keep history clean as patches not 9.2 material to begin with.

The rest [5-7/7] are not tested RFC (not for merging to 9.2) for how problem could be dealt with and could be adopted/changed for the future ARM CPU hotplug series.

Quoted 5 lines

Igor Mammedov (6):
Revert "hw/acpi: Update ACPI _STA method with QOM vCPU ACPI Hotplug
states"
Revert "hw/acpi: Make CPUs ACPI presence conditional during vCPU
hot-unplug"

Quoted 4 lines

ping

Michael,
are you going to pick it up for 9.2?

yes, I am testing a pull as we speak.

Quoted 59 lines
Quoted 59 lines

tests/acpi: update expected blobs
acpi: cpuhp: add option to AML genrator to opt-in to always present
vCPUs
acpi: cpuhp: use 'realized' status of vCPU to check if CPU is enabled
acpi: cpuhp: preserve always present vCPUs on unplug

Salil Mehta (1):
qtest: allow ACPI DSDT Table changes

 include/hw/acpi/cpu.h                         |   5 +-
 include/hw/core/cpu.h                         |   2 -
 hw/acpi/acpi-cpu-hotplug-stub.c               |   3 +-
 hw/acpi/cpu.c                                 |  72 +++++-------------
 hw/acpi/cpu_hotplug.c                         |   2 +-
 hw/acpi/generic_event_device.c                |   2 +-
 tests/data/acpi/x86/pc/DSDT                   | Bin 8560 -> 8526 bytes
 tests/data/acpi/x86/pc/DSDT.acpierst          | Bin 8471 -> 8437 bytes
 tests/data/acpi/x86/pc/DSDT.acpihmat          | Bin 9885 -> 9851 bytes
 tests/data/acpi/x86/pc/DSDT.bridge            | Bin 15431 -> 15397 bytes
 tests/data/acpi/x86/pc/DSDT.cphp              | Bin 9024 -> 8990 bytes
 tests/data/acpi/x86/pc/DSDT.dimmpxm           | Bin 10214 -> 10180 bytes
 tests/data/acpi/x86/pc/DSDT.hpbridge          | Bin 8511 -> 8477 bytes
 tests/data/acpi/x86/pc/DSDT.hpbrroot          | Bin 5067 -> 5033 bytes
 tests/data/acpi/x86/pc/DSDT.ipmikcs           | Bin 8632 -> 8598 bytes
 tests/data/acpi/x86/pc/DSDT.memhp             | Bin 9919 -> 9885 bytes
 tests/data/acpi/x86/pc/DSDT.nohpet            | Bin 8418 -> 8384 bytes
 tests/data/acpi/x86/pc/DSDT.numamem           | Bin 8566 -> 8532 bytes
 tests/data/acpi/x86/pc/DSDT.roothp            | Bin 12353 -> 12319 bytes
 tests/data/acpi/x86/q35/DSDT                  | Bin 8389 -> 8355 bytes
 tests/data/acpi/x86/q35/DSDT.acpierst         | Bin 8406 -> 8372 bytes
 tests/data/acpi/x86/q35/DSDT.acpihmat         | Bin 9714 -> 9680 bytes
 .../acpi/x86/q35/DSDT.acpihmat-noinitiator    | Bin 8668 -> 8634 bytes
 tests/data/acpi/x86/q35/DSDT.applesmc         | Bin 8435 -> 8401 bytes
 tests/data/acpi/x86/q35/DSDT.bridge           | Bin 12002 -> 11968 bytes
 tests/data/acpi/x86/q35/DSDT.core-count       | Bin 12947 -> 12913 bytes
 tests/data/acpi/x86/q35/DSDT.core-count2      | Bin 33804 -> 33770 bytes
 tests/data/acpi/x86/q35/DSDT.cphp             | Bin 8853 -> 8819 bytes
 tests/data/acpi/x86/q35/DSDT.cxl              | Bin 13180 -> 13146 bytes
 tests/data/acpi/x86/q35/DSDT.dimmpxm          | Bin 10043 -> 10009 bytes
 tests/data/acpi/x86/q35/DSDT.ipmibt           | Bin 8464 -> 8430 bytes
 tests/data/acpi/x86/q35/DSDT.ipmismbus        | Bin 8477 -> 8443 bytes
 tests/data/acpi/x86/q35/DSDT.ivrs             | Bin 8406 -> 8372 bytes
 tests/data/acpi/x86/q35/DSDT.memhp            | Bin 9748 -> 9714 bytes
 tests/data/acpi/x86/q35/DSDT.mmio64           | Bin 9519 -> 9485 bytes
 tests/data/acpi/x86/q35/DSDT.multi-bridge     | Bin 13242 -> 13208 bytes
 tests/data/acpi/x86/q35/DSDT.noacpihp         | Bin 8269 -> 8235 bytes
 tests/data/acpi/x86/q35/DSDT.nohpet           | Bin 8247 -> 8213 bytes
 tests/data/acpi/x86/q35/DSDT.numamem          | Bin 8395 -> 8361 bytes
 tests/data/acpi/x86/q35/DSDT.pvpanic-isa      | Bin 8490 -> 8456 bytes
 tests/data/acpi/x86/q35/DSDT.thread-count     | Bin 12947 -> 12913 bytes
 tests/data/acpi/x86/q35/DSDT.thread-count2    | Bin 33804 -> 33770 bytes
 tests/data/acpi/x86/q35/DSDT.tis.tpm12        | Bin 8995 -> 8961 bytes
 tests/data/acpi/x86/q35/DSDT.tis.tpm2         | Bin 9021 -> 8987 bytes
 tests/data/acpi/x86/q35/DSDT.type4-count      | Bin 18623 -> 18589 bytes
 tests/data/acpi/x86/q35/DSDT.viot             | Bin 14646 -> 14612 bytes
 tests/data/acpi/x86/q35/DSDT.xapic            | Bin 35752 -> 35718 bytes
 47 files changed, 29 insertions(+), 57 deletions(-)