Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3915217pxv; Mon, 26 Jul 2021 15:44:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfl5nvUQ0qAkbcohzP4evGxWT0HX2Q3xAl4bOjCaISIaluv7iNF9zLkF/UiGoK+5S3nCwo X-Received: by 2002:a05:6e02:52d:: with SMTP id h13mr15129150ils.119.1627339476137; Mon, 26 Jul 2021 15:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627339476; cv=none; d=google.com; s=arc-20160816; b=iapH810b68ytWdrBfR8akhWD0XT/GU63gSq8EneVHVdgDcxCWTzJ8nf9N5m/3lH+cw ks433faYz3pCVWDJ86+xeoLyEmc03f/UYRPlPo4m2aJhSMLjWZTU5f9F2jfIf9KHzp7h GAqoYeh9Dy+771pRSW/EtuMDB/pIqn7Rnl4R1ujhYLJ275GJxrHVHww19yBWF+nldLVX xbnaCZx+sawqMFI8Fthr9GMfsYSMQK3xtx3btuVY/o4z9IFsH9dtamD9BqD0YXbDKUk6 X9Z9z0/G1PAQuX+/4FNv7dUU4a3+ylmb3GkUr2ARkCsBCP7JCq1NPwRBa7vFrqHpMJMp MK6A== 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=16DXP9GnZ2JvM0e4ysTidTzka9jUM7L0eUZ62586l+Q=; b=MOKMl7b/ZnPhN7qij16gCawpIyfBx9ZN1KQJJatfAd47KfTbleGQh2ENrSwexJx7xj FimVG3849g9Bp/5iBT2zKhC6aGueH1CVV41px5Ri6HQNfDn3MDB0ZujW6wmgAkK1qs2F i03WB5FGtzbHGWhQCrc+CPSxoZd6q/pC6O96iEkEjdp0ZoEn20bb+05nuVINU7wka1s3 T69VTo+Pv5D6onbpB9zEh56eOrQFBk/Wyv1gxHrDQVmoYoO+H4VUHulqt7Ib2E5J61D6 okZdYn+gusckFCnxJPLJIDMq4P2xaernfb32cj9PnzODqBkLx9iaRRvh+Upf4Ehh75qg iVVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=saFQmEHv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b20si1297241jat.16.2021.07.26.15.44.23; Mon, 26 Jul 2021 15:44:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=saFQmEHv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232938AbhGZWDO (ORCPT + 99 others); Mon, 26 Jul 2021 18:03:14 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:26848 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231502AbhGZWDO (ORCPT ); Mon, 26 Jul 2021 18:03:14 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16QM8UC3136893; Mon, 26 Jul 2021 18:43:40 -0400 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=16DXP9GnZ2JvM0e4ysTidTzka9jUM7L0eUZ62586l+Q=; b=saFQmEHvIiRO07cxpijTmGu6Ea1FBG4J5bc7FMQr229d6faA65D/ovFtMRe74CYKTR2c ocCRJTE5D/ZCcMgjAancCtGpwOLcnTV3qsZoeklNqtUtpa+KnuDm7y/M8y1GOzY/UviG mlGtOlzIVoffRuoA8vrmmDX0pLPuAh/ii/ASBZN1pu4wOO3edpEBxTv0pIp+ewri+XFK A7vxBFnLdr7Yl1SIquRj60hEGyO6A1sarzCp4YhF1Dh8XM027KtebDsPSZSBPge/xgb4 AFhKufhgv3QtXFqdWI0LtmFbFl/bRnyZImvHMb++CTvOrVbQAKw3tmAJN1fmji8w31LN TA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3a25k6gp3h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 18:43:39 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 16QMZSZg044179; Mon, 26 Jul 2021 18:43:39 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 3a25k6gp2w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 18:43:39 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16QMY5sL020017; Mon, 26 Jul 2021 22:43:37 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma02fra.de.ibm.com with ESMTP id 3a235xr1dy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 22:43:37 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16QMhXsB29556996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Jul 2021 22:43:33 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AC947A4068; Mon, 26 Jul 2021 22:43:33 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A51CCA4067; Mon, 26 Jul 2021 22:43:32 +0000 (GMT) Received: from li-e979b1cc-23ba-11b2-a85c-dfd230f6cf82 (unknown [9.171.33.9]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 26 Jul 2021 22:43:32 +0000 (GMT) Date: Tue, 27 Jul 2021 00:43:29 +0200 From: Halil Pasic To: Jason Gunthorpe Cc: Tony Krowiak , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, borntraeger@de.ibm.com, cohuck@redhat.com, pasic@linux.vnet.ibm.com, jjherne@linux.ibm.com, alex.williamson@redhat.com, kwankhede@nvidia.com, david@redhat.com Subject: Re: [PATCH 2/2] s390/vfio-ap: replace open coded locks for VFIO_GROUP_NOTIFY_SET_KVM notification Message-ID: <20210727004329.3bcc7d4f.pasic@linux.ibm.com> In-Reply-To: <20210726220317.GA1721383@nvidia.com> References: <20210719193503.793910-1-akrowiak@linux.ibm.com> <20210719193503.793910-3-akrowiak@linux.ibm.com> <20210721164550.5402fe1c.pasic@linux.ibm.com> <20210723162625.59cead27.pasic@linux.ibm.com> <5380652f-e68f-bbd0-10c0-c7d541065843@linux.ibm.com> <20210726223628.4d7759bf.pasic@linux.ibm.com> <20210726220317.GA1721383@nvidia.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: EkASRpZg-Ob82msNFzZbQf8ROsJ4yYbb X-Proofpoint-ORIG-GUID: QCzJCtdH7BEfXjqvTAZRe2y9ZH0DDI-j X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-26_14:2021-07-26,2021-07-26 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 mlxlogscore=999 priorityscore=1501 suspectscore=0 malwarescore=0 bulkscore=0 spamscore=0 mlxscore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2107260127 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Jul 2021 19:03:17 -0300 Jason Gunthorpe wrote: > > You may end up with open and close running interleaved. What I' > > trying to say is, to my best knowledge, normally there is no > > you have to close it before you open it again rule for files. > > This is an existing bug in this driver, I've fixed in the reflck series. > > open_device/close_device will not run concurrently, or out of order, > afer it is fixed. Well if that is the case then provided your fix precedes this patch: Acked-by: Halil Pasic I'm not entirely happy with this. I did not thoroughly investigate the implications of reversing the locking order of the vfio-ap lock (driver global) and the kvm lock (guest specific). I will trust Tony and hope our KVM maintainers will scream if this is bad from interference and delay perspective. Regards, Halil