RE: [PATCH RFC V5 00/30] Support of Virtual CPU Hotplug for ARMv8 Arch

2025-05-22 Thread Salil Mehta via
o > Cc: Gavin Shan ; Salil Mehta > ; qemu-devel@nongnu.org; qemu- [...] > On Wed, 21 May 2025 12:06:57 -0300 > Gustavo Romero wrote: > > > Hi Salil, Gavin, and folks, > > > > On 5/20/25 21:22, Gavin Shan wrote: > > > Hi Salil, > > > >

RE: [PATCH RFC V5 00/30] Support of Virtual CPU Hotplug for ARMv8 Arch

2025-05-22 Thread Salil Mehta via
HI Gavin, > -Original Message- > From: Gavin Shan > Sent: Thursday, May 22, 2025 12:54 AM > To: Gustavo Romero ; Salil Mehta > ; qemu-devel@nongnu.org; qemu- > a...@nongnu.org; m...@redhat.com; Jonathan Cameron > ; Igor Mammedov > ; Eric Auger [..] > > H

RE: [PATCH RFC V5 00/30] Support of Virtual CPU Hotplug for ARMv8 Arch

2025-05-22 Thread Salil Mehta via
Hi Gustavo, > From: Gustavo Romero > Sent: Wednesday, May 21, 2025 4:07 PM > To: Gavin Shan ; Salil Mehta > ; qemu-devel@nongnu.org; qemu- > a...@nongnu.org; m...@redhat.com; Jonathan Cameron > ; Igor Mammedov > ; Eric Auger [...] > > Hi Salil, Gavin, and folks, &

RE: [PATCH RFC V5 00/30] Support of Virtual CPU Hotplug for ARMv8 Arch

2025-05-22 Thread Salil Mehta via
Hi Gavin, Thanks for your email and sorry for the delay in reply as I was in transit and on annual leave since Monday. Please check my replies inline. Best regards Salil > From: Gavin Shan > Sent: Wednesday, May 21, 2025 1:22 AM > To: Salil Mehta ; qemu-devel@nongnu.or

[PATCH V2 2/3] Fix: CPUs presence logic in _STA for x86 backward compatability

2024-11-08 Thread Salil Mehta via
+} +Else +{ +Local0 = 0x0D +} } Reported-by: Igor Mammedov Message-ID: <20241106100047.18901...@imammedo.users.ipa.redhat.com> Signed-off-by: Salil Mehta --- hw/acpi/cpu.c

[PATCH V2 3/3] tests/qtest/bios-tables-test: Fix DSDT golden masters for x86/{pc, q35}

2024-11-08 Thread Salil Mehta via
If ((\_SB.PCI0.PRES.CPEN == One)) +{ +Local0 |= 0x0F } Release (\_SB.PCI0.PRES.CPLK) Reported-by: Igor Mammedov Message-ID: <20241106100047.18901...@imammedo.users.ipa.redhat.com> Signed-off-by: Salil Mehta --- tests/data/acpi/x86/pc/DSDT

[PATCH V2 1/3] qtest: allow ACPI DSDT Table changes

2024-11-08 Thread Salil Mehta via
list changed files in tests/qtest/bios-tables-test-allowed-diff.h Suggested-by: Igor Mammedov Message-ID: <20241106100047.18901...@imammedo.users.ipa.redhat.com> Signed-off-by: Salil Mehta --- tests/qtest/bios-tables-test-allowed-diff.h | 41 + 1 file changed, 41 inse

[PATCH V2 0/3] Fixes CPUs AML & acpi-bios-tables to be x86 backward compatible

2024-11-08 Thread Salil Mehta via
checking the `presence` of vCPUs dynamically (feedback from Igor Mammedov) Fixes [PULL 60/65], [PULL 61/65]: Message-ID: Message-ID: <4d62d15b11909e9af121577e707b88f2e4524371.1730754238.git@redhat.com> Salil Mehta (3): qtest: allow ACPI DSDT Table changes Fix: CPUs presence logic i

RE: [PATCH 2/3] Fix: Reverse CPUs presence check logic for x86 backward compatability

2024-11-07 Thread Salil Mehta via
Hi Igor, Many thanks for taking time to reply. > From: qemu-arm-bounces+salil.mehta=huawei@nongnu.org arm-bounces+salil.mehta=huawei@nongnu.org> On Behalf Of Igor > Mammedov > Sent: Thursday, November 7, 2024 4:57 PM > To: Salil Mehta > > On Wed, 6 No

RE: [PATCH 2/3] Fix: Reverse CPUs presence check logic for x86 backward compatability

2024-11-06 Thread Salil Mehta via
Hi Igor, Thanks for replying back and the reviews. Please find my replies inline. > From: Igor Mammedov > Sent: Wednesday, November 6, 2024 4:08 PM > To: Salil Mehta > > On Wed, 6 Nov 2024 14:45:42 + > Salil Mehta wrote: > > > Hi Igor, > &g

[PATCH 0/3] Fixes CPUs AML & acpi-bios-tables to be x86 backward compatible

2024-11-06 Thread Salil Mehta via
-ID: <4d62d15b11909e9af121577e707b88f2e4524371.1730754238.git@redhat.com> Salil Mehta (3): qtest: allow ACPI DSDT Table changes Fix: Reverse CPUs presence check logic for x86 backward compatability tests/qtest/bios-tables-test: Fix DSDT golden masters for x86/{pc,q35} hw/acpi

