[PATCH v7 12/15] s390/vfio-ap: Transition device migration state from STOP to RUNNING and vice versa
Anthony Krowiak <[email protected]>
| Newsgroups | org.kernel.vger.linux-s390,org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
The transition from STOP to RUNNING and vice versa indicates that the vfio device is operating normally and migration is not currently taking place. In this case, just set the new state. Signed-off-by: Anthony Krowiak <[email protected]> --- drivers/s390/crypto/vfio_ap_migration.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/s390/crypto/vfio_ap_migration.c b/drivers/s390/crypto/vfio_ap_migration.c index 30160e3ddded..24955f70e13e 100644 --- a/drivers/s390/crypto/vfio_ap_migration.c +++ b/drivers/s390/crypto/vfio_ap_migration.c @@ -1524,12 +1524,17 @@ vfio_ap_transition_to_state(struct ap_matrix_mdev *matrix_mdev, return NULL; } + /* + * These states indicate migration has either not been initiated or + * has completed and the vfio-ap device is operating normally. Since the + * vfio-ap device does not virtualize a DMA device, there is no internal + * device state to incorporate into the vfio-ap device on the target. + */ if ((cur_state == VFIO_DEVICE_STATE_STOP && new_state == VFIO_DEVICE_STATE_RUNNING) || (cur_state == VFIO_DEVICE_STATE_RUNNING && new_state == VFIO_DEVICE_STATE_STOP)) { - /* TODO */ - return ERR_PTR(-EOPNOTSUPP); + return NULL; } /* vfio_mig_get_next_state() does not use arcs other than the above */ -- 2.53.0