[PATCH v9 07/13] KVM: guest_memfd: Add flag to remove from direct map
Nikita Kalyazin
kalyazin at amazon.com
Fri Jan 16 09:32:35 PST 2026
On 16/01/2026 15:41, Sean Christopherson wrote:
> 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.
Sounds good to me, thanks.
More information about the linux-riscv
mailing list