qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/10] x86: fix cpu hotplug with secure boot
@ 2020-09-07 11:23 Igor Mammedov
  2020-09-07 11:23 ` [PATCH v5 01/10] x86: lpc9: let firmware negotiate 'CPU hotplug with SMI' features Igor Mammedov
                   ` (11 more replies)
  0 siblings, 12 replies; 25+ messages in thread
From: Igor Mammedov @ 2020-09-07 11:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: boris.ostrovsky, lersek, aaron.young

v5:
  - fix hotplug on Windows when there is more than 256 possible CPUs
    (Windows isn't able to handle VarPackage over 255 elements
     so process CPUs in batches)
  - fix off-by-one in package length (Laszlo)
  - fix not selecting CPU before clearing insert event (Laszlo)
  - use aml_lgreater() instead of aml_lnot(aml_equal(num_added_cpus, zero) (Laszlo)
  - split 'x68: acpi: trigger SMI before sending hotplug Notify event to OSPM'
    in samller chunks (Laszlo)
  - fix comment to match spec (Laszlo)
  - reorder aml_lor() and aml_land() in header (Laszlo)
v4:
  - fix 5.2 machine types so they won't apply pc_compat_5_1 (Laszlo)
v3:
  - rebase on top of "[PATCH v2] hw: add compat machines for 5.2"
    so apply that before this patch
v2:
  - AML: clean is_inserted flag only after SMI callback
  - make x-smi-cpu-hotunplug false by default
  - massage error hint on not supported unplug
v1:
  - fix typos and some phrases (Laszlo)
  - add unplug check (Laszlo)
  - redo AML scan logic to avoid race when adding multiple CPUs

CPU hotplug with Secure Boot was not really supported and firmware wasn't aware
of hotplugged CPUs (which might lead to guest crashes). During 4.2 we introduced
locked SMI handler RAM arrea to make sure that guest OS wasn't able to inject
its own SMI handler and OVMF added initial CPU hotplug support.

This series is QEMU part of that support which lets QMVF tell QEMU that
CPU hotplug with SMI broadcast enabled is supported so that QEMU would be able
to prevent hotplug in case it's not supported and trigger SMI on hotplug when
it's necessary.

Igor Mammedov (10):
  x86: lpc9: let firmware negotiate 'CPU hotplug with SMI' features
  x86: cpuhp: prevent guest crash on CPU hotplug when broadcast SMI is
    in use
  x86: cpuhp: refuse cpu hot-unplug request earlier if not supported
  acpi: add aml_land() and aml_break() primitives
  tests: acpi: mark to be changed tables in
    bios-tables-test-allowed-diff
  x86: ich9: expose "smi_negotiated_features" as a QOM property
  x86: acpi: introduce AcpiPmInfo::smi_on_cpuhp
  x86: acpi: introduce the PCI0.SMI0 ACPI device
  x68: acpi: trigger SMI before sending hotplug Notify event to OSPM
  tests: acpi: update acpi blobs with new AML

 include/hw/acpi/aml-build.h       |   2 +
 include/hw/acpi/cpu.h             |   1 +
 include/hw/i386/ich9.h            |   4 +
 hw/acpi/aml-build.c               |  16 +++
 hw/acpi/cpu.c                     | 156 ++++++++++++++++++++++++------
 hw/acpi/ich9.c                    |  24 ++++-
 hw/i386/acpi-build.c              |  35 ++++++-
 hw/i386/pc.c                      |  15 ++-
 hw/isa/lpc_ich9.c                 |  16 +++
 tests/data/acpi/pc/DSDT           | Bin 4934 -> 5060 bytes
 tests/data/acpi/pc/DSDT.acpihmat  | Bin 6258 -> 6385 bytes
 tests/data/acpi/pc/DSDT.bridge    | Bin 6793 -> 6919 bytes
 tests/data/acpi/pc/DSDT.cphp      | Bin 5397 -> 5524 bytes
 tests/data/acpi/pc/DSDT.dimmpxm   | Bin 6587 -> 6714 bytes
 tests/data/acpi/pc/DSDT.ipmikcs   | Bin 5006 -> 5132 bytes
 tests/data/acpi/pc/DSDT.memhp     | Bin 6293 -> 6419 bytes
 tests/data/acpi/pc/DSDT.numamem   | Bin 4940 -> 5066 bytes
 tests/data/acpi/q35/DSDT          | Bin 7678 -> 7804 bytes
 tests/data/acpi/q35/DSDT.acpihmat | Bin 9002 -> 9129 bytes
 tests/data/acpi/q35/DSDT.bridge   | Bin 7695 -> 7821 bytes
 tests/data/acpi/q35/DSDT.cphp     | Bin 8141 -> 8268 bytes
 tests/data/acpi/q35/DSDT.dimmpxm  | Bin 9331 -> 9458 bytes
 tests/data/acpi/q35/DSDT.ipmibt   | Bin 7753 -> 7879 bytes
 tests/data/acpi/q35/DSDT.memhp    | Bin 9037 -> 9163 bytes
 tests/data/acpi/q35/DSDT.mmio64   | Bin 8808 -> 8934 bytes
 tests/data/acpi/q35/DSDT.numamem  | Bin 7684 -> 7810 bytes
 tests/data/acpi/q35/DSDT.tis      | Bin 8283 -> 8409 bytes
 27 files changed, 239 insertions(+), 30 deletions(-)

-- 
2.27.0



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2020-09-23  9:54 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-07 11:23 [PATCH v5 00/10] x86: fix cpu hotplug with secure boot Igor Mammedov
2020-09-07 11:23 ` [PATCH v5 01/10] x86: lpc9: let firmware negotiate 'CPU hotplug with SMI' features Igor Mammedov
2020-09-07 11:23 ` [PATCH v5 02/10] x86: cpuhp: prevent guest crash on CPU hotplug when broadcast SMI is in use Igor Mammedov
2020-09-07 11:23 ` [PATCH v5 03/10] x86: cpuhp: refuse cpu hot-unplug request earlier if not supported Igor Mammedov
2020-09-07 11:23 ` [PATCH v5 04/10] acpi: add aml_land() and aml_break() primitives Igor Mammedov
2020-09-07 11:23 ` [PATCH v5 05/10] tests: acpi: mark to be changed tables in bios-tables-test-allowed-diff Igor Mammedov
2020-09-07 11:23 ` [PATCH v5 06/10] x86: ich9: expose "smi_negotiated_features" as a QOM property Igor Mammedov
2020-09-07 12:49   ` Laszlo Ersek
2020-09-07 11:23 ` [PATCH v5 07/10] x86: acpi: introduce AcpiPmInfo::smi_on_cpuhp Igor Mammedov
2020-09-07 12:49   ` Laszlo Ersek
2020-09-07 11:23 ` [PATCH v5 08/10] x86: acpi: introduce the PCI0.SMI0 ACPI device Igor Mammedov
2020-09-07 12:49   ` Laszlo Ersek
2020-09-07 11:23 ` [PATCH v5 09/10] x68: acpi: trigger SMI before sending hotplug Notify event to OSPM Igor Mammedov
2020-09-07 15:17   ` Laszlo Ersek
2020-09-08  7:39     ` Igor Mammedov
2020-09-08  9:35       ` Laszlo Ersek
2020-09-08 11:00         ` Laszlo Ersek
2020-09-08 14:24   ` [PATCH v5 9/10] fixup! " Igor Mammedov
2020-09-08 18:09     ` Laszlo Ersek
2020-09-07 11:23 ` [PATCH v5 10/10] tests: acpi: update acpi blobs with new AML Igor Mammedov
2020-09-08 14:29 ` [PATCH v5 00/10] x86: fix cpu hotplug with secure boot Igor Mammedov
2020-09-08 18:08   ` Laszlo Ersek
2020-09-21 11:46 ` Igor Mammedov
2020-09-21 12:34   ` Michael S. Tsirkin
2020-09-23  9:48     ` Igor Mammedov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).