[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aLC0xXVLq1olR5qQ@google.com>
Date: Thu, 28 Aug 2025 12:57:57 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Rick P Edgecombe <rick.p.edgecombe@...el.com>
Cc: "pbonzini@...hat.com" <pbonzini@...hat.com>, Ira Weiny <ira.weiny@...el.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>, Vishal Annapurve <vannapurve@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Yan Y Zhao <yan.y.zhao@...el.com>,
"michael.roth@....com" <michael.roth@....com>
Subject: Re: [RFC PATCH 02/12] KVM: x86/mmu: Add dedicated API to map
guest_memfd pfn into TDP MMU
On Thu, Aug 28, 2025, Rick P Edgecombe wrote:
> On Wed, 2025-08-27 at 19:40 -0500, Ira Weiny wrote:
> > > + .map_writable = true,
> >
> > Why is map_writable set? Doesn't this get translated into host_writable?
>
> I guess it's normally set only if it's a !KVM_MEM_READONLY slot for private
> faults memory.
map_writable can also be %false on read faults and the host userspace mapping
isn't writable.
> But that flag is invalid for gmem. So we should only have
> map_writable=true cases for tdx.
Yep. And not TDX specific, map_writable _must_ be true for write faults. The
reason there's two separate flags is so that KVM can opportunistically create a
writable mapping on read faults.
Powered by blists - more mailing lists