[PATCH 3/3] tests/qtest/bios-tables-test: Fix DSDT golden masters for x86/{pc, q35}

2024-11-06 Thread Salil Mehta via
-by: Igor Mammedov Message-ID: <20241106100047.18901...@imammedo.users.ipa.redhat.com> Signed-off-by: Salil Mehta --- tests/data/acpi/x86/pc/DSDT | Bin 8561 -> 8561 bytes tests/data/acpi/x86/pc/DSDT.acpierst | Bin 8472 -> 8472 bytes tests/data/acpi/x86/pc

[PATCH 1/3] qtest: allow ACPI DSDT Table changes

2024-11-06 Thread Salil Mehta via
list changed files in tests/qtest/bios-tables-test-allowed-diff.h Suggested-by: Igor Mammedov Message-ID: <20241106100047.18901...@imammedo.users.ipa.redhat.com> Signed-off-by: Salil Mehta --- tests/qtest/bios-tables-test-allowed-diff.h | 41 + 1 file changed, 41 inse

RE: [PATCH 2/3] Fix: Reverse CPUs presence check logic for x86 backward compatability

2024-11-06 Thread Salil Mehta via
Hi Igor, > From: qemu-arm-bounces+salil.mehta=huawei@nongnu.org arm-bounces+salil.mehta=huawei@nongnu.org> On Behalf Of Igor > Mammedov > Sent: Wednesday, November 6, 2024 1:57 PM > To: Salil Mehta > > On Wed, 6 Nov 2024 13:03:30 + > Salil Mehta

[PATCH 2/3] Fix: Reverse CPUs presence check logic for x86 backward compatability

2024-11-06 Thread Salil Mehta via
+} +Else +{ +Local0 = 0x0D +} } Suggested-by: Igor Mammedov Message-ID: <20241106100047.18901...@imammedo.users.ipa.redhat.com> Signed-off-by: Salil Mehta --- hw/acpi/cpu.

RE: [PULL 60/65] hw/acpi: Update ACPI `_STA` method with QOM vCPU ACPI Hotplug states

2024-11-06 Thread Salil Mehta via
HI Igor, Thank for you replying back. > From: qemu-devel-bounces+salil.mehta=huawei@nongnu.org devel-bounces+salil.mehta=huawei@nongnu.org> On Behalf Of Igor > Mammedov > Sent: Wednesday, November 6, 2024 9:01 AM > To: Salil Mehta > > On Tue, 5 Nov 2024 21

RE: [PATCH] arm/virt: Extract common code to wire GICC<->vCPU IRQs for reuse

2024-11-06 Thread Salil Mehta via
HI Peter, > From: Peter Maydell > Sent: Wednesday, November 6, 2024 1:01 PM > To: Salil Mehta > > On Tue, 5 Nov 2024 at 22:20, Salil Mehta wrote: > > > > HI Peter, > > > > > From: Peter Maydell > > > Sent: Monda

RE: [PATCH] arm/virt: Extract common code to wire GICC<->vCPU IRQs for reuse

2024-11-05 Thread Salil Mehta via
HI Peter, > From: Peter Maydell > Sent: Monday, November 4, 2024 1:27 PM > To: Salil Mehta > > On Sun, 3 Nov 2024 at 15:25, Salil Mehta wrote: > > > > Extract common GIC and CPU interrupt wiring code to improve code > > readability and modularity, supp

RE: [PATCH] hw/arm/virt: Move common vCPU properties in a function

2024-11-05 Thread Salil Mehta via
Hi Gavin, Thanks for the valuable comments. I will address them but it looks peter has already pulled ARM changes for this cycle? Thanks Salil. > From: Gavin Shan > Sent: Tuesday, November 5, 2024 12:01 AM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m..

RE: [PULL 60/65] hw/acpi: Update ACPI `_STA` method with QOM vCPU ACPI Hotplug states

2024-11-05 Thread Salil Mehta via
> From: Igor Mammedov > Sent: Tuesday, November 5, 2024 12:50 PM > To: Michael S. Tsirkin > Cc: qemu-devel@nongnu.org; Peter Maydell ; > Salil Mehta ; Ani Sinha ; > Eduardo Habkost ; Marcel Apfelbaum > ; Philippe Mathieu-Daudé > ; wangyanan (Y) ; Zhao > Liu

RE: [PATCH V3 0/5] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)

2024-11-04 Thread Salil Mehta via
HI Miguel, > From: Miguel Luis > Sent: Monday, November 4, 2024 12:55 PM > To: Salil Mehta > > Hi Salil, > > > On 3 Nov 2024, at 09:24, Salil Mehta via > wrote: > > > > Change Log > > == > > > > Patch V2 -> V3:

RE: [PATCH V1 1/4] hw/acpi: Initialize ACPI Hotplug CPU Status with Support for vCPU `Persistence`

2024-11-04 Thread Salil Mehta via
us. https://lore.kernel.org/qemu-devel/20241103102419.202225-1-salil.me...@huawei.com/ Many thanks! Best regards Salil. > From: Salil Mehta > Sent: Friday, November 1, 2024 10:54 AM > To: 'Igor Mammedov' ; Salil Mehta > > > Hi Igor, > > Thanks for r

