Re: [RFC v2-fix-v1 3/3] x86/tdx: Handle port I/O
From: Dan Williams
Date: Mon Jun 07 2021 - 18:01:55 EST
On Mon, Jun 7, 2021 at 2:52 PM Kuppuswamy, Sathyanarayanan
<sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx> wrote:
>
>
>
> On 6/7/21 10:17 AM, Dan Williams wrote:
> >> Did it answer your query?
> > Yes, all but the concern of printk recursion.
>
> I think recursion is not possible because printk will
> handle it (using console_lock). If another print is
> triggered during the current printk handling, it will
> be directed to logbuf and delayed.
>
> https://elixir.bootlin.com/linux/latest/source/kernel/printk/printk_safe.c#L382
That depends on printk_nmi_direct_enter() to set the context, wouldn't
an equivalent printk_ve_direct_enter() context flag be needed as well?