qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Salil Mehta via <qemu-devel@nongnu.org>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
	"mst@redhat.com" <mst@redhat.com>
Cc: "maz@kernel.org" <maz@kernel.org>,
	"jean-philippe@linaro.org" <jean-philippe@linaro.org>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	"lpieralisi@kernel.org" <lpieralisi@kernel.org>,
	"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	"richard.henderson@linaro.org" <richard.henderson@linaro.org>,
	"imammedo@redhat.com" <imammedo@redhat.com>,
	"andrew.jones@linux.dev" <andrew.jones@linux.dev>,
	"david@redhat.com" <david@redhat.com>,
	"philmd@linaro.org" <philmd@linaro.org>,
	"peterx@redhat.com" <peterx@redhat.com>,
	"eric.auger@redhat.com" <eric.auger@redhat.com>,
	"will@kernel.org" <will@kernel.org>,
	"ardb@kernel.org" <ardb@kernel.org>,
	"oliver.upton@linux.dev" <oliver.upton@linux.dev>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"gshan@redhat.com" <gshan@redhat.com>,
	"rafael@kernel.org" <rafael@kernel.org>,
	"borntraeger@linux.ibm.com" <borntraeger@linux.ibm.com>,
	 "alex.bennee@linaro.org" <alex.bennee@linaro.org>,
	"npiggin@gmail.com" <npiggin@gmail.com>,
	"harshpb@linux.ibm.com" <harshpb@linux.ibm.com>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"darren@os.amperecomputing.com" <darren@os.amperecomputing.com>,
	"ilkka@os.amperecomputing.com" <ilkka@os.amperecomputing.com>,
	"vishnu@os.amperecomputing.com" <vishnu@os.amperecomputing.com>,
	"karl.heubaum@oracle.com" <karl.heubaum@oracle.com>,
	"miguel.luis@oracle.com" <miguel.luis@oracle.com>,
	"salil.mehta@opnsrc.net" <salil.mehta@opnsrc.net>,
	zhukeqian <zhukeqian1@huawei.com>,
	"wangxiongfeng (C)" <wangxiongfeng2@huawei.com>,
	"wangyanan (Y)" <wangyanan55@huawei.com>,
	"jiakernel2@gmail.com" <jiakernel2@gmail.com>,
	"maobibo@loongson.cn" <maobibo@loongson.cn>,
	"lixianglai@loongson.cn" <lixianglai@loongson.cn>,
	"shahuang@redhat.com" <shahuang@redhat.com>,
	"zhao1.liu@intel.com" <zhao1.liu@intel.com>,
	Linuxarm <linuxarm@huawei.com>,
	"gustavo.romero@linaro.org" <gustavo.romero@linaro.org>
Subject: RE: [PATCH V2 0/6] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)
Date: Sun, 3 Nov 2024 10:46:05 +0000	[thread overview]
Message-ID: <dcf70ddbc3884c2482b035d07321bc37@huawei.com> (raw)
In-Reply-To: <20241031200502.3869-1-salil.mehta@huawei.com>

Hello,

Please ignore this patch-set as there was some issue w.r.t x86. Details are in
the V3 patch-set sent for review today. V3 has fixed almost all of the issues
identified by Igor in the V1 patch-set in relation to x86.

 Please have a look at the below V3 patch-set:

[PATCH V3 0/5] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)
https://lore.kernel.org/qemu-devel/20241103102419.202225-1-salil.mehta@huawei.com/#t

Sorry for any inconvenience above might have caused.

Best regards
Salil.

>  -----Original Message-----
>  From: Salil Mehta <salil.mehta@huawei.com>
>  Sent: Thursday, October 31, 2024 8:05 PM
>  To: qemu-devel@nongnu.org; qemu-arm@nongnu.org; mst@redhat.com
>  Cc: Salil Mehta <salil.mehta@huawei.com>; maz@kernel.org; jean-
>  philippe@linaro.org; Jonathan Cameron
>  <jonathan.cameron@huawei.com>; lpieralisi@kernel.org;
>  peter.maydell@linaro.org; richard.henderson@linaro.org;
>  imammedo@redhat.com; andrew.jones@linux.dev; david@redhat.com;
>  philmd@linaro.org; peterx@redhat.com; eric.auger@redhat.com;
>  will@kernel.org; ardb@kernel.org; oliver.upton@linux.dev;
>  pbonzini@redhat.com; gshan@redhat.com; rafael@kernel.org;
>  borntraeger@linux.ibm.com; alex.bennee@linaro.org; npiggin@gmail.com;
>  harshpb@linux.ibm.com; linux@armlinux.org.uk;
>  darren@os.amperecomputing.com; ilkka@os.amperecomputing.com;
>  vishnu@os.amperecomputing.com; karl.heubaum@oracle.com;
>  miguel.luis@oracle.com; salil.mehta@opnsrc.net; zhukeqian
>  <zhukeqian1@huawei.com>; wangxiongfeng (C)
>  <wangxiongfeng2@huawei.com>; wangyanan (Y)
>  <wangyanan55@huawei.com>; jiakernel2@gmail.com;
>  maobibo@loongson.cn; lixianglai@loongson.cn; shahuang@redhat.com;
>  zhao1.liu@intel.com; Linuxarm <linuxarm@huawei.com>;
>  gustavo.romero@linaro.org
>  Subject: [PATCH V2 0/6] Arch agnostic ACPI changes to support vCPU
>  Hotplug (on Archs like ARM)
>  
>  Change Log
>  ==========
>  
>  Patch V1 -> V2:
>  1. Addressed Igor Mammedov's (Redhat) raised issues:
>     - Removed `ACPICPUstatus::is_present` State and its handling in the
>       ACPI APUs AML code and now all QOM vCPUs are present.
>     - Dropped the concept of `acpi_persistent` because now QOM vCPUs
>       states and the ACPI vCPU states are consistent.
>     - QOM vCPU objects are always present now (accompanying RFC V6)
>     - Added .needed() hook to the GED VMSD toconditionally migrate the
>       ACPI CPU hotplug state at the source VM.
>  2. Addressed Zhao Liu's (Intel) reported x86 DSDT Table bios-acpi-test failure
>  3. Incorporated Gustavo Romero's comments and added his Tag to [Patches
>  1,2,4] 4. Addressed Gavin Shan's comment to reduce the inline code
>  comments
>     wherever possible.
>  
>  
>  Brief Recall
>  ============
>  With the advent of multi-core SoCs, the concept of CPU-level hotplugging
>  has become less distinct, often functioning as a power on/off event
>  rather than a full hotplug operation. However, hotplug support at the
>  die/NUMA/socket level remains meaningful and is architecture-specific.
>  Virtual CPU hotplug can be supported regardless of architectural support
>  for physical CPU hotplug, as it serves resource management needs—such as
>  dynamically scaling VM compute capacity based on demand or SLAs,
>  optimizing boot times, or reducing memory footprint. Although, its
>  desing must be scalable and must co-exist with future die/NUMA/socket
>  level hotplug features.
>  
>  
>  Motivation for this patch-set
>  =============================
>  In architectures that support vCPU hotplug, firmware or the VMM/QEMU
>  typically reflects vCPU status changes to the OS via the ACPI
>  `_STA.Present` bit. However, certain CPU architectures prohibit [1]
>  modifications to CPU presence after kernel boot. This restriction [2][3]
>  could be due to closely integrated per-CPU components—like interrupt
>  controllers or other features— that may not support reconfiguration
>  post-boot and are often in an `always-on` power domain. Consequently,
>  specifications for these architectures require all CPUs to remain
>  present i.e.`_STA.Present=True`, once the system is initialized.
>  
>  To be able to support vCPU Hotplug feature, as a workaround to the above
>  limitation,  ACPI method `_STA.Enabled` Bit could be used to reflect the
>  plugged and unplugged states of the QOM vCPUs.
>  
>  This patch set introduces the following changes:
>  
>  1. Explicit `ACPICPUstatus::is_enabled` State: Adds an `is_enabled`
>     state, initialized during machine setup and updated during CPU
>     hotplug and hot-unplug events.
>  
>  2. Support for Migrating ACPI CPU State: Facilitates the migration of
>     the ACPI CPU state. (This needs reconsideration as per Igor. Last
>     patch can be dropped if this affects the acceptability of other
>     patches of this patch-set)
>  
>  3. Updates the Qtest bios-acpi-test
>  
>  This patch set is designed to work independently and is meant to ensures
>  compatibility with existing hotplug support across different
>  architectures. This patch-set has been tested alongside ARM-specific
>  vCPU hotplug changes (included in the upcoming RFC V6 [4]), and
>  hot(un)plug functionalities performed as expected which concerns this
>  patch-set. Please have a look.
>  
>  Thank you!
>  
>  
>  Repository of this patch-set
>  ============================
>  (*) Latest Architecture Agnostic ACPI changes patch-set:
>      https://github.com/salil-mehta/qemu.git   virt-cpuhp-armv8/rfc-
>  v6.arch.agnostic.acpi.v2
>      Link: https://github.com/salil-mehta/qemu/commits/virt-cpuhp-
>  armv8/rfc-v6.arch.agnostic.acpi.v2
>  (*) Works with upcoming ARM architecture specific patch-set RFC V6 [4]
>  
>  
>  References
>  ==========
>  [1] Check comment 5 in the bugzilla entry
>      Link: https://bugzilla.tianocore.org/show_bug.cgi?id=4481#c5
>  [2] KVMForum 2023 Presentation: Challenges Revisited in Supporting Virt
>  CPU Hotplug on
>      architectures that don’t Support CPU Hotplug (like ARM64)
>      a. Kernel Link: https://kvm-forum.qemu.org/2023/KVM-forum-cpu-
>  hotplug_7OJ1YyJ.pdf
>      b. Qemu Link:  https://kvm-
>  forum.qemu.org/2023/Challenges_Revisited_in_Supporting_Virt_CPU_Hot
>  plug_-__ii0iNb3.pdf
>  [3] KVMForum 2020 Presentation: Challenges in Supporting Virtual CPU
>  Hotplug on
>      SoC Based Systems (like ARM64)
>      Link: https://kvmforum2020.sched.com/event/eE4m
>  [4] Upcoming RFC V6, Support of Virtual CPU Hotplug for ARMv8 Arch
>      Link: https://github.com/salil-mehta/qemu/commits/virt-cpuhp-
>  armv8/rfc-v6-rc4
>  
>  
>  Salil Mehta (6):
>    hw/acpi: Introduce `is_enabled` state in ACPI CPU Hotplug Status
>    hw/acpi: Update ACPI CPU Hotplug state during vCPU hot(un)plug
>    qtest: allow ACPI DSDT Table changes
>    hw/acpi: Update CPUs AML's `is_enabled` state in ACPI _STA method
>    tests/qtest/bios-tables-test: Update DSDT golden masters for
>      x86/{pc,q35}
>    hw/acpi: Update GED with vCPU Hotplug VMSD for migration
>  
>   hw/acpi/cpu.c                                 |  22 ++++++++++++++++--
>   hw/acpi/generic_event_device.c                |  19 +++++++++++++++
>   include/hw/acpi/cpu.h                         |   2 +-
>   tests/data/acpi/x86/pc/DSDT                   | Bin 8527 -> 8533 bytes
>   tests/data/acpi/x86/pc/DSDT.acpierst          | Bin 8438 -> 8444 bytes
>   tests/data/acpi/x86/pc/DSDT.acpihmat          | Bin 9852 -> 9858 bytes
>   tests/data/acpi/x86/pc/DSDT.bridge            | Bin 15398 -> 15404 bytes
>   tests/data/acpi/x86/pc/DSDT.cphp              | Bin 8991 -> 8997 bytes
>   tests/data/acpi/x86/pc/DSDT.dimmpxm           | Bin 10181 -> 10187 bytes
>   tests/data/acpi/x86/pc/DSDT.hpbridge          | Bin 8478 -> 8484 bytes
>   tests/data/acpi/x86/pc/DSDT.hpbrroot          | Bin 5034 -> 5040 bytes
>   tests/data/acpi/x86/pc/DSDT.ipmikcs           | Bin 8599 -> 8605 bytes
>   tests/data/acpi/x86/pc/DSDT.memhp             | Bin 9886 -> 9892 bytes
>   tests/data/acpi/x86/pc/DSDT.nohpet            | Bin 8385 -> 8391 bytes
>   tests/data/acpi/x86/pc/DSDT.numamem           | Bin 8533 -> 8539 bytes
>   tests/data/acpi/x86/pc/DSDT.roothp            | Bin 12320 -> 12326 bytes
>   tests/data/acpi/x86/q35/DSDT                  | Bin 8355 -> 8361 bytes
>   tests/data/acpi/x86/q35/DSDT.acpierst         | Bin 8372 -> 8378 bytes
>   tests/data/acpi/x86/q35/DSDT.acpihmat         | Bin 9680 -> 9686 bytes
>   .../acpi/x86/q35/DSDT.acpihmat-noinitiator    | Bin 8634 -> 8640 bytes
>   tests/data/acpi/x86/q35/DSDT.applesmc         | Bin 8401 -> 8407 bytes
>   tests/data/acpi/x86/q35/DSDT.bridge           | Bin 11968 -> 11974 bytes
>   tests/data/acpi/x86/q35/DSDT.core-count       | Bin 12913 -> 12919 bytes
>   tests/data/acpi/x86/q35/DSDT.core-count2      | Bin 33770 -> 33776 bytes
>   tests/data/acpi/x86/q35/DSDT.cphp             | Bin 8819 -> 8825 bytes
>   tests/data/acpi/x86/q35/DSDT.cxl              | Bin 13148 -> 13154 bytes
>   tests/data/acpi/x86/q35/DSDT.dimmpxm          | Bin 10009 -> 10015 bytes
>   tests/data/acpi/x86/q35/DSDT.ipmibt           | Bin 8430 -> 8436 bytes
>   tests/data/acpi/x86/q35/DSDT.ipmismbus        | Bin 8443 -> 8449 bytes
>   tests/data/acpi/x86/q35/DSDT.ivrs             | Bin 8372 -> 8378 bytes
>   tests/data/acpi/x86/q35/DSDT.memhp            | Bin 9714 -> 9720 bytes
>   tests/data/acpi/x86/q35/DSDT.mmio64           | Bin 9485 -> 9491 bytes
>   tests/data/acpi/x86/q35/DSDT.multi-bridge     | Bin 13208 -> 13214 bytes
>   tests/data/acpi/x86/q35/DSDT.noacpihp         | Bin 8235 -> 8241 bytes
>   tests/data/acpi/x86/q35/DSDT.nohpet           | Bin 8213 -> 8219 bytes
>   tests/data/acpi/x86/q35/DSDT.numamem          | Bin 8361 -> 8367 bytes
>   tests/data/acpi/x86/q35/DSDT.pvpanic-isa      | Bin 8456 -> 8462 bytes
>   tests/data/acpi/x86/q35/DSDT.thread-count     | Bin 12913 -> 12919 bytes
>   tests/data/acpi/x86/q35/DSDT.thread-count2    | Bin 33770 -> 33776 bytes
>   tests/data/acpi/x86/q35/DSDT.tis.tpm12        | Bin 8961 -> 8967 bytes
>   tests/data/acpi/x86/q35/DSDT.tis.tpm2         | Bin 8987 -> 8993 bytes
>   tests/data/acpi/x86/q35/DSDT.type4-count      | Bin 18589 -> 18595 bytes
>   tests/data/acpi/x86/q35/DSDT.viot             | Bin 14615 -> 14621 bytes
>   tests/data/acpi/x86/q35/DSDT.xapic            | Bin 35718 -> 35724 bytes
>   44 files changed, 40 insertions(+), 3 deletions(-)
>  
>  --
>  2.34.1


      parent reply	other threads:[~2024-11-03 10:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-31 20:04 [PATCH V2 0/6] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM) Salil Mehta via
