Re: [PATCH v5 1/3] efi/x86: skip efi_arch_mem_reserve() in case of kexec.

2024-04-26 Thread Kalra, Ashish
On 4/26/2024 10:34 AM, Borislav Petkov wrote: On Fri, Apr 26, 2024 at 10:28:41AM -0500, Kalra, Ashish wrote: "Chained guest kexec" is when we are in a guest and kexec-ing into a new kernel and then this kernel kexecs into another and so on ... Make sure to explain your terminology: $ git grep

Re: [PATCH v5 1/3] efi/x86: skip efi_arch_mem_reserve() in case of kexec.

2024-04-26 Thread Borislav Petkov
On Fri, Apr 26, 2024 at 10:28:41AM -0500, Kalra, Ashish wrote: > "Chained guest kexec" is when we are in a guest and kexec-ing into a new > kernel and then this kernel kexecs into another and so on ... Make sure to explain your terminology: $ git grep -rE "chained.*kexec" $ and there's nothing "

Re: [PATCH v5 1/3] efi/x86: skip efi_arch_mem_reserve() in case of kexec.

2024-04-26 Thread Kalra, Ashish
On 4/26/2024 10:22 AM, Borislav Petkov wrote: On Fri, Apr 26, 2024 at 09:47:02AM -0500, Kalra, Ashish wrote: I should have mentioned *chained* guest kexec above instead of nested guest kexec. What is a "chained guest kexec" now? "Chained guest kexec" is when we are in a guest and kexec-ing i

Re: [PATCH v5 1/3] efi/x86: skip efi_arch_mem_reserve() in case of kexec.

2024-04-26 Thread Borislav Petkov
On Fri, Apr 26, 2024 at 09:47:02AM -0500, Kalra, Ashish wrote: > I should have mentioned *chained* guest kexec above instead of nested guest > kexec. What is a "chained guest kexec" now? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [PATCH v5 1/3] efi/x86: skip efi_arch_mem_reserve() in case of kexec.

2024-04-26 Thread Kalra, Ashish
On 4/26/2024 9:21 AM, Borislav Petkov wrote: On Wed, Apr 24, 2024 at 04:17:09PM -0500, Kalra, Ashish wrote: With SNP guest kexec and during nested guest kexec, observe the following efi memmap corruption : Before we delve any deeper here, lemme make sure I understand this correctly: * You're

Re: [PATCH v5 1/3] efi/x86: skip efi_arch_mem_reserve() in case of kexec.

2024-04-26 Thread Borislav Petkov
On Wed, Apr 24, 2024 at 04:17:09PM -0500, Kalra, Ashish wrote: > With SNP guest kexec and during nested guest kexec, observe the following > efi memmap corruption : Before we delve any deeper here, lemme make sure I understand this correctly: * You're in a SNP guest and you're kexec-ing into a ne

Re: [PATCH v5 1/3] efi/x86: skip efi_arch_mem_reserve() in case of kexec.

2024-04-25 Thread Kalra, Ashish
>It sounds to me like you need to go back up, to the 1ft view and explain how exactly this efi_mem_reserve() causes trouble for the kexec-ed kernel so that we can think of a proper solution, not some random hackery. The above details explain why and how efi_arch_mem_reserve() causes troubl

Re: [PATCH v5 1/3] efi/x86: skip efi_arch_mem_reserve() in case of kexec.

2024-04-24 Thread Kalra, Ashish
I_BOOT_SERVICES_DATA) { + pr_err("Skip reserving non EFI Boot Service Data memory for %pa\n", &addr); What is this pr_err() useful for? + return; + } + + /* Kexec copied the efi memmap from the first kernel, thus skip the case */ kexec? This

Re: [PATCH v5 1/3] efi/x86: skip efi_arch_mem_reserve() in case of kexec.

2024-04-24 Thread Borislav Petkov
TA) { > + pr_err("Skip reserving non EFI Boot Service Data memory for > %pa\n", &addr); What is this pr_err() useful for? > + return; > + } > + > + /* Kexec copied the efi memmap from the first kernel, thus skip the > case */ kexec

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

2024-04-15 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. kexec