> VFIO_DEVICE_FEATURE_LOW_POWER_ENTRY_WITH_WAKEUP correctly revokes
> DMABUFs on entry and, when paired with a
> VFIO_DEVICE_FEATURE_LOW_POWER_EXIT, vfio_pci_runtime_pm_exit()
> correctly un-revokes them.
> 
> However, when vfio_pci_core_runtime_resume() signals the eventfd on
> resume, the bare __vfio_pci_runtime_pm_exit() is used (which does not
> un-revoke).  Add vfio_pci_dma_buf_move(false) to the resume path,
> making it similar to vfio_pci_runtime_pm_exit().
> 
> This also reorders the eventfd signal after the un-revoke and
> __vfio_pci_runtime_pm_exit() to guarantee that woken threads observe
> the new state.
> 
> Fixes: 5d74781ebc86 ("vfio/pci: Add dma-buf export support for MMIO regions")
> Signed-off-by: Matt Evans <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · 
https://sashiko.dev/#/patchset/[email protected]?part=2

Reply via email to