On 29/07/2026 01:35, Ackerley Tng via B4 Relay wrote:
From: Ackerley Tng <[email protected]>

Before conversion, a guest_memfd could be either all shared, or all
private, configured at creation time using the INIT_SHARED flag. Hence,
when zapping pages from stage 2 page tables, guest_memfd can filter which
to zap based on the initial shared/private state.

With conversion, guest_memfd tracks shared/private state on a per-page
level, so a range can contain both private and shared pages. Zap both
private and shared pages for simplicity.

An alternative would be to iterate guest_memfd attributes and only zap both
if shared and private pages exist within the range. Setting both the shared
and private filters lets the zapping logic do that iteration instead.

Signed-off-by: Ackerley Tng <[email protected]>

Reviewed-by: Suzuki K Poulose <[email protected]>


Reply via email to