Re: [PATCH v9 6/6] KVM: arm64: Expose new KVM cap for cacheable PFNMAP

Jason Gunthorpe
2025-07-04T17:07:56Z

On Fri, Jul 04, 2025 at 04:20:07PM +0000, Ankit Agrawal wrote:
> Thanks Jason and David for reviewing the patch!
>
> >> >
> >> > I don't know if any VMM will ever use this, but it looks OK
> >>
> >> So, should we defer it to the point where we actually have a use case?
> >>
> >> I mean, patch #4 could be simplified by modifying arm64 code in patch #5
> >> only. No need for a common kvm_arch function etc.
> >
> > IDK, I think Marc and Oliver are right it makes sense to have it, I
> > just don't really see how a VMM would make use of it..
> >
> > Jason
>
> Right, it was also pointed out that the VMM could make use of it
> for early termination during VM migration between incompatible
> systems (i.e. across systems with and without FWB and CACHE DIC).

In practice it isn't that useful.

This is all linked to VFIO so the receiving VMM and system must
already have VFIO load and must already have the VMM told to use the
coherent VFIO mapping.

It would be a serious misconfiguration to setup a VMM as a migration
target when the configuration can't even boot normally - because
memslot creation would fail for the VFIO coherent memory.

Regardless, in such a case the memslot creation should fail and the
migration will abort.

Jason