Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2436942rdf; Mon, 6 Nov 2023 14:21:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEr7McAiSQw1XeeHEFnAMM0CdPq6ZNrszuDkS6THLhrdZ7QjnExqnuW2dc1L8Ooi3ojIN/j X-Received: by 2002:a17:903:5ce:b0:1cc:52b5:8df8 with SMTP id kf14-20020a17090305ce00b001cc52b58df8mr1082060plb.26.1699309285631; Mon, 06 Nov 2023 14:21:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699309285; cv=none; d=google.com; s=arc-20160816; b=vnaL0BFNZVM+f9SRI+aFcxk1mvy291mJ4/VUsES/PsBhp54wyL0MfYJaCVspge8mix Zc2o2xdjyFZuxggwCfYsYSw7uZQAOFVrQ96QRn2SWLfXTA81UcPJyIRhF6KTlfoWpbYM molU8UZ8J0rAsaNSyzGbMPHDQeKQBYzegoZNrLQu2rCMsNNPRwSZN/G+BokUloagpDGk VAHuPVBPLEV0ifvBKZ7GJ6Vt2hiAiVT1l3GSRRL6cPgnlaG/XG8XuAm7Q7XZOT7Gb53D a/j6ahcKEH5PprT413YIEXF2t4NSXR4ZY0m/bhPEnNlmuE7V0BGAV8ShVZd8zBRJ92MM mfig== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=mA552N5htsafit5Cwefei0xjOIrV3dSC6J30CUekmnc=; fh=adNevFS/WE1imi8eGovvBZxXLJQVKHK0DJcdifGyKfk=; b=f3ZTMDDf6KhRTCDTQ7uuACSFzxsujLvL0foqPR8buhw9pqKf+SUkCqU+QZxACqRg2U +PXyW8M/wZgdbslMy57TU7Ts59XwHdNKLQd3bhlx4V3P5G1QWU/GNg4ctNvjDOIAYCKF O5j6cp6kNDKaohFi9aKKSR5dYoPTeNhabXJYilHsZtIlib0jV1wuecIGO5eFRv+XvgHb 44N/wJIfnDhClmli6dV3KtdnalzEeafjVWG87txZIPyAzZVyuU301wNlDslLdr4QN2AQ 4WZmC6pK4sSrs/wyzfzjctWSgoG+ipm0GItVuqgYx+PCF3d3UJmcvfhmfojC9SgklIdZ dk9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ptQzSEA2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id w67-20020a636246000000b005a1d8816a2bsi102061pgb.72.2023.11.06.14.21.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 14:21:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ptQzSEA2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 008E6802F941; Mon, 6 Nov 2023 14:21:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233132AbjKFWVH (ORCPT + 99 others); Mon, 6 Nov 2023 17:21:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232005AbjKFWVF (ORCPT ); Mon, 6 Nov 2023 17:21:05 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7815D183; Mon, 6 Nov 2023 14:21:02 -0800 (PST) Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A6MBAbJ002837; Mon, 6 Nov 2023 22:21:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=mA552N5htsafit5Cwefei0xjOIrV3dSC6J30CUekmnc=; b=ptQzSEA2EQLxHCdT1h39b7ceIIebtU992z9oEfxHd7gm/kJsqE4oAQ9uej5WpebOR5vQ 0YKgFkhGMPXucnnc0Um68t1TXzA5b2ZohDPz4aoZoFoj6EiBa9gByz4Yqe8EHud7fvnb NZG78vFhGve7Ka6Juf2zZNxM58tn7Qa1FvCddUxjIQwNNuEK/lAaY4eXjgU688SKuhMy chC7m130Xu59JjA+4uHytCnGkuiOETMvJKDRQ4UnaZ7uD/P6oAc/BCM44G+m+jtLPnRs sIi2Q21m80o+7cbvA0L547aK1pGBCYoB+laBnwyZ04ELP9J3ZwYwTvot/vKQOBlwZzO+ Vw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u78q3r7jn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Nov 2023 22:21:01 +0000 Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3A6MFHUu013517; Mon, 6 Nov 2023 22:21:00 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 3u78q3r7jc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Nov 2023 22:21:00 +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 3A6M35C0025671; Mon, 6 Nov 2023 22:21:00 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3u619nce82-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Nov 2023 22:21:00 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3A6MKvbL17433250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Nov 2023 22:20:57 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 081DA2004B; Mon, 6 Nov 2023 22:20:57 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5B47520040; Mon, 6 Nov 2023 22:20:56 +0000 (GMT) Received: from li-ce58cfcc-320b-11b2-a85c-85e19b5285e0 (unknown [9.171.62.82]) by smtpav06.fra02v.mail.ibm.com (Postfix) with SMTP; Mon, 6 Nov 2023 22:20:56 +0000 (GMT) Date: Mon, 6 Nov 2023 23:20:54 +0100 From: Halil Pasic To: Tony Krowiak Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, jjherne@linux.ibm.com, borntraeger@linux.ibm.com, frankja@linux.ibm.com, imbrenda@linux.ibm.com, david@redhat.com, stable@vger.kernel.org, Halil Pasic Subject: Re: [PATCH] s390/vfio-ap: fix sysfs status attribute for AP queue devices Message-ID: <20231106232054.059b1d0a.pasic@linux.ibm.com> In-Reply-To: <20231020204838.409521-1-akrowiak@linux.ibm.com> References: <20231020204838.409521-1-akrowiak@linux.ibm.com> Organization: IBM X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: MtbJDBAnTwKkfBZWg5dE6U7jpycJDm1T X-Proofpoint-ORIG-GUID: IzzDEXocsv2P6GwOTOLF0oxeBlqt1mp0 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-06_15,2023-11-02_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 impostorscore=0 lowpriorityscore=0 adultscore=0 bulkscore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311060183 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 14:21:23 -0800 (PST) On Fri, 20 Oct 2023 16:48:35 -0400 Tony Krowiak wrote: > The 'status' attribute for AP queue devices bound to the vfio_ap device > driver displays incorrect status when the mediated device is attached to a > guest, but the queue device is not passed through. In the current > implementation, the status displayed is 'in_use' which is not correct; it > should be 'assigned'. This can happen if one of the queue devices > associated with a given adapter is not bound to the vfio_ap device driver. > For example: > > Queues listed in /sys/bus/ap/drivers/vfio_ap: > 14.0005 > 14.0006 > 14.000d > 16.0006 > 16.000d > > Queues listed in /sys/devices/vfio_ap/matrix/$UUID/matrix > 14.0005 > 14.0006 > 14.000d > 16.0005 > 16.0006 > 16.000d > > Queues listed in /sys/devices/vfio_ap/matrix/$UUID/guest_matrix > 14.0005 > 14.0006 > 14.000d > > The reason no queues for adapter 0x16 are listed in the guest_matrix is > because queue 16.0005 is not bound to the vfio_ap device driver, so no > queue associated with the adapter is passed through to the guest; > therefore, each queue device for adapter 0x16 should display 'assigned' > instead of 'in_use', because those queues are not in use by a guest, but > only assigned to the mediated device. > > Let's check the AP configuration for the guest to determine whether a > queue device is passed through before displaying a status of 'in_use'. > > Signed-off-by: Tony Krowiak > Fixes: f139862b92cf ("s390/vfio-ap: add status attribute to AP queue device's sysfs dir") Acked-by: Halil Pasic I'm not sure if there is documentation. I assume there is no additional documentation except for the code and the commit messages on what those actually mean. So there is no way to cross-check and no need to update it. I personally don't feel like having clarity on these states. In use does not actually mean that the guest is actually using it: the guest can happily ignore the queue. The unassigned is pretty clear. What "assigned" vs "in use" is supposed to express, not so much to me. I don't think this fix qualifies for the stable process, but it has been a while since I've looked at the corresponding process documentation. > Cc: stable@vger.kernel.org