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

2024-02-26 Thread Dave Hansen
On 2/25/24 06:58, Kirill A. Shutemov wrote: > On Fri, Feb 23, 2024 at 11:39:07AM -0800, Dave Hansen wrote: ... >> I'd really prefer we find a way to do this with actual locks, especially >> 'conversion_allowed'. >> >> This is _awfully_ close to being able to be handled by a rwsem where the >>

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

2024-02-26 Thread Kirill A. Shutemov
On Sun, Feb 25, 2024 at 04:58:46PM +0200, Kirill A. Shutemov wrote: > On Fri, Feb 23, 2024 at 11:39:07AM -0800, Dave Hansen wrote: > > On 2/12/24 02:44, Kirill A. Shutemov wrote: > > > +static void tdx_kexec_stop_conversion(bool crash) > > > +{ > > > + /* Stop new private<->shared conversions */ >

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

2024-02-25 Thread Kirill A. Shutemov
On Fri, Feb 23, 2024 at 11:39:07AM -0800, Dave Hansen wrote: > On 2/12/24 02:44, Kirill A. Shutemov wrote: > > +static void tdx_kexec_stop_conversion(bool crash) > > +{ > > + /* Stop new private<->shared conversions */ > > + conversion_allowed = false; > > + > > + /* > > +* Make sure

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

2024-02-23 Thread Dave Hansen
On 2/12/24 02:44, Kirill A. Shutemov wrote: > +static void tdx_kexec_stop_conversion(bool crash) > +{ > + /* Stop new private<->shared conversions */ > + conversion_allowed = false; > + > + /* > + * Make sure conversion_allowed is cleared before checking > + *