Re: [PATCH 1/3] kexec_load: Use new kexec flag for hotplug support

2024-06-10 Thread Hari Bathini
On 22/05/24 6:43 pm, Sourabh Jain wrote: Kernel commit 79365026f869 (crash: add a new kexec flag for hotplug support) has introduced a new kexec flag to generalize hotplug support. The newly introduced kexec flags for hotplug allow architectures to exclude all the required kexec segments from

Re: [PATCH 3/3] doc/hotplug: update man and --help

2024-06-10 Thread Hari Bathini
On 22/05/24 6:43 pm, Sourabh Jain wrote: Update the man page and --help option to make the description of the --hotplug option easier to understand. Cc: Aditya Gupta Cc: Baoquan He Cc: Coiby Xu Cc: Hari Bathini Cc: Mahesh Salgaonkar Signed-off-by: Sourabh Jain --- kexec/kexec.8 | 8 ++

Re: [PATCH 2/3] powerpc/kexec_load: add hotplug support

2024-06-10 Thread Hari Bathini
On 22/05/24 6:43 pm, Sourabh Jain wrote: Kernel commits b741092d5976 ("powerpc/crash: add crash CPU hotplug support") and 849599b702ef ("powerpc/crash: add crash memory hotplug support") added crash CPU/Memory hotplug support on PowerPC. This patch extends that support for the kexec_load sysca

[PATCH v6 00/10] x86/sev: KEXEC/KDUMP support for SEV-ES guests

2024-06-10 Thread vsntk18
From: Vasant Karasulli Hi, here are changes to enable kexec/kdump in SEV-ES guests. The biggest problem for supporting kexec/kdump under SEV-ES is to find a way to hand the non-boot CPUs (APs) from one kernel to another. Without SEV-ES the first kernel parks the CPUs in a HLT loop until they ge

[PATCH v6 02/10] x86/sev: Save and print negotiated GHCB protocol version

2024-06-10 Thread vsntk18
From: Joerg Roedel Save the results of the GHCB protocol negotiation into a data structure and print information about versions supported and used to the kernel log. This is useful for debugging kexec issues in SEV-ES guests down the road to quickly spot whether kexec is supported on the given h

[PATCH v6 01/10] x86/kexec/64: Disable kexec when SEV-ES is active

2024-06-10 Thread vsntk18
From: Joerg Roedel SEV-ES needs special handling to support kexec. Disable it when SEV-ES is active until support is implemented. Cc: sta...@vger.kernel.org Signed-off-by: Joerg Roedel Signed-off-by: Vasant Karasulli --- arch/x86/kernel/machine_kexec_64.c | 11 +++ 1 file changed, 11

[PATCH v6 03/10] x86/sev: Set GHCB data structure version

2024-06-10 Thread vsntk18
From: Joerg Roedel It turned out that the GHCB->protocol field does not declare the version of the guest-hypervisor communication protocol, but rather the version of the GHCB data structure. Reflect that in the define used to set the protocol field. Signed-off-by: Joerg Roedel Signed-off-by: Va

[PATCH v6 04/10] x86/sev: Setup code to park APs in the AP Jump Table

2024-06-10 Thread vsntk18
From: Joerg Roedel The AP jump table under SEV-ES contains the reset vector where non-boot CPUs start executing when coming out of reset. This means that a CPU coming out of the AP-reset-hold VMGEXIT also needs to start executing at the reset vector stored in the AP jump table. The problem is to

[PATCH v6 05/10] x86/sev: Park APs on AP Jump Table with GHCB protocol version 2

2024-06-10 Thread vsntk18
From: Joerg Roedel GHCB protocol version 2 adds the MSR-based AP-reset-hold VMGEXIT which does not need a GHCB. Use that to park APs in 16-bit protected mode on the AP jump table. Signed-off-by: Joerg Roedel Signed-off-by: Vasant Karasulli --- arch/x86/include/asm/realmode.h | 3 ++ arch/x86

[PATCH v6 06/10] x86/sev: Use AP Jump Table blob to stop CPU