[PATCH] arm/virt: Extract common code to wire GICC<->vCPU IRQs for reuse

2024-11-03 Thread Salil Mehta via
] Suggested-by: Miguel Luis [5/05/2024: Fix the total number of PPIs available as per ARM BSA to avoid overflow] Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/virt.c | 108 -- 1 file changed, 60 insertions

[PATCH] hw/intc/arm-gicv3*: Refactor GICv3 CPU reginfo to have common invocation

2024-11-03 Thread Salil Mehta via
* functional changes intended. Code has been tested to confirm correct initialization sequences across relevant scenarios. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/intc/arm_gicv3.c| 1 + hw/intc/arm_gicv3_cpuif.c

[PATCH] hw/arm/virt: Move common vCPU properties in a function

2024-11-03 Thread Salil Mehta via
cosmetic change only; *no* functional changes are intended here. Signed-off-by: Salil Mehta --- hw/arm/virt.c | 238 +- include/hw/arm/virt.h | 4 + 2 files changed, 147 insertions(+), 95 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c

RE: [PATCH V2 0/6] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)

2024-11-03 Thread Salil Mehta via
agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM) https://lore.kernel.org/qemu-devel/20241103102419.202225-1-salil.me...@huawei.com/#t Sorry for any inconvenience above might have caused. Best regards Salil. > -Original Message- > From: Salil Mehta > Sent:

[PATCH V3 2/5] qtest: allow ACPI DSDT Table changes

2024-11-03 Thread Salil Mehta via
list changed files in tests/qtest/bios-tables-test-allowed-diff.h Reported-by: Zhao Liu Signed-off-by: Salil Mehta --- tests/qtest/bios-tables-test-allowed-diff.h | 41 + 1 file changed, 41 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests

[PATCH V3 5/5] hw/acpi: Update GED with vCPU Hotplug VMSD for migration

2024-11-03 Thread Salil Mehta via
"ost_status": "0x" }, [...] { "is_inserting": false, "is_removing": false, "ost_event": "0x",

[PATCH V3 1/5] hw/acpi: Make CPUs ACPI `presence` conditional during vCPU hot-unplug

2024-11-03 Thread Salil Mehta via
-__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] Example implementation of architecture-specific CPU persistence hook Link: https://github.com/salil-mehta

[PATCH V3 4/5] tests/qtest/bios-tables-test: Update DSDT golden masters for x86/{pc, q35}

2024-11-03 Thread Salil Mehta via
f ((\_SB.PCI0.PRES.CPEN == One)) +{ +Local0 = 0x0F +} +Else +{ +Local0 = 0x0D +} } Release (\_SB.PCI0.PRES.CPLK) Reported-by:

[PATCH V3 3/5] hw/acpi: Update ACPI `_STA` method with QOM vCPU ACPI Hotplug states

2024-11-03 Thread Salil Mehta via
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 --- hw/acpi/cpu.c | 38

[PATCH V3 0/5] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)

2024-11-03 Thread Salil Mehta via
Architecture Agnostic ACPI changes patch-set: Repo: https://github.com/salil-mehta/qemu.git virt-cpuhp-armv8/rfc-v6.arch.agnostic.acpi.v3 Link: https://github.com/salil-mehta/qemu/commits/virt-cpuhp-armv8/rfc-v6.arch.agnostic.acpi.v3 (*) Works with upcoming ARM architecture specif

RE: [PATCH V1 1/4] hw/acpi: Initialize ACPI Hotplug CPU Status with Support for vCPU `Persistence`

2024-11-01 Thread Salil Mehta via
cle and drop the last patch? Arch agnostic ACPI V2 series: https://lore.kernel.org/qemu-devel/20241031200502.3869-1-salil.me...@huawei.com/T/#mf10104510269d5c290622a0471f0997ad058e397 Upcoming RFC V6, Support of Virtual CPU Hotplug for ARMv8 Arch Link: https://github.com/salil-mehta/qemu/commits/virt-c

[PATCH V2 6/6] hw/acpi: Update GED with vCPU Hotplug VMSD for migration

2024-10-31 Thread Salil Mehta via
se, "is_removing": false, "is_enabled": false, "ost_event": "0x", "ost_status": "0x" } ]

[PATCH V2 5/6] tests/qtest/bios-tables-test: Update DSDT golden masters for x86/{pc, q35}

2024-10-31 Thread Salil Mehta via
\_SB.PCI0.PRES.CPLK) Reported-by: Zhao Liu Signed-off-by: Salil Mehta --- 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 by

[PATCH V2 3/6] qtest: allow ACPI DSDT Table changes

2024-10-31 Thread Salil Mehta via
list changed files in tests/qtest/bios-tables-test-allowed-diff.h Reported-by: Zhao Liu Signed-off-by: Salil Mehta --- tests/qtest/bios-tables-test-allowed-diff.h | 41 + 1 file changed, 41 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests

[PATCH V2 4/6] hw/acpi: Update CPUs AML's `is_enabled` state in ACPI _STA method

2024-10-31 Thread Salil Mehta via
Update the CPUs AML code to reflect the ACPI CPU Hotplug `is_enabled` state in the `_STA.Enabled` Bit when the ACPI `_STA` method is evaluated by the Guest Kernel during initialization, as well as when vCPUs are hot-plugged or hot-unplugged. Signed-off-by: Salil Mehta Reviewed-by: Gustavo Romero

