Hi Russell,
On 21/10/2022 12:37, Russell King (Oracle) wrote:
On Fri, Oct 21, 2022 at 10:45:48AM +0100, James Morse wrote:
Hi Russell, Salil,
On 21/10/2022 08:38, Russell King (Oracle) wrote:
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".
That is what I meant. Not "block" as in "wait until something".
Sorry - I read that wrong! (I've been in lockdep hell all morning).
ACPI already has mechanisms for this. The _STA value/policy can only change when the CPU is offline. If firmware wants request a CPU is taken offline, it can issue a eject-request notification. If the OS will then take the CPU offline, and call _EJ0 to say its done, as well as updating _OST with its progress.
There is no mechanism to forcibly offline a running CPU.
Thanks,
James