Re: [PATCH v9 13/41] KVM: guest_memfd: Return early if range already has requested attributes

From: Ackerley Tng

Date: Thu Jul 30 2026 - 18:32:44 EST


Ackerley Tng via B4 Relay <devnull+ackerleytng.google.com@xxxxxxxxxx>
writes:

> From: Ackerley Tng <ackerleytng@xxxxxxxxxx>
>
> Extract a helper out of kvm_gmem_range_is_private() that checks that a
> range has given attributes.
>

This should have been

Extract out a helper that checks that a range has given attributes.

kvm_gmem_range_is_private() was renamed to kvm_range_is_private() in
some earlier patch. Thanks Fuad!

> Optimize setting memory attributes by returning early if all pages in the
> requested range already has the requested attributes.
>
> Reviewed-by: Fuad Tabba <tabba@xxxxxxxxxx>
> Tested-by: Shivank Garg <shivankg@xxxxxxx>
> Signed-off-by: Ackerley Tng <ackerleytng@xxxxxxxxxx>
>
> [...snip...]
>