Hi Russel,
From: Russell King [mailto:linux@armlinux.org.uk] Sent: Friday, October 21, 2022 8:39 AM To: Salil Mehta salil.mehta@huawei.com Cc: James Morse james.morse@arm.com; Joyce Qi joyce.qi@linaro.org; Jonathan Cameron jonathan.cameron@huawei.com; Lorenzo Pieralisi lorenzo.pieralisi@linaro.org; Jean-Philippe Brucker jean-philippe@linaro.org; Jean-Philippe Brucker jean-philippe.brucker@arm.com; linaro-open-discussions@op-lists.linaro.org; salil.mehta@opnsrc.net; mehta.salil.lnk@gmail.com Subject: Re: Linaro-open-discussions Digest, Vol 25, Issue 3
Hi,
On Fri, Oct 21, 2022 at 12:28:23AM +0000, Salil Mehta wrote:
Hi James, It totally skipped my mind earlier to mention that apart from what I have already shared through the below repositories, and as discussed in early September
on LOD,
I have also been experimenting with another approach (nothing new but something similar and based on yours and JPBs suggestion) for VCPU Hotplug. It is a non-ACPI version and banks upon trapping KVM Host PSCI to user space (i.e. CPU_ON, CPU_OFF etc.) to let QEMU make the decisions i.e. whether CPUs could be made
online
or not.
This is fine if the guest hasn't already brought the vCPU online, but if it has, blocking CPU_ON doesn't prevent the guest continuing to use the vCPU.
[Sorry for the delayed reply and I did not make myself very clear while I wrote above. This is not my approach. In fact, originally this primitive approach[1] was used as a workaround of not having ACPI support for vCPU Hotplug on ARM64]
That is correct. That is a problem if we do not use ACPI and has been discussed earlier. To address this in non-ACPI, people have been using out-of-the-band notification using gRPC[1] to the guest to bring down the vCPUs which itself is plagued with many problems.
Now, because James added code to trap the PSCI-to-userspace calls, I just thought to give it another go but I must admit I could not find a cleaner way to address the problem you mentioned.
[1] Reference: https://github.com/kata-containers/runtime/issues/1262
Thanks Salil