Re: [PATCHv11 10/19] x86/mm: Add callbacks to prepare encrypted memory for kexec

2024-06-04 Thread Dave Hansen
On 5/28/24 02:55, Kirill A. Shutemov wrote: > + x86_platform.guest.enc_kexec_begin(true); > + x86_platform.guest.enc_kexec_finish(); I really despise the random, unlabeled true/false/0/1 arguments to functions like this. I'll bring it up in the non-noop patch though.

Re: [PATCHv11 10/19] x86/mm: Add callbacks to prepare encrypted memory for kexec

2024-05-29 Thread Borislav Petkov
On Tue, May 28, 2024 at 12:55:13PM +0300, Kirill A. Shutemov wrote: > diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h > index 28ac3cb9b987..6cade48811cc 100644 > --- a/arch/x86/include/asm/x86_init.h > +++ b/arch/x86/include/asm/x86_init.h > @@ -149,12 +149,21 @@ stru

[PATCHv11 10/19] x86/mm: Add callbacks to prepare encrypted memory for kexec

2024-05-28 Thread Kirill A. Shutemov
AMD SEV and Intel TDX guests allocate shared buffers for performing I/O. This is done by allocating pages normally from the buddy allocator and then converting them to shared using set_memory_decrypted(). On kexec, the second kernel is unaware of which memory has been converted in this manner. It