Subject: Re: [RFC PATCH vfio 3/7] vfio/pds: Add VFIO live migration support

From: Jason Gunthorpe <[email-masked]>
Date: Wed, 7 Dec 2022 19:29:24 -0400

On Wed, Dec 07, 2022 at 01:32:34PM -0800, Brett Creeley wrote:

> > Please implement the P2P states in your device. After long discussions
> > we really want to see all VFIO migrations implementations support
> > this.
> > 
> > It is still not clear what qemu will do when it sees devices that do
> > not support P2P, but it will not be nice.
> 
> Does that mean VFIO_MIGRATION_P2P is going to be required going forward or
> do we just need to handle the P2P transitions? Can you point me to where
> this is being discussed?

It means the device has to support a state where it is not issuing any
outgoing DMA but continuing to process incoming DMA.

This is mandatory to properly support multiple VFIO devices in the
same VM, which is why we want to see all devices implementing it. If
the devices don't support it we may assume it means the device is
broken and qemu will have to actively block P2P at the IOMMU.

There was lots of long threads in around Dec 2021 if I recall, lore
could probably find them. Somewhere around here based on the search

https://lore.kernel.org/kvm/[email-masked]/

Jason