2024-10-31 20:04 ` [PATCH V2 1/6] hw/acpi: Introduce `is_enabled` state in ACPI CPU Hotplug Status Salil Mehta via
2024-10-31 20:04 ` [PATCH V2 2/6] hw/acpi: Update ACPI CPU Hotplug state during vCPU hot(un)plug Salil Mehta via
2024-10-31 20:04 ` [PATCH V2 3/6] qtest: allow ACPI DSDT Table changes Salil Mehta via
2024-10-31 20:05 ` [PATCH V2 4/6] hw/acpi: Update CPUs AML's `is_enabled` state in ACPI _STA method Salil Mehta via
2024-10-31 20:05 ` [PATCH V2 5/6] tests/qtest/bios-tables-test: Update DSDT golden masters for x86/{pc, q35} Salil Mehta via
2024-10-31 20:05 ` [PATCH V2 6/6] hw/acpi: Update GED with vCPU Hotplug VMSD for migration Salil Mehta via
2024-11-03 10:46 ` Salil Mehta via [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dcf70ddbc3884c2482b035d07321bc37@huawei.com \
    --to=qemu-devel@nongnu.org \
    --cc=alex.bennee@linaro.org \
    --cc=andrew.jones@linux.dev \
    --cc=ardb@kernel.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=darren@os.amperecomputing.com \
    --cc=david@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=gshan@redhat.com \
    --cc=gustavo.romero@linaro.org \
    --cc=harshpb@linux.ibm.com \
    --cc=ilkka@os.amperecomputing.com \
    --cc=imammedo@redhat.com \
    --cc=jean-philippe@linaro.org \
    --cc=jiakernel2@gmail.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=karl.heubaum@oracle.com \
    --cc=linux@armlinux.org.uk \
    --cc=linuxarm@huawei.com \
    --cc=lixianglai@loongson.cn \
    --cc=lpieralisi@kernel.org \
    --cc=maobibo@loongson.cn \
    --cc=maz@kernel.org \
    --cc=miguel.luis@oracle.com \
    --cc=mst@redhat.com \
    --cc=npiggin@gmail.com \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=rafael@kernel.org \
    --cc=richard.henderson@linaro.org \
    --cc=salil.mehta@huawei.com \
    --cc=salil.mehta@opnsrc.net \
    --cc=shahuang@redhat.com \
    --cc=vishnu@os.amperecomputing.com \
    --cc=wangxiongfeng2@huawei.com \
    --cc=wangyanan55@huawei.com \
    --cc=will@kernel.org \
    --cc=zhao1.liu@intel.com \
    --cc=zhukeqian1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).