Hi Russell, Salil,
On 21/10/2022 08:38, Russell King (Oracle) wrote:
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.
Er, ... this is how it is expected to work. CPU_ON had 'Denied' added to allow firmware to apply some policy to which CPUs can be brought online.
There are two aspects to the ACPI changes. One is to tell the OS that the policy has changed, and it should try to bring CPUs online. This is required to make the use-case work. If the udev triggers don't occur when the policy change, this whole exercise is futile. The other is the online-capable bit in the MADT. This is because other operating systems may not be tolerant to PSCI returning errors. (although: it has always been able to do this).
I don't think you can remove the ACPI bits.
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. How would that aspect be addressed with your approach?
CPU_ON shouldn't block, but can (now) return DENIED if the firmware policy means the CPU is "pretend not-present". The cover-letter for the early-RFC series has more details: https://op-lists.linaro.org/archives/list/linaro-open-discussions@op-lists.l...
I'm fine with 2pm UK time on the first of November. If I get the MPAM series out today, I'll have time to work on this thing next week. (I think I've found a volunteer to test the Kubernetes stuff with it)
Thanks,
James