[PATCH v2 15/18] KVM: arm64: Alloc pkvm_hyp_vm using pKVM heap allocator
Fuad Tabba
fuad.tabba at linux.dev
Wed Jul 15 05:58:23 PDT 2026
> > Sashiko might be right on the memcg point: hyp_vm used to be
> > GFP_KERNEL_ACCOUNT and now comes from the heap unaccounted, while pgd
> > next to it is still accounted, so it's inconsistent.
>
> Yep that is correct but there is no way around that:
>
> * Donated memory can now be shared be shared by several VM (or other parts of
> the hypervisor)
>
> * Donated memory is also not reclaimed until the shrinker fires.
>
> So we don't really have a way to account for that meta-data anymore.
>
> (I should at least mention this in the commit message)
Sgtm.
/fuad
>
> >
> > If we do want to fix it, would it go in pkvm_hyp_topup() to cover all
> > consumers rather than here?
> >
> > Cheers,
> > /fuad
More information about the linux-arm-kernel
mailing list