Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4847970rdb; Fri, 15 Sep 2023 14:22:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/G6uw9hyizCO3IQ0cdqKNV2fQJWhzFF+ijix6vXSd3cN0KqhAh3ZMdAjhT5+5GZisT/9Z X-Received: by 2002:a17:903:41c2:b0:1b8:6a09:9cf9 with SMTP id u2-20020a17090341c200b001b86a099cf9mr3680612ple.26.1694812949006; Fri, 15 Sep 2023 14:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694812948; cv=none; d=google.com; s=arc-20160816; b=Ha30v40OYOivJWKDmqOaq8zi2sRvZ1Cc4KbMSFSffifW3hOyqQOUM01YhumGVdM7i6 W1j2mVrJ05fKKr14PM5NUvFP9ORYnVylgmvcLdklzpouKrkZtZirYq6lxCdU0u8nkin2 FoWEqWYhlzRZi3z30FTEdEEe2OZgLuNej1iAfpHABOT4zAc3Ez2m4C2ZiZFhQyvA5gVj E2Yo3g7ozhSk1Ij1KzgMt83h3Ztrr15D+31J/7WMXxLqdGNbp9cE20yQnfDMVRSLsxkD 1PF/7Pp9RXyrozeLtFn4Scpm8AGe2gS+7Kqu6vOG7nW49d1+aT5BJAktqmV8D5cD/Lg5 y/2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=Y+WwTtVVIEVlyjTXDCy8B6tsMdV6svWm5RmLNNGeGMg=; fh=8YjLYcYW2BMsT8GQodIPzkpdV3ew7oUBKI/KTF0Bkxc=; b=ZBf39oEQzP57lb4wrBLEDiaud+G+3QT1tiRaKGYXS4TgyfoQTUyQcgXaR+UdR37JdA J3lJq4nNhyFPBZkT51Ar8Jx5X0KmNOo8bIh3rtvPybaticx3KSM3Ct1mjI56Bccxi5ar mxwfgbcPokPhTrt9E+cd3GRSsJyG6fHnD9enULfz1oLqaVnkVnRdEZJwKkI86g0fygmW 7byCje4BnkS/qvGZjATq988HynlTJn6nN6dDgf4uv+5XszvUwpYzDCropfH9nxHEQaLH UJ3wXqrFICtxl3UN8gf+/d65FiQn6AhfUdecyhu6BQGVDSklOsdRkdZJUSntFf7++g04 ZUDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=BsduZN1+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id h14-20020a170902680e00b001bbd83490efsi3886443plk.138.2023.09.15.14.22.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 14:22:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=BsduZN1+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A4B328072827; Fri, 15 Sep 2023 07:04:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235506AbjIOOEZ (ORCPT + 99 others); Fri, 15 Sep 2023 10:04:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235486AbjIOOEX (ORCPT ); Fri, 15 Sep 2023 10:04:23 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 194D61FCE; Fri, 15 Sep 2023 07:04:19 -0700 (PDT) Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38FE3ae0018474; Fri, 15 Sep 2023 14:04:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=Y+WwTtVVIEVlyjTXDCy8B6tsMdV6svWm5RmLNNGeGMg=; b=BsduZN1+/M2CqaabPjLd6+oG89nQ4ydUzMy6+96/I6JbjKT7Ht9x84u1//trc7n4dep0 17qd+NT5lgHuYM1QhRcii4X/Ceya8+ft9BauvpdvcpfzMjfG2Zl4vz6j4EHXCbiqWQvJ lZqY7QrANpWraP66fGDT9CeC3IMKOKPTqA86rjOSuB5ZW5ABv30zZ3lSncpNoVx1J6UE yQ1zPmkuhMdt9Q2OOohiHJm4q7OA8Q/0oceBApolIGxNG/tj6krxQY1D66xAy+TFxrEp gCR1DouR17OdsYdrW/ANabVA5e1FeOKOo5Th0AjKEaViVB6Mq29VygRJdF0tOEO+tKqK lA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t4qk01wfm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 14:04:16 +0000 Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38FDuhjk023498; Fri, 15 Sep 2023 14:04:16 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t4qk01weh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 14:04:16 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38FDMGer023099; Fri, 15 Sep 2023 14:04:15 GMT Received: from smtprelay07.dal12v.mail.ibm.com ([172.16.1.9]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3t141pc61t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 14:04:15 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38FE4Eso24772882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Sep 2023 14:04:14 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 13EC758052; Fri, 15 Sep 2023 14:04:14 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 129EB5805D; Fri, 15 Sep 2023 14:04:13 +0000 (GMT) Received: from [9.61.101.13] (unknown [9.61.101.13]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Fri, 15 Sep 2023 14:04:12 +0000 (GMT) Message-ID: <5c7920fc-7e15-dbd2-91e6-c6822500d9ec@linux.ibm.com> Date: Fri, 15 Sep 2023 10:04:12 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 0/2] a couple of corrections to the IRQ enablement function Content-Language: en-US To: Matthew Rosato , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: jjherne@linux.ibm.com, pasic@linux.ibm.com, alex.williamson@redhat.com, borntraeger@linux.ibm.com, kwankhede@nvidia.com, frankja@linux.ibm.com, imbrenda@linux.ibm.com, david@redhat.com, Michael Mueller References: <20230913130626.217665-1-akrowiak@linux.ibm.com> <83cab22d-71c3-2bbc-856f-6527479f10ec@linux.ibm.com> From: Tony Krowiak In-Reply-To: <83cab22d-71c3-2bbc-856f-6527479f10ec@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed X-TM-AS-GCONF: 00 X-Proofpoint-GUID: mCYJvD3ViZxvcvtfmu9mDH8lYCSn4K-P X-Proofpoint-ORIG-GUID: KfGkphu9VH5zwJXooqwTssgi5BLwnm4N Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-15_10,2023-09-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 spamscore=0 malwarescore=0 phishscore=0 impostorscore=0 clxscore=1015 mlxscore=0 bulkscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309150121 X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 07:04:30 -0700 (PDT) On 9/13/23 14:13, Matthew Rosato wrote: > On 9/13/23 9:06 AM, Tony Krowiak wrote: >> This series corrects two issues related to enablement of interrupts in >> response to interception of the PQAP(AQIC) command: >> >> 1. Returning a status response code 06 (Invalid address of AP-queue >> notification byte) when the call to register a guest ISC fails makes no >> sense. >> >> 2. The pages containing the interrupt notification-indicator byte are not >> freed after a failure to register the guest ISC fails. >> > > Hi Tony, > > 3. Since you're already making changes related to gisc registration, you might consider a 3rd patch that looks at the return code for kvm_s390_gisc_unregister and tags the unexpected error rc somehow. This came up in a recent conversation I had with Michael, see this conversation towards the bottom: > > https://lore.kernel.org/linux-s390/0ddf808c-e929-c975-1b39-5ebc1f2fab62@linux.ibm.com/ When we receive a non-zero return code from kvm_s390_gisc_register, we log a DBF warning message. We can do the same for a non-zero rc from kvm_s390_gisc_unregister. > > 4. While looking at patch 1 I also had a question re: the AP_RESPONSE_OTHERWISE_CHANGED path in vfio_ap_irq_enable. Here's a snippet of the current code: > > case AP_RESPONSE_OTHERWISE_CHANGED: > /* We could not modify IRQ settings: clear new configuration */ > vfio_unpin_pages(&q->matrix_mdev->vdev, nib, 1); > kvm_s390_gisc_unregister(kvm, isc); > break; > > Is it safe to unpin the page before unregistering the gisc in this case? Or shouldn't the unpin happen after we have unregistered the gisc / set the IAM? I don't know the answer to the question, but it makes logical sense; so, I'll go ahead and create a third patch as you suggested. > >> Anthony Krowiak (2): >> s390/vfio-ap: unpin pages on gisc registration failure >> s390/vfio-ap: set status response code to 06 on gisc registration >> failure >> >> drivers/s390/crypto/vfio_ap_ops.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >