Re: [PATCH v4 08/11] KVM: Allow architectures to reject memslot changes before invalidation

From: Steven Price

Date: Mon Nov 30 2026 - 05:15:53 EST


On 30/11/2026 09:05, Fuad Tabba wrote:
> Hi Suzuki,
>
> On Mon, 23 Nov 2026 10:42:28 +0000, Steven Price <steven.price@xxxxxxx> wrote:
>> From: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
>>
>> The next patch needs to reject changes to a realm guest_memfd memslot
>> before invalidation. KVM currently invalidates the slot and calls
> [...]
>> Move arm64's existing pVM checks into the new hook as part of early
>> validation. pVM invalidation uses no_stage2_unmap_range(), so the realm
>> case motivates this hook. Keep resource preparation after invalidation,
>
> With the Realm memslot restrictions in patch 9 being dropped in the
> next version, is this hook still needed? pVM invalidation doesn't
> touch stage-2, so the pVM checks could stay in
> kvm_arch_prepare_memory_region().

Indeed with the memslot restrictions gone this hook isn't needed.

Thanks,
Steve