[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z-6fw8VuDTk4soN8@google.com>
Date: Thu, 3 Apr 2025 07:48:35 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Elliot Berman <quic_eberman@...cinc.com>, Paolo Bonzini <pbonzini@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>, Fuad Tabba <tabba@...gle.com>,
Ackerley Tng <ackerleytng@...gle.com>, Mike Rapoport <rppt@...nel.org>,
David Hildenbrand <david@...hat.com>, "H. Peter Anvin" <hpa@...or.com>, Jonathan Corbet <corbet@....net>,
Trond Myklebust <trondmy@...nel.org>, Anna Schumaker <anna@...nel.org>,
Mike Marshall <hubcap@...ibond.com>, Martin Brandenburg <martin@...ibond.com>,
Alexander Viro <viro@...iv.linux.org.uk>, Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
James Gowans <jgowans@...zon.com>, Mike Day <michael.day@....com>, linux-fsdevel@...r.kernel.org,
kvm@...r.kernel.org, linux-coco@...ts.linux.dev,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-doc@...r.kernel.org, linux-nfs@...r.kernel.org,
devel@...ts.orangefs.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v5 2/2] mm: guestmem: Convert address_space operations to
guestmem library
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.
Powered by blists - more mailing lists