[RFC 00/18] Pkernfs: Support persistence for live update
Gowans, James
jgowans at amazon.com
Wed Feb 7 06:56:33 PST 2024
On Mon, 2024-02-05 at 10:10 -0700, Alex Williamson wrote:
> > * Needing to drive and re-hydrate the IOMMU page tables by defining
> > an IOMMU file.
> > Really we should move the abstraction one level up and make the
> > whole VFIO
> > container persistent via a pkernfs file. That way you’d "just" re-
> > open the VFIO
> > container file and all of the DMA mappings inside VFIO would already
> > be set up.
>
> Note that the vfio container is on a path towards deprecation, this
> should be refocused on vfio relative to iommufd. There would need to
> be a strong argument for a container/type1 extension to support this,
> iommufd would need to be the first class implementation. Thanks,
Ack! When I first started putting pkernfs together, iommufd wasn't
integrated into QEMU yet, hence I stuck with VFIO for this PoC.
I'm thrilled to see that iommufd now seems to be integrated in QEMU!
Good opportunity to get to grips with it.
The VFIO-specific part of this patch is essentially ioctls on the
*container* to be able to:
1. define persistent page tables (PPTs) on the containers so that those
PPTs are used by the IOMMU domain and hence by all devices added to that
container.
https://github.com/jgowans/qemu/commit/e84cfb8186d71f797ef1f72d57d873222a9b479e
2. Tell VFIO to avoid mapping the memory in again after live update
because it already exists.
https://github.com/jgowans/qemu/commit/6e4f17f703eaf2a6f1e4cb2576d61683eaee02b0
(the above flag should only be set *after* live update...).
Do you have a rough suggestion about how similar could be done with
iommufd?
JG
More information about the kexec
mailing list