Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-18 Thread Kirill A. Shutemov
On Fri, Jun 14, 2024 at 09:06:30AM -0500, Tom Lendacky wrote: > On 6/13/24 09:56, Borislav Petkov wrote: > > On Thu, Jun 13, 2024 at 04:41:00PM +0300, Kirill A. Shutemov wrote: > > > It is easy enough to do. See the patch below. > > > > Thanks, will have a look. > > > > > But I am not sure if I

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-14 Thread Tom Lendacky
On 6/13/24 09:56, Borislav Petkov wrote: On Thu, Jun 13, 2024 at 04:41:00PM +0300, Kirill A. Shutemov wrote: It is easy enough to do. See the patch below. Thanks, will have a look. But I am not sure if I can justify it properly. If someone doesn't really need 5-level paging, disabling it at

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-13 Thread Borislav Petkov
On Thu, Jun 13, 2024 at 04:41:00PM +0300, Kirill A. Shutemov wrote: > It is easy enough to do. See the patch below. Thanks, will have a look. > But I am not sure if I can justify it properly. If someone doesn't really > need 5-level paging, disabling it at compile-time would save ~34K of >

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-13 Thread Kirill A. Shutemov
On Wed, Jun 12, 2024 at 11:29:43AM +0200, Borislav Petkov wrote: > > > And since we're talking cleanups, there's another thing I've been > > > looking at critically: CONFIG_X86_5LEVEL. Maybe it is time to get rid of > > > it and make the 5level stuff unconditional. And get rid of a bunch of > > >

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-12 Thread Borislav Petkov
On Wed, Jun 12, 2024 at 12:24:30PM +0300, Kirill A. Shutemov wrote: > I will try to deliver it in timely manner. :-P > > Yeah, we have a bunch of different pagetable manipulating things, all > > with their peculiarities and unifying them and having a good set of APIs > > which everything else

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-12 Thread Kirill A. Shutemov
On Tue, Jun 11, 2024 at 09:46:53PM +0200, Borislav Petkov wrote: > On Tue, Jun 11, 2024 at 06:47:05PM +0300, Kirill A. Shutemov wrote: > > Borislav, given this code deduplication effort is not trivial, maybe we > > can do it as a separate patchset on top of this one? > > Sure, as long as it gets

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-11 Thread Borislav Petkov
On Tue, Jun 11, 2024 at 06:47:05PM +0300, Kirill A. Shutemov wrote: > Borislav, given this code deduplication effort is not trivial, maybe we > can do it as a separate patchset on top of this one? Sure, as long as it gets done and doesn't get delayed indefinitely by new and more important

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-11 Thread Kirill A. Shutemov
On Mon, Jun 10, 2024 at 05:01:55PM +0300, Kirill A. Shutemov wrote: > On Mon, Jun 10, 2024 at 03:40:20PM +0200, Borislav Petkov wrote: > > On Fri, Jun 07, 2024 at 06:14:28PM +0300, Kirill A. Shutemov wrote: > > > I was able to address this issue by switching cpa_lock to a mutex. > > > However,

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-10 Thread Kirill A. Shutemov
On Mon, Jun 10, 2024 at 03:40:20PM +0200, Borislav Petkov wrote: > On Fri, Jun 07, 2024 at 06:14:28PM +0300, Kirill A. Shutemov wrote: > > I was able to address this issue by switching cpa_lock to a mutex. > > However, this solution will only work if the callers for set_memory > > interfaces

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-10 Thread Borislav Petkov
On Fri, Jun 07, 2024 at 06:14:28PM +0300, Kirill A. Shutemov wrote: > I was able to address this issue by switching cpa_lock to a mutex. > However, this solution will only work if the callers for set_memory > interfaces are not called from an atomic context. I need to verify if > this is

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-07 Thread Kirill A. Shutemov
On Mon, Jun 03, 2024 at 10:39:30AM +0200, Borislav Petkov wrote: > > +/* > > + * Make sure asm_acpi_mp_play_dead() is present in the identity mapping at > > + * the same place as in the kernel page tables. asm_acpi_mp_play_dead() > > switches > > + * to the identity mapping and the function has

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-06-03 Thread Borislav Petkov
On Tue, May 28, 2024 at 12:55:21PM +0300, Kirill A. Shutemov wrote: > MADT Multiprocessor Wakeup structure version 1 brings support of CPU s/of /for / > offlining: BIOS provides a reset vector where the CPU has to jump to > for offlining itself. The new TEST mailbox command can be used to test >

[PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

2024-05-28 Thread Kirill A. Shutemov
MADT Multiprocessor Wakeup structure version 1 brings support of CPU offlining: BIOS provides a reset vector where the CPU has to jump to for offlining itself. The new TEST mailbox command can be used to test whether the CPU offlined itself which means the BIOS has control over the CPU and can