From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2E42C43387 for ; Wed, 19 Dec 2018 09:51:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A383821873 for ; Wed, 19 Dec 2018 09:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728378AbeLSJvN (ORCPT ); Wed, 19 Dec 2018 04:51:13 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34660 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727920AbeLSJvL (ORCPT ); Wed, 19 Dec 2018 04:51:11 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wBJ9iBI2134156 for ; Wed, 19 Dec 2018 04:51:10 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2pffphak8q-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 19 Dec 2018 04:51:10 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 19 Dec 2018 09:51:07 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 19 Dec 2018 09:51:06 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wBJ9p4Ww59637814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 19 Dec 2018 09:51:04 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 53CAA4C059; Wed, 19 Dec 2018 09:51:04 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0E00D4C04E; Wed, 19 Dec 2018 09:51:04 +0000 (GMT) Received: from [9.152.224.140] (unknown [9.152.224.140]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 19 Dec 2018 09:51:03 +0000 (GMT) Reply-To: pmorel@linux.ibm.com Subject: Re: [PATCH v3 2/6] vfio: ccw: Rework subchannel state on setup To: Eric Farman , pasic@linux.vnet.ibm.com Cc: cohuck@redhat.com, alifm@linux.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1543408867-16465-1-git-send-email-pmorel@linux.ibm.com> <1543408867-16465-3-git-send-email-pmorel@linux.ibm.com> From: Pierre Morel Date: Wed, 19 Dec 2018 10:51:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18121909-0008-0000-0000-000002A37377 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18121909-0009-0000-0000-0000220E0B4D Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-19_04:,, 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-1810050000 definitions=main-1812190085 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/12/2018 18:44, Eric Farman wrote: > My questions to this patch from the original RFC series are still > outstanding.  :( > > https://marc.info/?l=linux-s390&m=154223063716128&w=2 Hi Eric, Thanks for the following of this patch series. For your question about quiece during remove I do not think it should be a NOP, we must make sure the channel is disabled at that time. > > On 11/28/2018 07:41 AM, Pierre Morel wrote: >> The subchannel enablement and the according setting to the >> VFIO_CCW_STATE_STANDBY state should only be done when all >> parts of the VFIO mediated device have been initialized >> i.e. after the mediated device has been successfully opened. >> >> Let's stay in VFIO_CCW_STATE_NOT_OPER until the mediated >> device has been opened and set the VFIO_CCW_STATE_STANDBY >> on a successful open. >> >> On release the state is set back to VFIO_CCW_STATE_NOT_OPER >> by vfio_ccw_sch_quiesce(). >> >> When the mediated device is closed,  disable the sub channel >> by calling vfio_ccw_sch_quiesce(). >> >> Signed-off-by: Pierre Morel >> --- >>   drivers/s390/cio/vfio_ccw_async.c   | 11 +++++++++++ > > Ah, this series is built on Connie's async changes.  Okay.  [1] Yes, and after reflections I think the timing is bad so I prefer to wait for the series from Connie on hsch/csch to be finished before going on with this series. Otherwise I fear to only add noise to the current discussions. > >>   drivers/s390/cio/vfio_ccw_drv.c     | 10 +--------- >>   drivers/s390/cio/vfio_ccw_ops.c     | 27 +++++++++++++++++++++------ ...snip... >> @@ -170,6 +184,7 @@ static void vfio_ccw_mdev_release(struct >> mdev_device *mdev) >>           dev_get_drvdata(mdev_parent_dev(mdev)); >>       int i; >> +    vfio_ccw_sch_quiesce(private->sch); >>       vfio_unregister_notifier(mdev_dev(mdev), VFIO_IOMMU_NOTIFY, >>                    &private->nb); > > [1] If Connie's async patches go in first, then the stuff in your > "vfio_ccw_unregister_async_dev_regions" is also added here.  That could > be removed and replaced with a call to your new function, yes? certainly. Thanks for your comments. Regards, Pierre -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany