Received: by 10.192.165.156 with SMTP id m28csp806089imm; Thu, 19 Apr 2018 07:53:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx49KinsWnDneR6A2AEZ60+xfyPX5XEk0sIhSWLxUBUELrb37MpRoh96pVNV6c1YR3f3pQx1W X-Received: by 2002:a17:902:b604:: with SMTP id b4-v6mr6542373pls.109.1524149584244; Thu, 19 Apr 2018 07:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524149584; cv=none; d=google.com; s=arc-20160816; b=tMq25jltOjQWmRXUuRsAcbUFe+YSSYAXra0ovXfetELCg/Sn9s20Ex96LLsg/aDfx9 H48eZUcN6lslGqV5wIVKa/YbcMqTZetveuNrxbCjKZHmlfQa6BwIpOg6m4u8NiyVHgZT lmLfx0AoPUu+AQMExQBdzpdqGTrbhrxzv6NxD2usGkXGK/U2OU15bRJSPTJZNCBjATYB oXsmRGf9EaGdHnlOXzzflOsg3dnlg5IHJ/Oqe8afNERQx7ONb8qkmDijc5NIjQAbZtxf NfCC78Lhhrrv/FYCyjNMgCJbSVJlq5nAlnHp9n/oTMU2w7hysXP/ezre4WE0b8J2pDwQ jGkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=4jOkxFg/Jn8fTWBhskVResbxRqwYHq9rn1FnO2hxyE0=; b=O8OZN+2fBHpQZkspzHZQEQy9I2oz5Lrmcd/UF97wQfsalsfu2J9UA0+mxKy6gO1dNC DGUYdc27oj44D2aPkyXWNUr3aOU20czx6CTTrjH1rhv6LFjAceS5k6pPgTadoaqEwK4t W5kwpDwBr852p8EtMZ9qeJqzxy88fB+/VN4foGCzQ38cw5+keYOcqJ7LjVm6SpRHThjk spJE55Bzw76tuuYT2eQh6I6qNoP+Gl5KQpkK7m3O+9acc3+0dtr5FLE63qSusmlf5n+f 1rBtOhzyHAo1nEHDKp7Xlfqdl+dgTMTRB+5eiGc3BsVxRJgqwkkXa38Hi2LOvqtpftP1 muWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si2692638pfn.303.2018.04.19.07.52.50; Thu, 19 Apr 2018 07:53:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753632AbeDSOtd (ORCPT + 99 others); Thu, 19 Apr 2018 10:49:33 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46138 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753518AbeDSOtZ (ORCPT ); Thu, 19 Apr 2018 10:49:25 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3JEnLI8119347 for ; Thu, 19 Apr 2018 10:49:25 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hev3ebw1m-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 19 Apr 2018 10:49:20 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Apr 2018 15:48:17 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 19 Apr 2018 15:48:14 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3JEmDd254657170; Thu, 19 Apr 2018 14:48:13 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 05CBF5203F; Thu, 19 Apr 2018 14:39:00 +0100 (BST) Received: from morel-ThinkPad-W530.boeblingen.de.ibm.com (unknown [9.152.224.146]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id B3AA452045; Thu, 19 Apr 2018 14:38:59 +0100 (BST) From: Pierre Morel To: pasic@linux.vnet.ibm.com, bjsdjshi@linux.vnet.ibm.com Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, cohuck@redhat.com Subject: [PATCH 00/10] vfio: ccw: Refactoring the VFIO CCW state machine Date: Thu, 19 Apr 2018 16:48:03 +0200 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 18041914-0044-0000-0000-0000054A09CC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041914-0045-0000-0000-0000288A25F0 Message-Id: <1524149293-12658-1-git-send-email-pmorel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-19_05:,, 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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804190131 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The goal of the patch serie is to enhance the state machine by centralizing all state changes inside the state machine wrapper and have a clear view of state changes. Doing this will: - facilitate the introduction of new events received from QEMU (cancel/clear/stsh) or from the hardware (chr events). - produce small, easy to maintain FSM functions with clear incoming events and outgoing states This series introduces new states and events and suppressed others. - VFIO_CCW_STATE_NOT_OPER : when the Sub-Channel is KO - VFIO_CCW_STATE_STANDBY : when it is offline - VFIO_CCW_STATE_IDLE : when it is ready for I/O - VFIO_CCW_STATE_BUSY : when it is busy doing I/O - VFIO_CCW_STATE_QUIESCING: when it is busy going offline - VFIO_CCW_EVENT_INIT : the channel setup (admin) - VFIO_CCW_EVENT_NOT_OPER : something really wrong happened - VFIO_CCW_EVENT_SSCH_REQ : Starting an I/O request (UAPI) - VFIO_CCW_EVENT_INTERRUPT: Receiving an interrupt (callback) - VFIO_CCW_EVENT_SCH_EVENT: Receiving a channel event (callback) - VFIO_CCW_EVENT_ONLINE : Channel is set online (admin) - VFIO_CCW_EVENT_OFFLINE : Channel is set offline (admin) The ABI did not change, so a standard QEMU devel branch can be used. Pierre Morel (10): vfio: ccw: Moving state change out of IRQ context vfio: ccw: Transform FSM functions to return state vfio: ccw: new SCH_EVENT event vfio: ccw: replace IO_REQ event with SSCH_REQ event vfio: ccw: Suppress unused event parameter vfio: ccw: Make FSM functions atomic vfio: ccw: Introduce the INIT event vfio: ccw: Handling reset and shutdown with states vfio: ccw: Suppressing the BOXED state vfio: ccw: Let user wait when busy on IO drivers/s390/cio/vfio_ccw_drv.c | 120 +++++++------------- drivers/s390/cio/vfio_ccw_fsm.c | 215 +++++++++++++++++++++++++----------- drivers/s390/cio/vfio_ccw_ops.c | 58 +++++----- drivers/s390/cio/vfio_ccw_private.h | 21 +++- 4 files changed, 232 insertions(+), 182 deletions(-) -- 2.7.4