[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 00/10] ACPI CPU hotplug refactoring to support un
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 00/10] ACPI CPU hotplug refactoring to support unplug and more than 255 CPUs |
Date: |
Thu, 16 Jun 2016 18:55:33 +0200 |
Changelog:
v1->v2:
- dropped consolidate legacy ACPI CPU hotplug as they are in master by now
- pc: start with legacy hotplug and let 2.7 machine type and older
to switch inot new hotplug mode. That way legacy BIOS will
still work fine as it uses built in ACPI tables and will continue
to use legacy CPU hotplug interface.
- poll for CPU objects with events (insert/remove) instead of
looping over all CPUs to find CPUs with events.
- drop dynamic PXM support as it could be implemented in static way
at acpi tabels build time. It will be an additional series on top of this.
- resplit patches on basic present CPU support, hot-add and hot-remove parts
Patches:
1-7: add new CPU hotplug impl.
8: makes 2.7 machine type to use new AML code that
will switch piix4/ich9 into new mode +
switching logic with migration glue for piix4/ich9
9: drops the last dependency in ACPI parts on apic_id_limit
sized map.
RFC->v1:
- drop machine.cpu-hotplug property and leave CPU hotplug
always enabled as it used to be.
(it also simplifies, series a bit)
- reshuffle/squash some patches to make series bisectable
wrt 'make check' failures
- add doc comment in qapi schema
- fix 'make check' error for mips target, disableCPU hotplug
code path in piix4_pm for mips
- drop some intermediate expected ACPI tables updates
- replace _MAT method with named buffer object
Current ACPI interface for CPU hotplug supports hoti-adding
only upto 255 CPUs and lacks means to convey additional
information needed _OST methods support.
Also being bitmap based with bit position specifying APIC ID
it doesn't scale up well for 32-bit APIC IDs that will come
with x2APIC support.
So add another QEMU-guest interface using as model memory-hotplug.
New interface will be used since 2.7 machine types and will
support:
- more than 255 CPUs with 32-bit APIC ID value
- a registers set to communicate OST information
(extendable without breaking IO layout)
- possible to reuse for ARM's 'virt' machine type
with minimal tweaks (add init for MMIO, add
ACPI hooks on CPU hotplug path, MADT generation)
Tested with following guests: RHEL7, WS2003EEx64, WS2012R2x64
* unplug is tested only with RHEL7 as Windows doesn't support it.
* tested that migration works as well.
git tree for testing:
address@hidden:imammedo/qemu.git modern_cpu_hotplug_v2
viewing:
https://github.com/imammedo/qemu/commits/modern_cpu_hotplug_v2
Igor Mammedov (10):
docs: update ACPI CPU hotplug spec with new protocol
pc: piix4/ich9: add 'cpu-hotplug-legacy' property
acpi: cpuhp: add CPU devices AML with _STA method
pc: acpi: introduce AcpiDeviceIfClass.madt_cpu hook
acpi: cpuhp: implement hot-add parts of CPU hotplug interface
acpi: cpuhp: implement hot-remove parts of CPU hotplug interface
acpi: cpuhp: add cpu._OST handling
pc: use new CPU hotplug interface since 2.7 machine type
tests: acpi: add CPU hotplug testcase
pc: acpi: drop intermediate PCMachineState.node_cpu
docs/specs/acpi_cpu_hotplug.txt | 94 +++++-
hw/acpi/Makefile.objs | 1 +
hw/acpi/cpu.c | 561 +++++++++++++++++++++++++++++++++++
hw/acpi/cpu_hotplug.c | 21 +-
hw/acpi/ich9.c | 69 ++++-
hw/acpi/piix4.c | 71 ++++-
hw/i386/acpi-build.c | 68 +++--
hw/i386/pc.c | 63 +++-
hw/i386/pc_piix.c | 2 +
hw/i386/pc_q35.c | 2 +
hw/isa/lpc_ich9.c | 1 +
include/hw/acpi/acpi_dev_interface.h | 7 +
include/hw/acpi/cpu.h | 67 +++++
include/hw/acpi/cpu_hotplug.h | 6 +
include/hw/acpi/ich9.h | 3 +
include/hw/i386/pc.h | 8 +-
qapi-schema.json | 3 +-
stubs/Makefile.objs | 1 +
stubs/pc_madt_cpu_entry.c | 7 +
tests/bios-tables-test.c | 28 ++
trace-events | 14 +
21 files changed, 1043 insertions(+), 54 deletions(-)
create mode 100644 hw/acpi/cpu.c
create mode 100644 include/hw/acpi/cpu.h
create mode 100644 stubs/pc_madt_cpu_entry.c
--
1.8.3.1
- [Qemu-devel] [PATCH v2 00/10] ACPI CPU hotplug refactoring to support unplug and more than 255 CPUs,
Igor Mammedov <=
- [Qemu-devel] [PATCH v2 01/10] docs: update ACPI CPU hotplug spec with new protocol, Igor Mammedov, 2016/06/16
- [Qemu-devel] [PATCH v2 02/10] pc: piix4/ich9: add 'cpu-hotplug-legacy' property, Igor Mammedov, 2016/06/16
- [Qemu-devel] [PATCH v2 03/10] acpi: cpuhp: add CPU devices AML with _STA method, Igor Mammedov, 2016/06/16
- [Qemu-devel] [PATCH v2 05/10] acpi: cpuhp: implement hot-add parts of CPU hotplug interface, Igor Mammedov, 2016/06/16
- [Qemu-devel] [PATCH v2 04/10] pc: acpi: introduce AcpiDeviceIfClass.madt_cpu hook, Igor Mammedov, 2016/06/16
- [Qemu-devel] [PATCH v2 06/10] acpi: cpuhp: implement hot-remove parts of CPU hotplug interface, Igor Mammedov, 2016/06/16
- [Qemu-devel] [PATCH v2 07/10] acpi: cpuhp: add cpu._OST handling, Igor Mammedov, 2016/06/16
- [Qemu-devel] [PATCH v2 08/10] pc: use new CPU hotplug interface since 2.7 machine type, Igor Mammedov, 2016/06/16
- [Qemu-devel] [PATCH v2 09/10] tests: acpi: add CPU hotplug testcase, Igor Mammedov, 2016/06/16