[PATCH v9 07/13] KVM: guest_memfd: Add flag to remove from direct map
Sean Christopherson
seanjc at google.com
Fri Jan 16 07:41:02 PST 2026
On Fri, Jan 16, 2026, Rick P Edgecombe wrote:
> 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.
Pass @kvm to kvm_arch_gmem_supports_no_direct_map() and then return %false if
it's a TDX VM.
More information about the linux-riscv
mailing list