Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3598841imm; Mon, 13 Aug 2018 14:51:44 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxg9Inva6BQo56sUs6obR04DRJTMFcyp6unsHXZ7sb/BoVyALdaFg1raL84orgrQrImwIoD X-Received: by 2002:a17:902:8b86:: with SMTP id ay6-v6mr17732325plb.25.1534197103966; Mon, 13 Aug 2018 14:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534197103; cv=none; d=google.com; s=arc-20160816; b=mqMS5DllZefhISlPbI43rMnXwuRj6VIAK2fZ/KNCsJIhfrK1BCIoAYEYY/gsDbEYfT 6/svDqtkwmdq0N2Q5SxjenI+CwRKti2c0w1FdFWKbk+NXtg7nfJZZg/eNJHYbrkwUCGo GlQXjw+oud1OTUfAd4F7FlBwAWxnddMM/Ui35a5cdK9NdOwQNaZ8nj5UMaC8akhVsC3+ gTqChVp0iA3YK2jGvlU7IJY/3leZFiG1TiQFjMSYSsxlvnBXT5yl5p/e8IdXzjWmsoqt 4B6YQAK1KMyfYytHbU2ZYHjeA4h2BVic0UHr+fSUF1YaKL038LNWbGy095FPgmDjoEj4 Xeqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=1TRa8tq7+dl8rFFCNRdiLBxxdZMcPZZjU0EIDZvUzaU=; b=XX8MKF2nHeqpUHq0l2vsald61okbjkbsb2jhcrYyAboCqcOI8G/zZsFrE7oOIGYX14 rZ8EchDU9/jmroYr9QgZufNDu/0bX+W9TuS75Q01acZZDyMUWfKDXC2womQ1b2RmOz7N y4Mp1h/z9IDffag9DRcX1R9HMcHK/tf6uDcyXr8i/P7SGKEx6MXQe0u0gbT9kKS0MIRk /T4NHzMT2F0FMRUHetk77kxzVnw8q+9AmdsMWdHhMd9b/7xq53KJYDs3xyxiEBEInLWS Jl2kCRraYqg2a/Vd1qFWnUzgMKhk7VsxxQTjOSyU5wqB3v+Q9k7g0ESTBaSyvRndEIUC BzcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5-v6si16446457pgn.306.2018.08.13.14.51.29; Mon, 13 Aug 2018 14:51:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731922AbeHNAeO (ORCPT + 99 others); Mon, 13 Aug 2018 20:34:14 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57718 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731543AbeHNAdQ (ORCPT ); Mon, 13 Aug 2018 20:33:16 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7DLn7c0102516 for ; Mon, 13 Aug 2018 17:49:11 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kug78vaqd-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 13 Aug 2018 17:49:11 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 13 Aug 2018 17:49:09 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 13 Aug 2018 17:49:05 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7DLn3w92359570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 13 Aug 2018 21:49:03 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CFDE912405A; Mon, 13 Aug 2018 18:50:01 -0400 (EDT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B8FD0124054; Mon, 13 Aug 2018 18:50:00 -0400 (EDT) Received: from localhost.localdomain (unknown [9.85.141.105]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTPS; Mon, 13 Aug 2018 18:50:00 -0400 (EDT) From: Tony Krowiak To: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, borntraeger@de.ibm.com, cohuck@redhat.com, kwankhede@nvidia.com, bjsdjshi@linux.vnet.ibm.com, pbonzini@redhat.com, alex.williamson@redhat.com, pmorel@linux.vnet.ibm.com, alifm@linux.vnet.ibm.com, mjrosato@linux.vnet.ibm.com, jjherne@linux.vnet.ibm.com, thuth@redhat.com, pasic@linux.vnet.ibm.com, berrange@redhat.com, fiuczy@linux.vnet.ibm.com, buendgen@de.ibm.com, akrowiak@linux.vnet.ibm.com, frankja@linux.ibm.com, Tony Krowiak Subject: [PATCH v9 18/22] s390: vfio-ap: implement VFIO_DEVICE_RESET ioctl Date: Mon, 13 Aug 2018 17:48:15 -0400 X-Mailer: git-send-email 1.7.1 In-Reply-To: <1534196899-16987-1-git-send-email-akrowiak@linux.vnet.ibm.com> References: <1534196899-16987-1-git-send-email-akrowiak@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18081321-0060-0000-0000-0000029D5F12 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009538; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01073087; UDB=6.00552883; IPR=6.00853043; MB=3.00022698; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-13 21:49:08 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18081321-0061-0000-0000-000046282BB3 Message-Id: <1534196899-16987-19-git-send-email-akrowiak@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-13_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=984 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808130219 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Krowiak Implements the VFIO_DEVICE_RESET ioctl. This ioctl zeroizes all of the AP queues assigned to the guest. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Tested-by: Michael Mueller Tested-by: Farhan Ali Reviewed-by: Pierre Morel Tested-by: Pierre Morel Signed-off-by: Christian Borntraeger --- drivers/s390/crypto/vfio_ap_ops.c | 5 ++++- 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 cc90323..d4a065b 100644 --- a/drivers/s390/crypto/vfio_ap_ops.c +++ b/drivers/s390/crypto/vfio_ap_ops.c @@ -832,7 +832,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; @@ -848,6 +848,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, true); + break; default: ret = -EOPNOTSUPP; break; -- 1.7.1