Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1249796imm; Fri, 29 Jun 2018 14:21:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKvesTWhbfWToCnTrQ65H6Gc8mPkyeqgchXWbLvWjX/ExexWOCB2HI4DqSKBCN+r3Ic71ME X-Received: by 2002:a17:902:9b98:: with SMTP id y24-v6mr16453376plp.177.1530307291343; Fri, 29 Jun 2018 14:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530307291; cv=none; d=google.com; s=arc-20160816; b=WdjqwL/3EvABqg5Kd8NVsNAKDe22LLlm/5BD1LfuNCq8/z+Dk5/e4b7VH4rdPdAuVu vWeFG8mD00n/W1x3/3EsNQ3K/LQkxJFbUvgRzr9Q/jF0CS9UNcid3GFBZSvBjmeUhMcl Sc9foS89ABOYggN578OKyo03Q3sqIct//M0YAXM8rExaiDPOG4QKEf8RPzlH/9ILPOJ+ nY1VmJpTtVW/i5nhAfk5RD2oGUYEBkcTlq+YGNyyGvuaX3Qukua/B1zl0E86UFLs0E2A S8XgW8v3jKOQYjQthqN78zJLdwQ8JT350P5i9dLJJAPdxexCxBB+EL0mJLG6xWdIJghy 9Vjw== 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=yArMnzLkR6mGD7RwVn/TWdfy501iw3Kze7I98Y9yYvM=; b=YboJmB95DV4B5K/CR4+Ryi0ijW6TKCUBKdaLvN+Tilnwuk3pdSn3lt9dcbiBX52p4d ElbAM7ePvo7Uwux4EUN9Q8EaJwuSs66i5CG6mzDU6umrL8p7UfMSxnuChECwAzQfw99V LLipX28Xm02aEr2lkJ7JVNph46yCoKbj19a9LIk1rVYyIs0tgjBwPP/rGQ4XFzFvjSzm xue0VSEMa9BYHzo6aNtNwvATaiTYvLicvjSStjkmZvddfAPRl/eVdobLTRISueeHf0oJ YsZE/D8MKfMEDQv/FYLDuOSUS7BaroRuDf6p4PCGI5BaKbhH2vKBDHmnvM0CkVTOTXol NWjw== 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 j6-v6si9885603pll.54.2018.06.29.14.21.14; Fri, 29 Jun 2018 14:21:31 -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 S966640AbeF2VNA (ORCPT + 99 others); Fri, 29 Jun 2018 17:13:00 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49668 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966201AbeF2VMQ (ORCPT ); Fri, 29 Jun 2018 17:12:16 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5TL9C6N025442 for ; Fri, 29 Jun 2018 17:12:15 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2jws2fff4q-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 29 Jun 2018 17:12:15 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 29 Jun 2018 17:12:14 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 29 Jun 2018 17:12:10 -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 w5TLC8J210158510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 29 Jun 2018 21:12:08 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D93DF124055; Fri, 29 Jun 2018 18:13:37 -0400 (EDT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D20B1124064; Fri, 29 Jun 2018 18:13:36 -0400 (EDT) Received: from localhost.localdomain (unknown [9.85.157.42]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTPS; Fri, 29 Jun 2018 18:13:36 -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, Tony Krowiak Subject: [PATCH v6 19/21] s390: vfio-ap: implement VFIO_DEVICE_RESET ioctl Date: Fri, 29 Jun 2018 17:11:21 -0400 X-Mailer: git-send-email 1.7.1 In-Reply-To: <1530306683-7270-1-git-send-email-akrowiak@linux.vnet.ibm.com> References: <1530306683-7270-1-git-send-email-akrowiak@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18062921-0072-0000-0000-000003775991 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009278; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01054189; UDB=6.00540581; IPR=6.00832112; MB=3.00021933; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-29 21:12:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062921-0073-0000-0000-00004888EAF8 Message-Id: <1530306683-7270-20-git-send-email-akrowiak@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-29_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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806290224 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 --- 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 e247491..4ff75c7 100644 --- a/drivers/s390/crypto/vfio_ap_ops.c +++ b/drivers/s390/crypto/vfio_ap_ops.c @@ -1161,7 +1161,7 @@ static int vfio_ap_mdev_get_device_info(unsigned long arg) 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; @@ -1177,6 +1177,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: pr_err("%s: ioctl command %d is not a supported command", VFIO_AP_MODULE_NAME, cmd); -- 1.7.1