From patchwork Wed Nov 28 12:41:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Morel X-Patchwork-Id: 10702539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90E91181D for ; Wed, 28 Nov 2018 12:41:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 770CB2D214 for ; Wed, 28 Nov 2018 12:41:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65BC42D1A6; Wed, 28 Nov 2018 12:41:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFFE32D1BE for ; Wed, 28 Nov 2018 12:41:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727941AbeK1Xmr (ORCPT ); Wed, 28 Nov 2018 18:42:47 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33050 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727802AbeK1Xmq (ORCPT ); Wed, 28 Nov 2018 18:42:46 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wASCdAOq020836 for ; Wed, 28 Nov 2018 07:41:14 -0500 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p1tve0uqv-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 07:41:13 -0500 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 28 Nov 2018 12:41:11 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 28 Nov 2018 12:41:09 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wASCf7S58782082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 28 Nov 2018 12:41:07 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 706504C044; Wed, 28 Nov 2018 12:41:07 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 347764C040; Wed, 28 Nov 2018 12:41:07 +0000 (GMT) Received: from morel-ThinkPad-W530.boeblingen.de.ibm.com (unknown [9.152.224.168]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 28 Nov 2018 12:41:07 +0000 (GMT) From: Pierre Morel To: pasic@linux.vnet.ibm.com Cc: cohuck@redhat.com, farman@linux.ibm.com, alifm@linux.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH v3 0/6] vfio: ccw: VFIO CCW cleanup part1 Date: Wed, 28 Nov 2018 13:41:01 +0100 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 18112812-0012-0000-0000-000002D17960 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112812-0013-0000-0000-00002106BE1C Message-Id: <1543408867-16465-1-git-send-email-pmorel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-28_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 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-1811280112 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The goal of the patches of this serie is to clarify the code of state/event handling. - First patch (already acked/applied) makes sure that every structures are initialized before the mediated device is registered. (Only here to apply the serie on the main tree). - vfio: ccw: Rework subchannel state on setup makes sure that the device can not be used before a guest is ready to drive it. - vfio: ccw: Rework subchannel state on removing could be squash with the previous: same kind of rewriting but for the removing/release callbacks. - vfio: ccw: Rework subchannel state on sch_event sch_event handling seems quite poor to me. Anyway, I do not understand why we hould have state change there. - vfio: ccw: Documenting state transitions - vfio: ccw: serialize the write system calls Quite independent of the previous patches, this makes sure that the entry in the driver is serialized. Pierre Morel (6): vfio: ccw: Register mediated device once all structures are initialized vfio: ccw: Rework subchannel state on setup vfio: ccw: Rework subchannel state on removing vfio: ccw: Rework subchannel state on sch_event vfio: ccw: Documenting state transitions vfio: ccw: serialize the write system calls Documentation/s390/vfio-ccw.txt | 45 +++++++++++++++++++++++++ drivers/s390/cio/vfio_ccw_async.c | 11 +++++++ drivers/s390/cio/vfio_ccw_drv.c | 30 ++++------------- drivers/s390/cio/vfio_ccw_ops.c | 65 ++++++++++++++++++++++++------------- drivers/s390/cio/vfio_ccw_private.h | 1 + 5 files changed, 105 insertions(+), 47 deletions(-)