[PATCH V2 2/6] hw/acpi: Update ACPI CPU Hotplug state during vCPU hot(un)plug

2024-10-31 Thread Salil Mehta via
Update the `is_enabled` state in `AcpiCpuStatus` when vCPUs are hot-plugged or hot-unplugged. Signed-off-by: Salil Mehta Reviewed-by: Gustavo Romero --- hw/acpi/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 238a0edbc1..8940687f90 100644 --- a

[PATCH V2 1/6] hw/acpi: Introduce `is_enabled` state in ACPI CPU Hotplug Status

2024-10-31 Thread Salil Mehta via
Link: https://kvm-forum.qemu.org/2023/Challenges_Revisited_in_Supporting_Virt_CPU_Hotplug_-__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 Signed-off-by: Salil

[PATCH V2 0/6] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)

2024-10-31 Thread Salil Mehta via
hitecture 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

RE: [PATCH V1 0/4] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)

2024-10-22 Thread Salil Mehta via
Hi Igor, Thanks for taking time to review the series. Please find my replies inline. > From: qemu-devel-bounces+salil.mehta=huawei@nongnu.org devel-bounces+salil.mehta=huawei@nongnu.org> On Behalf Of Igor > Mammedov > Sent: Friday, October 18, 2024 3:46 PM >

RE: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states in ACPI _STA.{PRES,ENA} Bits

