Skip to content

Commit 642265e

Browse files
brettcreeleyawilliam
authored andcommitted
vfio/pds: Send type for SUSPEND_STATUS command
Commit bb500db ("vfio/pds: Add VFIO live migration support") added live migration support for the pds-vfio-pci driver. When sending the SUSPEND command to the device, the driver sets the type of suspend (i.e. P2P or FULL). However, the driver isn't sending the type of suspend for the SUSPEND_STATUS command, which will result in failures. Fix this by also sending the suspend type in the SUSPEND_STATUS command. Fixes: bb500db ("vfio/pds: Add VFIO live migration support") Signed-off-by: Brett Creeley <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alex Williamson <[email protected]>
1 parent 2d12d18 commit 642265e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/vfio/pci/pds/cmds.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,13 @@ void pds_vfio_unregister_client_cmd(struct pds_vfio_pci_device *pds_vfio)
8686
}
8787

8888
static int
89-
pds_vfio_suspend_wait_device_cmd(struct pds_vfio_pci_device *pds_vfio)
89+
pds_vfio_suspend_wait_device_cmd(struct pds_vfio_pci_device *pds_vfio, u8 type)
9090
{
9191
union pds_core_adminq_cmd cmd = {
9292
.lm_suspend_status = {
9393
.opcode = PDS_LM_CMD_SUSPEND_STATUS,
9494
.vf_id = cpu_to_le16(pds_vfio->vf_id),
95+
.type = type,
9596
},
9697
};
9798
struct device *dev = pds_vfio_to_dev(pds_vfio);
@@ -156,7 +157,7 @@ int pds_vfio_suspend_device_cmd(struct pds_vfio_pci_device *pds_vfio, u8 type)
156157
* The subsequent suspend status request(s) check if the firmware has
157158
* completed the device suspend process.
158159
*/
159-
return pds_vfio_suspend_wait_device_cmd(pds_vfio);
160+
return pds_vfio_suspend_wait_device_cmd(pds_vfio, type);
160161
}
161162

162163
int pds_vfio_resume_device_cmd(struct pds_vfio_pci_device *pds_vfio, u8 type)

0 commit comments

Comments
 (0)