Subject: Re: [PATCH V2 mlx5-next 12/14] vfio/mlx5: Implement vfio_pci driver for mlx5 devices

From: Jason Gunthorpe <[email-masked]>
Date: Mon, 25 Oct 2021 16:15:09 -0300

On Mon, Oct 25, 2021 at 07:47:29PM +0100, Dr. David Alan Gilbert wrote:

> It may need some further refinement; for example in that quiesed state
> do counters still tick? will a NIC still respond to packets that don't
> get forwarded to the host?

At least for the mlx5 NIC the two states are 'able to issue outbound
DMA' and 'all internal memories and state are frozen and unchanging'.

The later means it should not respond/count/etc to network packets
either.

Roughly it is
 'able to mutate external state' / 'able to mutate internal state'

The invariant should be that successive calls to serialize the
internal state while frozen should return the same serialization.

We may find that migratable PCI functions must have some limited
functionality. Ie anything with a realtime compoment - for instance a
sync-ethernet clock synchronization control loop, may become
challenging to migrate without creating a serious functional
distortion.

Jason