aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Krowiak <[email protected]>2018-09-25 19:16:29 -0400
committerChristian Borntraeger <[email protected]>2018-09-28 15:50:11 +0200
commitcd8a377e3b40002cd7983b53f384456393908b7e (patch)
tree8ca0be30851251ed29cac0669024d7b4a35c0149
parent46a7263d4746a2659edafcb885e91e58bb6d3a2e (diff)
s390: vfio-ap: implement VFIO_DEVICE_RESET ioctl
Implements the VFIO_DEVICE_RESET ioctl. This ioctl zeroizes all of the AP queues assigned to the guest. Signed-off-by: Tony Krowiak <[email protected]> Reviewed-by: Halil Pasic <[email protected]> Reviewed-by: Pierre Morel <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Tested-by: Michael Mueller <[email protected]> Tested-by: Farhan Ali <[email protected]> Tested-by: Pierre Morel <[email protected]> Message-Id: <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]>
-rw-r--r--drivers/s390/crypto/vfio_ap_ops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
index 619900c56cd6..d3d9eb72b0f1 100644
--- a/drivers/s390/crypto/vfio_ap_ops.c
+++ b/drivers/s390/crypto/vfio_ap_ops.c
@@ -917,7 +917,7 @@ static int vfio_ap_mdev_get_device_info(unsigned long arg)
if (info.argsz < minsz)
return -EINVAL;
- info.flags = VFIO_DEVICE_FLAGS_AP;
+ info.flags = VFIO_DEVICE_FLAGS_AP | VFIO_DEVICE_FLAGS_RESET;
info.num_regions = 0;
info.num_irqs = 0;
@@ -933,6 +933,9 @@ static ssize_t vfio_ap_mdev_ioctl(struct mdev_device *mdev,
case VFIO_DEVICE_GET_INFO:
ret = vfio_ap_mdev_get_device_info(arg);
break;
+ case VFIO_DEVICE_RESET:
+ ret = vfio_ap_mdev_reset_queues(mdev);
+ break;
default:
ret = -EOPNOTSUPP;
break;