[v3,3/3] s390/vfio-ap: improve reaction to response code 07 from PQAP(AQIC) command
Message ID | 20231109164427.460493-4-akrowiak@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp563789vqs; Thu, 9 Nov 2023 08:47:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyYz4GVKF+ZkKAqJ5D6meYZjTeHF7t3Xytop+BrRrggS9pd3wKxiJlvhRS85p0qs7cGQVw X-Received: by 2002:a05:6a20:4329:b0:154:e793:52b3 with SMTP id h41-20020a056a20432900b00154e79352b3mr6556564pzk.0.1699548461680; Thu, 09 Nov 2023 08:47:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699548461; cv=none; d=google.com; s=arc-20160816; b=ulM3oStaNbrAhstKumGY+L3svV283COSm/ujriaiJzaWcmV4x4f0ZPj3R2HdZrYx9h 1hGiMrvRrPE1EnRoq0wPD5seTdVWchhR3EftwXAzYjDvf+dw4bCzWm9vbw0gI5pjUtyc BRo9JuOBGde2Mwqj2jqWvgmZ29emLrxRF3PlchihiA7HfV6OY7zjTOFxg5SHDbKhkmM6 rYlVlb5iel9fq+6xI6rLVjZozDU5Aib27OagIb0LA+kXVvhy0dKO5/tJJoNi3Fm1KTGX yH9v74O+RAWUEbq5oAc0SiChlujhocPC3S5AcjILbz8OnIZTgRZjxhnk0mLI5WRiW/a6 ZlzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gQ2tRQf+68bvSbGEJ8gu3v6Z8ALX4GNpA2mskZujjWU=; fh=vxEorB+yPtSMJ8BpiXvcSYO8G1zMgo/xj5h2awmpn/k=; b=Q0/uzkLFtFyf5/wJg2M8CrLOaW8rzJ78qTB0KjPZ5nl3OGo++IXvbsMmo/t+KjC8vv As3mY5DTzjm5fUhY/cMGMaQoQeZHylpcaWODKsZBqdmAjqqaY6gKvXe5LWGvRn/bu+Ez AyTH035f3A8vOqDPLN8Xxf9ae2ATLw2LC1OuJYcxaVtEr1MNvxYnH6Ct+W7Bfa2rbROw KmkEt9JI96h/rMNvY3xCA7qPoCUAYY8K8ZAEdyLcTZdtsj5sWhk/hkAvBkLQMq+p3D+3 +8T5GXTcVBOMLvuu4qrtR3E48tCw90s3mGRjfYLhOjzTLfyGKo0zamTh47p4JJwwmp97 mOOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=iLfPKHv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s20-20020a17090ad49400b0027b0acd55d2si2052424pju.101.2023.11.09.08.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 08:47:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=iLfPKHv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 36C9E80978AB; Thu, 9 Nov 2023 08:46:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343989AbjKIQqU (ORCPT <rfc822;lhua1029@gmail.com> + 31 others); Thu, 9 Nov 2023 11:46:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234985AbjKIQpv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Nov 2023 11:45:51 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97EF844A0; Thu, 9 Nov 2023 08:45:03 -0800 (PST) Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A9GZZ38012040; Thu, 9 Nov 2023 16:45:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=gQ2tRQf+68bvSbGEJ8gu3v6Z8ALX4GNpA2mskZujjWU=; b=iLfPKHv3wmf7T/KHpuJA5hYZRJh00B/cQrxalHydO+9+5LooeDYYQ81bnIz/W3fydtS/ KJDaNOm7SDEC00uDmzVkGHKVJykgpmlWEvLT+o2MvLflaYGTd/c9qJGTYyepYyTsI1E9 Wk4rLJ3p2tLurIK8GuQbo7Y08vFX4HcrV78djqWuiShFIeKU0b72+m3KIVFflMxsc3Zj 6sLRAQAK0vbwv2geRaoiUmWXtU8oyZmc0QYyZsKiRUQt4zCJ81xg4phi1SiAOOgXCCz0 De5prVAm2c+pyp58uPR/DmCYMdZbCsoyWd5cqQSeyRVL+UPyZvv8vWMZDyEmvhrP7UlL jg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u9332gcku-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Nov 2023 16:45:02 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3A9GaJf2015609; Thu, 9 Nov 2023 16:45:01 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u9332gck8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Nov 2023 16:45:01 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3A9EMDGt019231; Thu, 9 Nov 2023 16:45:01 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([172.16.1.8]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3u7w2450t0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Nov 2023 16:45:01 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3A9Gj0gQ11665926 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 9 Nov 2023 16:45:00 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 87F6D58056; Thu, 9 Nov 2023 16:45:00 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 18EF758052; Thu, 9 Nov 2023 16:44:59 +0000 (GMT) Received: from li-2c1e724c-2c76-11b2-a85c-ae42eaf3cb3d.ibm.com.com (unknown [9.61.74.193]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 9 Nov 2023 16:44:58 +0000 (GMT) From: Tony Krowiak <akrowiak@linux.ibm.com> To: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: jjherne@linux.ibm.com, pasic@linux.ibm.com, borntraeger@linux.ibm.com, frankja@linux.ibm.com, imbrenda@linux.ibm.com, david@redhat.com, Matthew Rosato <mjrosato@linux.ibm.com> Subject: [PATCH v3 3/3] s390/vfio-ap: improve reaction to response code 07 from PQAP(AQIC) command Date: Thu, 9 Nov 2023 11:44:22 -0500 Message-ID: <20231109164427.460493-4-akrowiak@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231109164427.460493-1-akrowiak@linux.ibm.com> References: <20231109164427.460493-1-akrowiak@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: XZ8uLpD6hwxVgKkN7MZYFWq_TLcpGXCr X-Proofpoint-GUID: sUA7RPTBNSLoafyFgIiTZlVhD6pmQIi7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-09_14,2023-11-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 bulkscore=0 impostorscore=0 mlxscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311090127 Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 09 Nov 2023 08:46:31 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782105727870855770 X-GMAIL-MSGID: 1782105727870855770 |
Series |
s390/vfio-ap: a couple of corrections to the IRQ enablement function
|
|
Commit Message
Anthony Krowiak
Nov. 9, 2023, 4:44 p.m. UTC
Let's improve the vfio_ap driver's reaction to reception of response code 07 from the PQAP(AQIC) command when enabling interrupts on behalf of a guest: * Unregister the guest's ISC before the pages containing the notification indicator bytes are unpinned. * Capture the return code from the kvm_s390_gisc_unregister function and log a DBF warning if it fails. Suggested-by: Matthew Rosato <mjrosato@linux.ibm.com> Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> --- drivers/s390/crypto/vfio_ap_ops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c index 25d7ce2094f8..4e80c211ba47 100644 --- a/drivers/s390/crypto/vfio_ap_ops.c +++ b/drivers/s390/crypto/vfio_ap_ops.c @@ -476,8 +476,11 @@ static struct ap_queue_status vfio_ap_irq_enable(struct vfio_ap_queue *q, break; case AP_RESPONSE_OTHERWISE_CHANGED: /* We could not modify IRQ settings: clear new configuration */ + ret = kvm_s390_gisc_unregister(kvm, isc); + if (ret) + VFIO_AP_DBF_WARN("%s: kvm_s390_gisc_unregister: rc=%d isc=%d, apqn=%#04x\n", + __func__, ret, isc, q->apqn); vfio_unpin_pages(&q->matrix_mdev->vdev, nib, 1); - kvm_s390_gisc_unregister(kvm, isc); break; default: pr_warn("%s: apqn %04x: response: %02x\n", __func__, q->apqn,