[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFxZUHcQh3hSraqe@x1.local>
Date: Wed, 25 Jun 2025 16:17:20 -0400
From: Peter Xu <peterx@...hat.com>
To: Nikita Kalyazin <kalyazin@...zon.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Hugh Dickins <hughd@...gle.com>, Oscar Salvador <osalvador@...e.de>,
Michal Hocko <mhocko@...e.com>,
David Hildenbrand <david@...hat.com>,
Muchun Song <muchun.song@...ux.dev>,
Andrea Arcangeli <aarcange@...hat.com>,
Ujwal Kundur <ujwal.kundur@...il.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>,
James Houghton <jthoughton@...gle.com>,
Mike Rapoport <rppt@...nel.org>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>
Subject: Re: [PATCH 0/4] mm/userfaultfd: modulize memory types
On Wed, Jun 25, 2025 at 05:56:23PM +0100, Nikita Kalyazin wrote:
>
>
> On 20/06/2025 20:03, Peter Xu wrote:
> > [based on akpm/mm-new]
> >
> > This series is an alternative proposal of what Nikita proposed here on the
> > initial three patches:
> >
> > https://lore.kernel.org/r/20250404154352.23078-1-kalyazin@amazon.com
> >
> > This is not yet relevant to any guest-memfd support, but paving way for it.
>
> Hi Peter,
Hi, Nikita,
>
> Thanks for posting this. I confirmed that minor fault handling was working
> for guest_memfd based on this series and looked simple (a draft based on
> mmap support in guest_memfd v7 [1]):
Thanks for the quick spin, glad to know it works. Some trivial things to
mention below..
>
> diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c
> index 5abb6d52a375..6ddc73419724 100644
> --- a/virt/kvm/guest_memfd.c
> +++ b/virt/kvm/guest_memfd.c
> @@ -5,6 +5,9 @@
> #include <linux/pagemap.h>
> #include <linux/anon_inodes.h>
> #include <linux/set_memory.h>
> +#ifdef CONFIG_USERFAULTFD
This ifdef not needed, userfaultfd_k.h has taken care of all cases.
> +#include <linux/userfaultfd_k.h>
> +#endif
>
> #include "kvm_mm.h"
>
> @@ -396,6 +399,14 @@ static vm_fault_t kvm_gmem_fault(struct vm_fault *vmf)
> kvm_gmem_mark_prepared(folio);
> }
>
> +#ifdef CONFIG_USERFAULTFD
Same here. userfaultfd_minor() is always defined.
I'll wait for a few more days for reviewers, and likely send v2 before next
week.
Thanks,
--
Peter Xu
Powered by blists - more mailing lists