Re: [PATCH v4 2/4] x86/sev: add sev_es_enabled() function.

2024-04-09 Thread Borislav Petkov
On Tue, Apr 09, 2024 at 08:42:38PM +, Ashish Kalra wrote: > From: Ashish Kalra > > Add sev_es_enabled() function to detect if SEV-ES > support is enabled. And use it exactly once? Nah, use sev_status directly. -- Regards/Gruss, Boris.

[PATCH v4 4/4] x86/snp: Convert shared memory back to private on kexec

2024-04-09 Thread Ashish Kalra
From: Ashish Kalra SNP guests allocate shared buffers to perform I/O. It is done by allocating pages normally from the buddy allocator and converting them to shared with set_memory_decrypted(). The second kernel has no idea what memory is converted this way. It only sees E820_TYPE_RAM.

[PATCH v4 1/4] efi/x86: skip efi_arch_mem_reserve() in case of kexec.

2024-04-09 Thread Ashish Kalra
From: Ashish Kalra For kexec use case, need to use and stick to the EFI memmap passed from the first kernel via boot-params/setup data, hence, skip efi_arch_mem_reserve() during kexec. Additionally during SNP guest kexec testing discovered that EFI memmap is corrupted during chained kexec.

[PATCH v4 3/4] x86/boot/compressed: Skip Video Memory access in Decompressor for SEV-ES/SNP.

2024-04-09 Thread Ashish Kalra
From: Ashish Kalra Accessing guest video memory/RAM during kernel decompressor causes guest termination as boot stage2 #VC handler for SEV-ES/SNP systems does not support MMIO handling. This issue is observed with SEV-ES/SNP guest kexec as kexec -c adds screen_info to the boot parameters passed

[PATCH v4 2/4] x86/sev: add sev_es_enabled() function.

2024-04-09 Thread Ashish Kalra
From: Ashish Kalra Add sev_es_enabled() function to detect if SEV-ES support is enabled. Signed-off-by: Ashish Kalra Reviewed-by: Kuppuswamy Sathyanarayanan --- arch/x86/boot/compressed/sev.c | 5 + arch/x86/boot/compressed/sev.h | 2 ++ 2 files changed, 7 insertions(+) diff --git

[PATCH v4 0/4] x86/snp: Add kexec support

2024-04-09 Thread Ashish Kalra
From: Ashish Kalra The patchset adds bits and pieces to get kexec (and crashkernel) work on SNP guest. v4: - Rebased to current tip/master. - Reviewed-bys from Sathya. - Remove snp_kexec_unprep_rom_memory() as it is not needed any more as SEV-SNP code is not validating the ROM range in

Re: [PATCHv10 05/18] x86/kexec: Keep CR4.MCE set during kexec for TDX guest

2024-04-09 Thread Kirill A. Shutemov
On Tue, Apr 09, 2024 at 07:22:24AM -0700, Sean Christopherson wrote: > On Tue, Apr 09, 2024, Kirill A. Shutemov wrote: > > Depending on setup, TDX guests might be allowed to clear CR4.MCE. > > Attempt to clear it leads to #VE. > > > > Use alternatives to keep the flag during kexec for TDX guests.

Re: [PATCHv10 05/18] x86/kexec: Keep CR4.MCE set during kexec for TDX guest

2024-04-09 Thread Sean Christopherson
On Tue, Apr 09, 2024, Kirill A. Shutemov wrote: > Depending on setup, TDX guests might be allowed to clear CR4.MCE. > Attempt to clear it leads to #VE. > > Use alternatives to keep the flag during kexec for TDX guests. > > The change doesn't affect non-TDX-guest environments. > > Signed-off-by:

Re: [PATCHv10 05/18] x86/kexec: Keep CR4.MCE set during kexec for TDX guest

2024-04-09 Thread Huang, Kai
On Tue, 2024-04-09 at 14:29 +0300, Kirill A. Shutemov wrote: > Depending on setup, TDX guests might be allowed to clear CR4.MCE. > Attempt to clear it leads to #VE. > > Use alternatives to keep the flag during kexec for TDX guests. > > The change doesn't affect non-TDX-guest environments. > >

Re: [PATCH v3 06/10] scheduler: Remove the now superfluous sentinel elements from ctl_table array

2024-04-09 Thread Valentin Schneider
On 28/03/24 16:44, Joel Granados via B4 Relay wrote: > From: Joel Granados > > This commit comes at the tail end of a greater effort to remove the > empty elements at the end of the ctl_table arrays (sentinels) which > will reduce the overall build time size of the kernel and run time > memory