Re: [PATCH v18] arm64: mm: Handle Granule Protection Faults (GPFs)
From: Catalin Marinas
Date: Thu Sep 17 2026 - 03:59:04 EST
On Wed, Sep 16, 2026 at 05:39:24PM +0100, Catalin Marinas wrote:
> However, can we end up delegating a non-guest_memfd memslot page as
> protected?
>
> I played a bit with codex and it reckons it's possible if a guest_memfd
> memslot is deleted after its IPA range has been initialised with
> RIPAS=RAM. Removing the memslot unmaps and undelegates any data pages
> but leaves the RMM state as RAM. The VMM can then install an ordinary
> memslot over the same GPA range.
After some more digging, I think RIPAS becomes DESTROYED after
undelegation but it doesn't change much. A subsequent guest access to
the private IPA still exits to the host which will attempt to delegate
it again even if it's no longer guest_memfd. RIPAS remains DESTROYED but
GPT is now REALM (and potentially a valid user mapping).
--
Catalin