Re: [PATCHv3 10/14] x86/tdx: Convert shared memory back to private on kexec

2023-11-23 Thread kirill.shute...@linux.intel.com
On Wed, Nov 22, 2023 at 10:07:44AM +, Huang, Kai wrote: > On Tue, 2023-11-21 at 12:58 +0300, kirill.shute...@linux.intel.com wrote: > > On Tue, Nov 21, 2023 at 03:46:41AM +, Huang, Kai wrote: > > > > > > > > > > > +static atomic_t conversions_in_progress; > > > > +static bool

Re: [PATCHv3 10/14] x86/tdx: Convert shared memory back to private on kexec

2023-11-22 Thread Huang, Kai
On Tue, 2023-11-21 at 12:58 +0300, kirill.shute...@linux.intel.com wrote: > On Tue, Nov 21, 2023 at 03:46:41AM +, Huang, Kai wrote: > > > > > > > > +static atomic_t conversions_in_progress; > > > +static bool conversion_allowed = true; > > > > > > > [...] > > > > > /* Used while

Re: [PATCHv3 10/14] x86/tdx: Convert shared memory back to private on kexec

2023-11-21 Thread kirill.shute...@linux.intel.com
On Tue, Nov 21, 2023 at 03:46:41AM +, Huang, Kai wrote: > > > > > +static atomic_t conversions_in_progress; > > +static bool conversion_allowed = true; > > > > [...] > > > /* Used while preparing memory map entries for second kernel */ > > struct crash_memmap_data { > > @@ -107,6

Re: [PATCHv3 10/14] x86/tdx: Convert shared memory back to private on kexec

2023-11-20 Thread Huang, Kai
> > +static atomic_t conversions_in_progress; > +static bool conversion_allowed = true; > [...] > /* Used while preparing memory map entries for second kernel */ > struct crash_memmap_data { > @@ -107,6 +108,9 @@ void native_machine_crash_shutdown(struct pt_regs *regs) > >

[PATCHv3 10/14] x86/tdx: Convert shared memory back to private on kexec

2023-11-15 Thread Kirill A. Shutemov
TDX 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. Accessing shared memory via