Re: [PATCH v9 07/13] KVM: guest_memfd: Add flag to remove from direct map

From: Edgecombe, Rick P

Date: Fri Jan 16 2026 - 10:36:05 EST


On Fri, 2026-01-16 at 15:02 +0000, Nikita Kalyazin wrote:
> > TDX does some clearing at the direct map mapping for pages that
> > comes from gmem, using a special instruction. It also does some
> > clflushing at the direct map address for these pages. So I think we
> > need to make sure TDs don't pull from gmem fds with this flag.
>
> Would you be able to give a pointer on how we can do that?  I'm not
> very familiar with the TDX code.

Uhh, that is a good question. Let me think.