2024-10-22 Thread Salil Mehta via
Hi Gustavo, > From: Gustavo Romero > Sent: Monday, October 21, 2024 3:10 AM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com > > Hi Salil, > > On 10/14/24 16:22, Salil Mehta wrote: > > Reflect the ACPI CPU hotplug `is_{pr

RE: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states in ACPI _STA.{PRES,ENA} Bits

2024-10-22 Thread Salil Mehta via
Hi Igor, > From: Igor Mammedov > Sent: Friday, October 18, 2024 3:25 PM > To: Salil Mehta > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; m...@redhat.com; > m...@kernel.org; jean-phili...@linaro.org; Jonathan Cameron > ; lpieral...@kernel.org; > peter.mayd...@linar

RE: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states in ACPI _STA.{PRES,ENA} Bits

2024-10-22 Thread Salil Mehta via
> From: Igor Mammedov > Sent: Friday, October 18, 2024 3:19 PM > To: Zhao Liu > Cc: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com; m...@kernel.org; jean- > phili...@linaro.org; Jonathan Cameron > ; lpieral...@kernel.org; >

RE: [PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present,enabled} states in ACPI _STA.{PRES,ENA} Bits

2024-10-22 Thread Salil Mehta via
Hi Zhao, Sorry, for the late reply. I was away last week with only intermittent access to the mails. > From: Zhao Liu > Sent: Friday, October 18, 2024 6:13 AM > To: Salil Mehta > > Hi Salil, > > On Mon, Oct 14, 2024 at 08:22:04PM +0100, Salil Mehta wrote: >

RE: [PATCH V1 4/4] hw/acpi: Populate vCPU Hotplug VMSD to migrate `is_{present,enabled}` states

2024-10-22 Thread Salil Mehta via
Hi Igor, > From: Igor Mammedov > Sent: Friday, October 18, 2024 3:31 PM > To: Salil Mehta > > On Mon, 14 Oct 2024 20:22:05 +0100 > Salil Mehta wrote: > > > The ACPI CPU hotplug states `is_{present, enabled}` must be migrated > > alongside other vCPU

RE: [PATCH V1 2/4] hw/acpi: Update ACPI CPU Status `is_{present, enabled}` during vCPU hot(un)plug

2024-10-22 Thread Salil Mehta via
Hi Igor, > From: Igor Mammedov > Sent: Friday, October 18, 2024 3:18 PM > To: Salil Mehta > > On Mon, 14 Oct 2024 20:22:03 +0100 > Salil Mehta wrote: > > > Update the `AcpiCpuStatus` for `is_enabled` and `is_present` > > accordingly when vCPUs

Re: [PATCH V1 1/4] hw/acpi: Initialize ACPI Hotplug CPU Status with Support for vCPU `Persistence`

2024-10-21 Thread Salil Mehta
Hi Igor, Thanks for taking time to review and sorry for not being prompt. I was in transit due to some difficult personal situation. On Fri, Oct 18, 2024 at 3:11 PM Igor Mammedov wrote: > On Mon, 14 Oct 2024 20:22:02 +0100 > Salil Mehta wrote: > > > Certain CPU architecture sp

Re: [PATCH V1 1/4] hw/acpi: Initialize ACPI Hotplug CPU Status with Support for vCPU `Persistence`

2024-10-21 Thread Salil Mehta
Hi Gustavo On Thu, Oct 17, 2024 at 9:25 PM Gustavo Romero wrote: > Hi Salil, > > On 10/14/24 16:22, Salil Mehta wrote: > > Certain CPU architecture specifications [1][2][3] prohibit changes to CPU > > presence after the kernel has booted. This limitation exists

Re: [PATCH V1 1/4] hw/acpi: Initialize ACPI Hotplug CPU Status with Support for vCPU `Persistence`

2024-10-21 Thread Salil Mehta
Hi Gavin, On Thu, Oct 17, 2024 at 6:27 AM Gavin Shan wrote: > On 10/15/24 5:22 AM, Salil Mehta wrote: > > Certain CPU architecture specifications [1][2][3] prohibit changes to CPU > > presence after the kernel has booted. This limitation exists because > many system > >

Re: [PATCH V1 1/4] hw/acpi: Initialize ACPI Hotplug CPU Status with Support for vCPU `Persistence`

2024-10-21 Thread Salil Mehta
HI Gustavo, On Wed, Oct 16, 2024 at 10:01 PM Gustavo Romero wrote: > Hi Salil, > > On 10/14/24 16:22, Salil Mehta wrote: > > Certain CPU architecture specifications [1][2][3] prohibit changes to CPU > > presence after the kernel has booted. This limitation exists

Re: [PATCH RFC V5 00/30] Support of Virtual CPU Hotplug for ARMv8 Arch

2024-10-21 Thread Salil Mehta
Hi Miguel, On Wed, Oct 16, 2024 at 3:09 PM Miguel Luis wrote: > Hi Salil, > > > On 15 Oct 2024, at 09:59, Salil Mehta wrote: > > > > PROLOGUE > > > > > > To assist in review and set the right expectations from this RFC, please > first &

Re: [PATCH RFC V5 00/30] Support of Virtual CPU Hotplug for ARMv8 Arch

2024-10-21 Thread Salil Mehta
Hi Gavin, Sorry for the late reply. I had to travel outside the UK urgently because of some personal challenging situation. I'm still on the transit back to the UK hence replying from my other email ID.. On Thu, Oct 17, 2024 at 8:07 AM Gavin Shan wrote: > Hi Salil, > > The issues reported again

RE: [PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan

2024-10-15 Thread Salil Mehta via
Hi Igor, > From: Igor Mammedov > Sent: Tuesday, October 15, 2024 3:34 PM > To: Salil Mehta > > On Tue, 15 Oct 2024 09:41:24 + > Salil Mehta wrote: > > > HI Igor, > > > > > From: Igor Mammedov > > > Sent: Tuesday, October 15

RE: [PATCH V1 0/4] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)

2024-10-15 Thread Salil Mehta via
HI Bibo, > From: maobibo > Sent: Tuesday, October 15, 2024 4:31 AM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com > > With cpu-add/cpu-del command tested on LoongArch system, no migration > tested. There is no negative influen

[PATCH RFC V5 30/30] hw/arm/virt: Expose cold-booted vCPUs as MADT GICC *Enabled*

2024-10-15 Thread Salil Mehta via
//uefi.org/sites/default/files/resources/ACPI_Spec_6_5_Aug29.pdf (Pages 138, 140) Signed-off-by: Salil Mehta --- hw/arm/virt.c | 16 include/hw/core/cpu.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 15d9c2d8ac..d1172151be 100644

[PATCH RFC V5 29/30] hw/intc/arm_gicv3_kvm: Pause all vCPU to ensure locking in KVM of resetting vCPU

2024-10-15 Thread Salil Mehta via
fail if KVM is unable to acquire the necessary locks on all vCPUs. Therefore, to ensure proper locking of the vCPU being reset and prevent failures, we need to *pause all vCPUs* during this operation to facilitate successful locking within the host. Signed-off-by: Salil Mehta --- hw/intc

[PATCH RFC V5 26/30] hw/intc/arm_gicv3_common: Add GICv3CPUState 'accessible' flag migration handling

2024-10-15 Thread Salil Mehta via
tion or override the destination QEMU’s vCPU configuration to match the source. We have adopted the latter approach as a mitigation for the mismatch. Nonetheless, the administrator should still ensure that the number of possible QOM vCPUs is consistent at both ends. Signed-off-by: Salil

[PATCH RFC V5 28/30] target/arm/kvm: Write vCPU's state back to KVM on cold-reset

2024-10-15 Thread Salil Mehta via
trigger a call to `kvm_arch_put_registers()`. This guarantees that KVM’s `MP_STATE` is updated accordingly, forcing synchronization of the `mp_state` between QEMU and KVM. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Salil Mehta --- target/arm/kvm.c | 7 +++ 1 file changed, 7 insertion

[PATCH RFC V5 27/30] target/arm/kvm, tcg: Handle SMCCC hypercall exits in VMM during PSCI_CPU_{ON, OFF}

2024-10-15 Thread Salil Mehta via
From: Author Salil Mehta To support vCPU hotplug, we must trap any `HVC`/`SMC` `PSCI_CPU_{ON,OFF}` hypercalls from the host KVM to QEMU for policy checks. This ensures the following when a vCPU is brought online: 1. The vCPU is actually plugged in (i.e., present). 2. The vCPU is not disabled

[PATCH RFC V5 25/30] tcg/mttcg: Introduce MTTCG thread unregistration leg

2024-10-15 Thread Salil Mehta via
From: Miguel Luis Introduce the TCG thread unregistration leg which shall be called in context to TCG/vCPU unrealize. Reported-by: Salil Mehta Signed-off-by: Miguel Luis Signed-off-by: Salil Mehta --- accel/tcg/tcg-accel-ops-mttcg.c | 1 + include/tcg/startup.h | 7 +++ tcg

[PATCH RFC V5 24/30] target/arm: Add support to *unrealize* ARMCPU during vCPU Hot-unplug

2024-10-15 Thread Salil Mehta via
vCPUs are not destroyed in host KVM rather their Qemu context is parked at the QEMU KVM layer. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta Reported-by: Vishnu Pajjuri [VP: Identified CPU stall issue & suggested probable fix] Signed-off-by: Salil M

[PATCH RFC V5 20/30] hw/arm: Changes required for reset and to support next boot

2024-10-15 Thread Salil Mehta via
Updates the firmware config with the next boot cpus information and also registers the reset callback to be called when guest reboots to reset the cpu. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/boot.c | 2 +- hw/arm/virt.c

[PATCH RFC V5 23/30] tcg: Update tcg_register_thread() leg to handle region alloc for hotplugged vCPU

2024-10-15 Thread Salil Mehta via
. Reported-by: Miguel Luis Signed-off-by: Miguel Luis Signed-off-by: Salil Mehta --- accel/tcg/tcg-accel-ops-mttcg.c | 2 +- accel/tcg/tcg-accel-ops-rr.c| 2 +- include/tcg/startup.h | 6 ++ include/tcg/tcg.h | 1 + tcg/region.c| 14

[PATCH RFC V5 22/30] target/arm/cpu: Check if hotplugged ARM vCPU's FEAT match existing

2024-10-15 Thread Salil Mehta via
The ARM extensions configuration *must* match the existing vCPUs already initialized in KVM at VM initialization. ARM does not allow any per-vCPU features to be changed once the system has fully initialized. This is an immutable constraint of the ARM CPU architecture. Signed-off-by: Salil Mehta

[PATCH RFC V5 21/30] arm/virt: Update the guest(via GED) about vCPU hot-(un)plug events

2024-10-15 Thread Salil Mehta via
-(un)plug event for the *targeted* vCPU. Introduce the required ACPI calls into the existing hot-(un)plug hooks, allowing ACPI GED events to be triggered from QEMU to the guest VM. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/virt.c | 39

[PATCH RFC V5 19/30] hw/arm, gicv3: Changes to notify GICv3 CPU state with vCPU hot-(un)plug event

2024-10-15 Thread Salil Mehta via
: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/virt.c | 31 ++- hw/intc/arm_gicv3_common.c | 60 +- include/hw/arm/virt.h | 1 + include/hw/intc/arm_gicv3_common.h | 23 4 files changed, 112 insertions

[PATCH RFC V5 18/30] arm/virt: Changes to (un)wire GICC<->vCPU IRQs during hot-(un)plug

2024-10-15 Thread Salil Mehta via
g cases. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta Reported-by: Vishnu Pajjuri [4/05/2024: Issue with total number of PPI available during create GIC] Suggested-by: Miguel Luis [5/05/2024: Fix the total number of PPIs available as per ARM BSA to avoid overflow] S

[PATCH RFC V5 17/30] arm/virt: Add/update basic hot-(un)plug framework

2024-10-15 Thread Salil Mehta via
ace. 4. Updating the guest with next boot information for this vCPU in the firmware. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/virt.c | 104 ++ 1 file changed, 104 insertions(+) diff --git a/

[PATCH RFC V5 16/30] target/arm: Force ARM vCPU *present* status ACPI *persistent*

2024-10-15 Thread Salil Mehta via
://bugzilla.tianocore.org/show_bug.cgi?id=4481#c5 Signed-off-by: Salil Mehta --- target/arm/cpu64.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index d2f4624d61..c2af6a28f5 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -797,6 +797,13

[PATCH RFC V5 15/30] hw/arm/acpi: MADT Tbl change to size the guest with possible vCPUs

2024-10-15 Thread Salil Mehta via
/ACPI/6.5/05_ACPI_Software_Programming_Model.html#gic-cpu-interface-gicc-structure Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/virt-acpi-build.c | 36 ++-- include/hw/acpi/cpu.h| 19 +++ 2 files

[PATCH RFC V5 13/30] arm/virt/acpi: Update ACPI DSDT Tbl to include CPUs AML with hotplug support

2024-10-15 Thread Salil Mehta via
} \_SB.GED.CSCN () } } } Device (PWRB) { [...] } } Signed-off-by: Salil Mehta --- hw/arm/virt-acpi-build.c | 33 +++-- 1 file changed, 23 insertions(+), 10

[PATCH RFC V5 14/30] hw/acpi: Make _MAT method optional

2024-10-15 Thread Salil Mehta via
f-by: Jean-Philippe Brucker Reviewed-by: Gavin Shan Signed-off-by: Salil Mehta --- hw/acpi/cpu.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index d34c1e601e..2cbeedffe8 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -731,10 +731,

[PATCH RFC V5 12/30] arm/virt: Release objects for *disabled* possible vCPUs after init

2024-10-15 Thread Salil Mehta via
old ARMCPU object instead of creating a new one for the hotplug request. Each of these approaches has its own pros and cons. This prototype uses the first approach (suggestions are welcome!). Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/v

[PATCH RFC V5 11/30] arm/virt: Init PMU at host for all possible vCPUs

2024-10-15 Thread Salil Mehta via
until the ARM specification is updated to allow otherwise. Past discussion for reference: Link: https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg00131.html Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/virt.c | 9 + include

[PATCH RFC V5 10/30] arm/virt: Enhance GED framework to handle vCPU hotplug events

2024-10-15 Thread Salil Mehta via
the Guest Kernel. Signed-off-by: Salil Mehta Reviewed-by: Gavin Shan --- hw/arm/virt.c | 5 - include/hw/arm/virt.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 00fd65b4e1..b9df428049 100644 --- a/hw/arm/virt.c +++ b/hw/arm

[PATCH RFC V5 09/30] arm/acpi: Enable ACPI support for vCPU hotplug

2024-10-15 Thread Salil Mehta via
compatible with ARM64.) Enable the ACPI support switch for vCPU hotplug feature. Actual ACPI changes required will follow in subsequent patches. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff

[PATCH RFC V5 08/30] hw/intc/arm-gicv3*: Changes required to (re)init the GICv3 vCPU Interface

2024-10-15 Thread Salil Mehta via
: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/intc/arm_gicv3.c| 1 + hw/intc/arm_gicv3_cpuif.c | 245 ++--- hw/intc/arm_gicv3_cpuif_common.c | 13 ++ hw/intc/arm_gicv3_kvm.c| 14 +- hw/intc

[PATCH RFC V5 05/30] arm/virt, kvm: Pre-create KVM vCPUs for all unplugged QOM vCPUs @machine init

2024-10-15 Thread Salil Mehta via
Signed-off-by: Salil Mehta Reported-by: Vishnu Pajjuri [VP: Identified CPU stall issue & suggested probable fix] --- hw/arm/virt.c | 74 ++- include/hw/core/cpu.h | 1 + target/arm/cpu64.c| 9 ++ target/arm/kvm.c

[PATCH RFC V5 07/30] arm/virt, gicv3: Introduce GICv3 CPU Interface *accessibility* flag and checks

2024-10-15 Thread Salil Mehta via
QOM vCPUs. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- cpu-common.c | 11 + hw/arm/virt.c | 1 + hw/intc/arm_gicv3_common.c | 14 --- hw/intc/arm_gicv3_cpuif.c | 8 +++ hw

[PATCH RFC V5 06/30] arm/virt, gicv3: Changes to pre-size GIC with possible vCPUs @machine init

2024-10-15 Thread Salil Mehta via
initialized with the `mp_affinity` and CPU interface number associations, which cannot be altered after initialization. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/virt.c | 15 --- include/hw/arm/virt.h | 2 +- 2 files changed

[PATCH RFC V5 04/30] arm/virt, target/arm: Machine init time change common to vCPU {cold|hot}-plug

2024-10-15 Thread Salil Mehta via
machine initialization. Reported-by: Gavin Shan [GS: pointed the assertion due to wrong range check in cpu_pre_plug phase] Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/virt.c | 90 ++- include/hw/arm

[PATCH RFC V5 01/30] arm/virt, target/arm: Add new ARMCPU {socket, cluster, core, thread}-id property

2024-10-15 Thread Salil Mehta via
This shall be used to store user specified topology{socket,cluster,core,thread} and shall be converted to a unique 'vcpu-id' which is used as slot-index during hot(un)plug of vCPU. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta --- hw/arm/virt.c

[PATCH RFC V5 00/30] Support of Virtual CPU Hotplug for ARMv8 Arch

2024-10-15 Thread Salil Mehta via
https://www.youtube.com/watch?v=hyrw4j2D6I0&t=23970s https://kvm-forum.qemu.org/2023/talk/9SMPDQ/ b. KVMForum 2020 - Challenges in Supporting Virtual CPU Hotplug on SoC Based Systems (like ARM64) - Salil Mehta, Huawei. https://kvmforum2020.sched.com/event/eE4m (VI) Commands Used =

[PATCH RFC V5 03/30] hw/arm/virt: Move setting of common vCPU properties in a function

2024-10-15 Thread Salil Mehta via
Factor out vCPU properties code common for {hot,cold}-plugged vCPUs in the machvirt_init(). This allows code reuse. Signed-off-by: Salil Mehta --- hw/arm/virt.c | 219 ++ include/hw/arm/virt.h | 4 + 2 files changed, 139 insertions(+), 84

[PATCH RFC V5 02/30] hw/arm/virt: Disable vCPU hotplug for *unsupported* Accel or GIC Type

2024-10-15 Thread Salil Mehta via
this machine. Signed-off-by: Salil Mehta --- hw/arm/virt.c | 66 +-- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 8ff7e109dd..827a796ed6 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2108,8

RE: [PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan

2024-10-15 Thread Salil Mehta via
HI Igor, > From: Igor Mammedov > Sent: Tuesday, October 15, 2024 10:31 AM > To: Salil Mehta > Cc: maobibo ; qemu-devel@nongnu.org; Michael > S. Tsirkin ; Peter Maydell ; > zhukeqian ; Jonathan Cameron > ; Gavin Shan ; > Vishnu Pajjuri ; Xianglai Li > ; Mig

RE: [PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan

2024-10-15 Thread Salil Mehta via
Hi Bibo, > From: maobibo > Sent: Tuesday, October 15, 2024 2:20 AM > To: Salil Mehta ; qemu-devel@nongnu.org > > Hi Salil, > > On 2024/10/15 上午3:59, Salil Mehta wrote: > > Hi Bibo, > > > >> From: maobibo > >> Sent: Mond

RE: [PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan

2024-10-14 Thread Salil Mehta via
method = aml_method(event_handler_method, 0, > AML_NOTSERIALIZED); > > aml_append(method, aml_call0("\\_SB.CPUS." CPU_SCAN_METHOD)); > > aml_append(table, method); > > > > It seems that CPU scanning method name is not consistent between >

RE: [PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan

2024-10-14 Thread Salil Mehta via
Hi Bibo, > From: maobibo > Sent: Monday, October 14, 2024 9:53 AM > To: qemu-devel@nongnu.org; Salil Mehta > Cc: Michael S. Tsirkin ; Peter Maydell > ; Salil Mehta ; > zhukeqian ; Jonathan Cameron > ; Gavin Shan ; > Vishnu Pajjuri ; Xianglai Li > ; Miguel Lui

[PATCH V1 4/4] hw/acpi: Populate vCPU Hotplug VMSD to migrate `is_{present, enabled}` states

2024-10-14 Thread Salil Mehta via
"is_enabled": false, "ost_event": "0x", "ost_status": "0x" }, { "is_inserting": false, "is_removing": false,

[PATCH V1 2/4] hw/acpi: Update ACPI CPU Status `is_{present, enabled}` during vCPU hot(un)plug

2024-10-14 Thread Salil Mehta via
Update the `AcpiCpuStatus` for `is_enabled` and `is_present` accordingly when vCPUs are hot-plugged or hot-unplugged, taking into account the *persistence* of the vCPUs. Signed-off-by: Salil Mehta --- hw/acpi/cpu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/acpi/cpu.c b/hw

[PATCH V1 3/4] hw/acpi: Reflect ACPI vCPU {present, enabled} states in ACPI _STA.{PRES, ENA} Bits

2024-10-14 Thread Salil Mehta via
be deliberately *simulated* at the ACPI level to maintain a *persistent* view of vCPUs for the guest kernel. Signed-off-by: Salil Mehta --- hw/acpi/cpu.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 700aa855e9

[PATCH V1 1/4] hw/acpi: Initialize ACPI Hotplug CPU Status with Support for vCPU `Persistence`

2024-10-14 Thread Salil Mehta via
://kvmforum2020.sched.com/event/eE4m [3] Check comment 5 in the bugzilla entry Link: https://bugzilla.tianocore.org/show_bug.cgi?id=4481#c5 Signed-off-by: Salil Mehta --- cpu-target.c | 1 + hw/acpi/cpu.c | 35 ++- include/hw/acpi/cpu.h | 21

[PATCH V1 0/4] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)

2024-10-14 Thread Salil Mehta via
Discussion) Link: https://lore.kernel.org/qemu-devel/20240715155436.577d3...@imammedo.users.ipa.redhat.com/ [6] Upcoming RFC V5, Support of Virtual CPU Hotplug for ARMv8 Arch Link: https://github.com/salil-mehta/qemu/commits/virt-cpuhp-armv8/rfc-v5 Salil Mehta (4): hw/acpi: Initialize AC

RE: [PATCH RFC V4 02/33] cpu-common: Add common CPU utility for possible vCPUs

2024-10-11 Thread Salil Mehta via
HI Miguel, > From: Miguel Luis > Sent: Thursday, October 10, 2024 3:47 PM > To: Salil Mehta > > Hi Salil, > > > On 9 Oct 2024, at 03:17, Salil Mehta wrote: > > > > This patch adds various utility functions that may be required to > > fetc

[PATCH RFC V4 33/33] hw/arm/virt: Expose cold-booted vCPUs as MADT GICC *Enabled*

2024-10-08 Thread Salil Mehta via
//uefi.org/sites/default/files/resources/ACPI_Spec_6_5_Aug29.pdf (Pages 138, 140) Signed-off-by: Salil Mehta --- hw/arm/virt.c | 16 include/hw/core/cpu.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 5d440f9121..208f4ecfe1 100644

[PATCH RFC V4 31/33] target/arm/kvm: Write vCPU's state back to KVM on cold-reset

2024-10-08 Thread Salil Mehta via
trigger a call to `kvm_arch_put_registers()`. This guarantees that KVM’s `MP_STATE` is updated accordingly, forcing synchronization of the `mp_state` between QEMU and KVM. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Salil Mehta --- target/arm/kvm.c | 7 +++ 1 file changed, 7 insertion

[PATCH RFC V4 32/33] hw/intc/arm_gicv3_kvm: Pause all vCPU to ensure locking in KVM of resetting vCPU

2024-10-08 Thread Salil Mehta via
fail if KVM is unable to acquire the necessary locks on all vCPUs. Therefore, to ensure proper locking of the vCPU being reset and prevent failures, we need to *pause all vCPUs* during this operation to facilitate successful locking within the host. Signed-off-by: Salil Mehta --- hw/intc

[PATCH RFC V4 30/33] target/arm/kvm, tcg: Handle SMCCC hypercall exits in VMM during PSCI_CPU_{ON, OFF}

2024-10-08 Thread Salil Mehta via
From: Author Salil Mehta To support vCPU hotplug, we must trap any `HVC`/`SMC` `PSCI_CPU_{ON,OFF}` hypercalls from the host KVM to QEMU for policy checks. This ensures the following when a vCPU is brought online: 1. The vCPU is actually plugged in (i.e., present). 2. The vCPU is not disabled

  1   2   3   4   5   6   7   >