On Fri, May 06, 2022 at 07:13:59PM +0300, Kirill A. Shutemov wrote: > Failure to accept the memory is fatal. Why pretend it is not? > > For TDX it will result in a crash on the first access. Prolonging the > suffering just make it harder to understand what happened. Ok then. Does that panic message contain enough info so that the acceptance failure can be debugged? Just "Cannot accept memory" doesn't seem very helpful to me... > That's true. Note also that the check is inherently racy. Other CPU can > get the range or subrange accepted just after spin_unlock(). > > The check indicates that accept_memory() has to be called on the range > before first access. > > Do you have problem with a name? Maybe has_unaccepted_memory()? I have a problem with the definition of this function, what it is supposed to do and how it is supposed to be used. Right now, it looks weird and strange: is it supposed to check for *all* in-between (start, end)? It doesn't, atm, so what's the meaning of @start and @end then at all? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette