On 2025/7/23 16:20, Marc Zyngier wrote:
On Tue, 22 Jul 2025 13:31:34 +0100,
Kunwu Chan <kunwu.chan@xxxxxxxxx> wrote:
On 2025/7/18 00:27, Fuad Tabba wrote:
Add arm64 architecture support for handling guest page faults on memory
slots backed by guest_memfd.
This change introduces a new function, gmem_abort(), which encapsulates
the fault handling logic specific to guest_memfd-backed memory. The
kvm_handle_guest_abort() entry point is updated to dispatch to
gmem_abort() when a fault occurs on a guest_memfd-backed memory slot (as
determined by kvm_slot_has_gmem()).
Until guest_memfd gains support for huge pages, the fault granule for
these memory regions is restricted to PAGE_SIZE.
Since huge pages are not currently supported, would it be more
friendly to define sth like
"#define GMEM_PAGE_GRANULE PAGE_SIZE" at the top (rather than
hardcoding PAGE_SIZE)
and make it easier to switch to huge page support later?
No. PAGE_SIZE always has to be the fallback, no matter what. When (and
if) larger mappings get supported, there will be extra code for that
purpose, not just flipping a definition.
Thanks,
M.
Got it, no questions here. Feel free to add my "Reviewed-by" tag to the
patch.
Reviewed-by: Tao Chan <chentao@xxxxxxxxxx>
Thanks,
TAO.
---
“Life finds a way.”