On Fri, Feb 24, 2023 at 07:22:18AM -0800, Dave Hansen wrote: > On 2/24/23 06:30, Kirill A. Shutemov wrote: > > Ideally, it has to be addressed on BIOS level: it has to provide a way to > > offline CPUs, putting it back to pre-wakeup state. > > Is there anything stopping us from just parking the CPUs in a loop > looking at 'acpi_mp_wake_mailbox_paddr'? Basically park them in a way > which is indistinguishable from what the BIOS did. +Rafael. - Forward compatibility can be an issue. Version 0 of mailbox supports only single Wakeup command. Future specs may define a new command that kernel implementation doesn't support. - BIOS owns the mailbox page and can re-use for something else after the last CPU has woken up. (I know it is very theoretical, but still.) - We can patch ACPI table to point to mailbox page in kernel allocated memory, but it brings other problem. If the first kernel didn't wake up all CPUs for some reason (CONFIG_SMP=n or nr_cpus= or something) the second kernel would not be able to wake up them too since they looping around the old address. But ultimately, I think it is clearly missing BIOS functionality and has to be addressed there. Hacking around it in kernel will lead to more problems down the road. -- Kiryl Shutsemau / Kirill A. Shutemov _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec