Skip to content

Commit cd8a377

Browse files
Tony Krowiakborntraeger
authored andcommitted
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 <akrowiak@linux.ibm.com> Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Reviewed-by: Pierre Morel <pmorel@linux.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Tested-by: Michael Mueller <mimu@linux.ibm.com> Tested-by: Farhan Ali <alifm@linux.ibm.com> Tested-by: Pierre Morel <pmorel@linux.ibm.com> Message-Id: <20180925231641.4954-15-akrowiak@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
1 parent 46a7263 commit cd8a377

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/s390/crypto/vfio_ap_ops.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ static int vfio_ap_mdev_get_device_info(unsigned long arg)
917917
if (info.argsz < minsz)
918918
return -EINVAL;
919919

920-
info.flags = VFIO_DEVICE_FLAGS_AP;
920+
info.flags = VFIO_DEVICE_FLAGS_AP | VFIO_DEVICE_FLAGS_RESET;
921921
info.num_regions = 0;
922922
info.num_irqs = 0;
923923

@@ -933,6 +933,9 @@ static ssize_t vfio_ap_mdev_ioctl(struct mdev_device *mdev,
933933
case VFIO_DEVICE_GET_INFO:
934934
ret = vfio_ap_mdev_get_device_info(arg);
935935
break;
936+
case VFIO_DEVICE_RESET:
937+
ret = vfio_ap_mdev_reset_queues(mdev);
938+
break;
936939
default:
937940
ret = -EOPNOTSUPP;
938941
break;

0 commit comments

Comments
 (0)