Lines Matching refs:pds_vfio
18 static int pds_vfio_client_adminq_cmd(struct pds_vfio_pci_device *pds_vfio, in pds_vfio_client_adminq_cmd() argument
23 struct pci_dev *pdev = pds_vfio_to_pci_dev(pds_vfio); in pds_vfio_client_adminq_cmd()
30 cmd.client_request.client_id = cpu_to_le16(pds_vfio->client_id); in pds_vfio_client_adminq_cmd()
40 dev_err(pds_vfio_to_dev(pds_vfio), in pds_vfio_client_adminq_cmd()
46 int pds_vfio_register_client_cmd(struct pds_vfio_pci_device *pds_vfio) in pds_vfio_register_client_cmd() argument
48 struct pci_dev *pdev = pds_vfio_to_pci_dev(pds_vfio); in pds_vfio_register_client_cmd()
65 pds_vfio->client_id = ci; in pds_vfio_register_client_cmd()
70 void pds_vfio_unregister_client_cmd(struct pds_vfio_pci_device *pds_vfio) in pds_vfio_unregister_client_cmd() argument
72 struct pci_dev *pdev = pds_vfio_to_pci_dev(pds_vfio); in pds_vfio_unregister_client_cmd()
80 err = pds_client_unregister(pdsc, pds_vfio->client_id); in pds_vfio_unregister_client_cmd()
85 pds_vfio->client_id = 0; in pds_vfio_unregister_client_cmd()
89 pds_vfio_suspend_wait_device_cmd(struct pds_vfio_pci_device *pds_vfio, u8 type) in pds_vfio_suspend_wait_device_cmd() argument
94 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_suspend_wait_device_cmd()
98 struct device *dev = pds_vfio_to_dev(pds_vfio); in pds_vfio_suspend_wait_device_cmd()
108 err = pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, true); in pds_vfio_suspend_wait_device_cmd()
117 pds_vfio->vf_id, jiffies_to_msecs(time_done - time_start)); in pds_vfio_suspend_wait_device_cmd()
122 pds_vfio->vf_id); in pds_vfio_suspend_wait_device_cmd()
129 int pds_vfio_suspend_device_cmd(struct pds_vfio_pci_device *pds_vfio, u8 type) in pds_vfio_suspend_device_cmd() argument
134 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_suspend_device_cmd()
138 struct device *dev = pds_vfio_to_dev(pds_vfio); in pds_vfio_suspend_device_cmd()
142 dev_dbg(dev, "vf%u: Suspend device\n", pds_vfio->vf_id); in pds_vfio_suspend_device_cmd()
149 err = pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, true); in pds_vfio_suspend_device_cmd()
151 dev_err(dev, "vf%u: Suspend failed: %pe\n", pds_vfio->vf_id, in pds_vfio_suspend_device_cmd()
160 return pds_vfio_suspend_wait_device_cmd(pds_vfio, type); in pds_vfio_suspend_device_cmd()
163 int pds_vfio_resume_device_cmd(struct pds_vfio_pci_device *pds_vfio, u8 type) in pds_vfio_resume_device_cmd() argument
168 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_resume_device_cmd()
172 struct device *dev = pds_vfio_to_dev(pds_vfio); in pds_vfio_resume_device_cmd()
175 dev_dbg(dev, "vf%u: Resume device\n", pds_vfio->vf_id); in pds_vfio_resume_device_cmd()
177 return pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, true); in pds_vfio_resume_device_cmd()
180 int pds_vfio_get_lm_state_size_cmd(struct pds_vfio_pci_device *pds_vfio, u64 *size) in pds_vfio_get_lm_state_size_cmd() argument
185 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_get_lm_state_size_cmd()
188 struct device *dev = pds_vfio_to_dev(pds_vfio); in pds_vfio_get_lm_state_size_cmd()
192 dev_dbg(dev, "vf%u: Get migration status\n", pds_vfio->vf_id); in pds_vfio_get_lm_state_size_cmd()
194 err = pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, false); in pds_vfio_get_lm_state_size_cmd()
281 int pds_vfio_get_lm_state_cmd(struct pds_vfio_pci_device *pds_vfio) in pds_vfio_get_lm_state_cmd() argument
286 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_get_lm_state_cmd()
289 struct pci_dev *pdev = pds_vfio_to_pci_dev(pds_vfio); in pds_vfio_get_lm_state_cmd()
295 dev_dbg(&pdev->dev, "vf%u: Get migration state\n", pds_vfio->vf_id); in pds_vfio_get_lm_state_cmd()
297 lm_file = pds_vfio->save_file; in pds_vfio_get_lm_state_cmd()
309 err = pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, false); in pds_vfio_get_lm_state_cmd()
319 int pds_vfio_set_lm_state_cmd(struct pds_vfio_pci_device *pds_vfio) in pds_vfio_set_lm_state_cmd() argument
324 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_set_lm_state_cmd()
327 struct pci_dev *pdev = pds_vfio_to_pci_dev(pds_vfio); in pds_vfio_set_lm_state_cmd()
333 dev_dbg(&pdev->dev, "vf%u: Set migration state\n", pds_vfio->vf_id); in pds_vfio_set_lm_state_cmd()
335 lm_file = pds_vfio->restore_file; in pds_vfio_set_lm_state_cmd()
348 err = pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, false); in pds_vfio_set_lm_state_cmd()
358 void pds_vfio_send_host_vf_lm_status_cmd(struct pds_vfio_pci_device *pds_vfio, in pds_vfio_send_host_vf_lm_status_cmd() argument
364 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_send_host_vf_lm_status_cmd()
368 struct device *dev = pds_vfio_to_dev(pds_vfio); in pds_vfio_send_host_vf_lm_status_cmd()
372 dev_dbg(dev, "vf%u: Set host VF LM status: %u", pds_vfio->vf_id, in pds_vfio_send_host_vf_lm_status_cmd()
381 err = pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, false); in pds_vfio_send_host_vf_lm_status_cmd()
387 int pds_vfio_dirty_status_cmd(struct pds_vfio_pci_device *pds_vfio, in pds_vfio_dirty_status_cmd() argument
393 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_dirty_status_cmd()
396 struct device *dev = pds_vfio_to_dev(pds_vfio); in pds_vfio_dirty_status_cmd()
400 dev_dbg(dev, "vf%u: Dirty status\n", pds_vfio->vf_id); in pds_vfio_dirty_status_cmd()
405 err = pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, false); in pds_vfio_dirty_status_cmd()
428 int pds_vfio_dirty_enable_cmd(struct pds_vfio_pci_device *pds_vfio, in pds_vfio_dirty_enable_cmd() argument
434 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_dirty_enable_cmd()
440 struct device *dev = pds_vfio_to_dev(pds_vfio); in pds_vfio_dirty_enable_cmd()
444 err = pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, false); in pds_vfio_dirty_enable_cmd()
454 int pds_vfio_dirty_disable_cmd(struct pds_vfio_pci_device *pds_vfio) in pds_vfio_dirty_disable_cmd() argument
459 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_dirty_disable_cmd()
462 struct device *dev = pds_vfio_to_dev(pds_vfio); in pds_vfio_dirty_disable_cmd()
466 err = pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, false); in pds_vfio_dirty_disable_cmd()
479 int pds_vfio_dirty_seq_ack_cmd(struct pds_vfio_pci_device *pds_vfio, in pds_vfio_dirty_seq_ack_cmd() argument
486 .vf_id = cpu_to_le16(pds_vfio->vf_id), in pds_vfio_dirty_seq_ack_cmd()
493 struct device *dev = pds_vfio_to_dev(pds_vfio); in pds_vfio_dirty_seq_ack_cmd()
502 err = pds_vfio_client_adminq_cmd(pds_vfio, &cmd, &comp, false); in pds_vfio_dirty_seq_ack_cmd()