From: Sean Christopherson <seanjc@google.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Elliot Berman <quic_eberman@quicinc.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Fuad Tabba <tabba@google.com>,
Ackerley Tng <ackerleytng@google.com>,
Mike Rapoport <rppt@kernel.org>,
David Hildenbrand <david@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Jonathan Corbet <corbet@lwn.net>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
Mike Marshall <hubcap@omnibond.com>,
Martin Brandenburg <martin@omnibond.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
James Gowans <jgowans@amazon.com>,
Mike Day <michael.day@amd.com>,
linux-fsdevel@vger.kernel.org, kvm@vger.kernel.org,
linux-coco@lists.linux.dev, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-doc@vger.kernel.org, linux-nfs@vger.kernel.org,
devel@lists.orangefs.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 2/2] mm: guestmem: Convert address_space operations to guestmem library
Date: Thu, 3 Apr 2025 07:48:35 -0700 [thread overview]
Message-ID: <Z-6fw8VuDTk4soN8@google.com> (raw)
In-Reply-To: <Z0DOdTRAaK3whZKW@casper.infradead.org>
On Fri, Nov 22, 2024, Matthew Wilcox wrote:
> On Fri, Nov 22, 2024 at 09:29:39AM -0800, Elliot Berman wrote:
> > A few near-term features are coming to guest_memfd which make sense to
> > create a built-in library.
>
> You haven't created a library, you've created a middle-layer. This
> file primarily consists of functions which redispatch to a function
> pointer. I think you'd be better off creating a library! That is,
> have the consumers register their own address_space_operations and
> have functions in this library which provide useful implementations.
Or, go even further and move the overwhelming majority of guest_memfd code into
mm/. But I suspect that will be practically infeasible, in which case I think I
agree with Matthew.
Either way, the Gunyah usage of the library/middle-layer needs to be included in
the series. It's impossible to review the code split and APIs without seeing
both KVM's usage and Gunyah's usage. E.g. this series allows
__guestmem_invalidate_begin() to fail, without any explanation as to while that's
legal or desirable.
next prev parent reply other threads:[~2025-04-03 14:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 17:29 [PATCH v5 0/2] mm: Refactor KVM guest_memfd to introduce guestmem library Elliot Berman
2024-11-22 17:29 ` [PATCH v5 1/2] filemap: Pass address_space mapping to ->free_folio() Elliot Berman
2024-11-22 18:22 ` Matthew Wilcox
2024-12-04 12:44 ` Mike Marshall
2024-11-22 17:29 ` [PATCH v5 2/2] mm: guestmem: Convert address_space operations to guestmem library Elliot Berman
2024-11-22 18:33 ` Matthew Wilcox
2025-04-03 14:48 ` Sean Christopherson [this message]
2024-11-25 18:04 ` [PATCH v5 0/2] mm: Refactor KVM guest_memfd to introduce " Mike Day
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z-6fw8VuDTk4soN8@google.com \
--to=seanjc@google.com \
--cc=ackerleytng@google.com \
--cc=akpm@linux-foundation.org \
--cc=anna@kernel.org \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=devel@lists.orangefs.org \
--cc=hpa@zytor.com \
--cc=hubcap@omnibond.com \
--cc=jack@suse.cz \
--cc=jgowans@amazon.com \
--cc=kvm@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=martin@omnibond.com \
--cc=michael.day@amd.com \
--cc=pbonzini@redhat.com \
--cc=quic_eberman@quicinc.com \
--cc=rppt@kernel.org \
--cc=tabba@google.com \
--cc=trondmy@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).