2024-06-10 Thread vsntk18
From: Joerg Roedel To support kexec under SEV-ES the APs can't be parked with HLT. Upon wakeup the AP needs to find its way to execute at the reset vector set by the new kernel and in real-mode. This is what the AP jump table blob provides, so stop the APs the SEV-ES way by calling the AP-reset-

[PATCH v6 08/10] x86/sev: Handle CLFLUSH MMIO events

2024-06-10 Thread vsntk18
From: Joerg Roedel Handle CLFLUSH instruction to MMIO memory in the #VC handler. The instruction is ignored by the handler, as the Hypervisor is responsible for cache management of emulated MMIO memory. Signed-off-by: Joerg Roedel Signed-off-by: Vasant Karasulli --- arch/x86/include/asm/insn-

[PATCH v6 09/10] x86/kexec/64: Support kexec under SEV-ES with AP Jump Table Blob

2024-06-10 Thread vsntk18
From: Joerg Roedel When the AP jump table blob is installed the kernel can hand over the APs from the old to the new kernel. Enable kexec when the AP jump table blob has been installed. Signed-off-by: Joerg Roedel Signed-off-by: Vasant Karasulli --- arch/x86/include/asm/sev.h | 2 ++

[PATCH v6 10/10] x86/sev: Exclude AP jump table related code for SEV-SNP guests

2024-06-10 Thread vsntk18
From: Vasant Karasulli Unlike SEV-ES, AP jump table technique is not used in SEV-SNP when transitioning from one layer of code to another (e.g. when going from UEFI to the OS). Signed-off-by: Vasant Karasulli --- arch/x86/kernel/sev.c| 6 +- arch/x86/realmode/init.c | 5 +++-- 2 files

[PATCH v6 07/10] x86/sev: Add MMIO handling support to boot/compressed/ code

2024-06-10 Thread vsntk18
From: Joerg Roedel Move the code for MMIO handling in the #VC handler to sev-shared.c so that it can be used in the decompressor code. The decompressor needs to handle MMIO events for writing to the VGA framebuffer. When the kernel is booted via UEFI the VGA console is not enabled that early, bu

Re: [PATCH v6 00/10] x86/sev: KEXEC/KDUMP support for SEV-ES guests

2024-06-10 Thread Greg KH
On Mon, Jun 10, 2024 at 12:21:03PM +0200, vsnt...@gmail.com wrote: > From: Vasant Karasulli > > Hi, > > here are changes to enable kexec/kdump in SEV-ES guests. The biggest > problem for supporting kexec/kdump under SEV-ES is to find a way to > hand the non-boot CPUs (APs) from one kernel to ano

Re: [PATCH 1/3] kexec_load: Use new kexec flag for hotplug support

2024-06-10 Thread Sourabh Jain
Hello Hari, On 10/06/24 14:22, Hari Bathini wrote: On 22/05/24 6:43 pm, Sourabh Jain wrote: Kernel commit 79365026f869 (crash: add a new kexec flag for hotplug support) has introduced a new kexec flag to generalize hotplug support. The newly introduced kexec flags for hotplug allow architectu

Re: [PATCH 2/3] powerpc/kexec_load: add hotplug support

2024-06-10 Thread Sourabh Jain
Hello Hari, On 10/06/24 15:08, Hari Bathini wrote: On 22/05/24 6:43 pm, Sourabh Jain wrote: Kernel commits b741092d5976 ("powerpc/crash: add crash CPU hotplug support") and 849599b702ef ("powerpc/crash: add crash memory hotplug support") added crash CPU/Memory hotplug support on PowerPC. This

Re: [PATCH 3/3] doc/hotplug: update man and --help

2024-06-10 Thread Sourabh Jain
Hello Hari, On 10/06/24 14:49, Hari Bathini wrote: On 22/05/24 6:43 pm, Sourabh Jain wrote: Update the man page and --help option to make the description of the --hotplug option easier to understand. Cc: Aditya Gupta Cc: Baoquan He Cc: Coiby Xu Cc: Hari Bathini Cc: Mahesh Salgaonkar Sig

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 th

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