On Fri, 27 Feb 2026 00:51:18 +0000
David Matlack <[email protected]> wrote:

> On 2026-02-26 05:00 PM, Alex Williamson wrote:
> > On Thu, 29 Jan 2026 21:24:57 +0000
> > David Matlack <[email protected]> wrote:  
> > >  
> > > - vdev->reset_works = !ret;
> > >   pci_save_state(pdev);
> > >   vdev->pci_saved_state = pci_store_saved_state(pdev);  
> > 
> > Isn't this a problem too?  In the first kernel we store the initial,
> > post reset state of the device, now we're storing some arbitrary state.
> > This is the state we're restore when the device is closed.  
> 
> The previous kernel resets the device and restores it back to its
> post reset state in vfio_pci_liveupdate_freeze() before handing off
> control to the next kernel. So my intention here is that VFIO will
> receive the device in that state, allowing it to call
> pci_store_saved_state() here to capture the post reset state of the
> device again.
> 
> Eventually we want to drop the reset in vfio_pci_liveupdate_freeze() and
> preserve vdev->pci_saved_state across the Live Update. But I was hoping
> to add that in a follow up series to avoid this one getting too long.

I appreciate reviewing this in smaller chunks, but how does userspace
know whether the kernel contains a stub implementation of liveupdate or
behaves according to the end goal?

Also, didn't we violate our own contract in this patch by adding the
reset_works field to the serialization data without updating the
compatibility string?  Thanks,

Alex

Reply via email to