From patchwork Fri Apr 17 02:29:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Farman X-Patchwork-Id: 11494019 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EADC8112C for ; Fri, 17 Apr 2020 02:30:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA8D921D93 for ; Fri, 17 Apr 2020 02:30:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729338AbgDQCaL (ORCPT ); Thu, 16 Apr 2020 22:30:11 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41906 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729250AbgDQCaK (ORCPT ); Thu, 16 Apr 2020 22:30:10 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03H2CCHi144096 for ; Thu, 16 Apr 2020 22:30:08 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 30f3f4gacg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 16 Apr 2020 22:30:08 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 17 Apr 2020 03:29:27 +0100 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 17 Apr 2020 03:29:25 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 03H2Sugf48562642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Apr 2020 02:28:56 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3A21A11C04A; Fri, 17 Apr 2020 02:30:02 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2739911C058; Fri, 17 Apr 2020 02:30:02 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Fri, 17 Apr 2020 02:30:02 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 4958) id AF636E026B; Fri, 17 Apr 2020 04:30:01 +0200 (CEST) From: Eric Farman To: linux-s390@vger.kernel.org, kvm@vger.kernel.org Cc: Cornelia Huck , Halil Pasic , Jason Herne , Jared Rossi , Eric Farman Subject: [PATCH v3 0/8] s390x/vfio-ccw: Channel Path Handling [KVM] Date: Fri, 17 Apr 2020 04:29:53 +0200 X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 x-cbid: 20041702-0016-0000-0000-00000305EC9C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20041702-0017-0000-0000-00003369F36A Message-Id: <20200417023001.65006-1-farman@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-16_10:2020-04-14,2020-04-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 mlxscore=0 mlxlogscore=870 bulkscore=0 spamscore=0 phishscore=0 malwarescore=0 clxscore=1015 suspectscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004170010 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Here is a new pass at the channel-path handling code for vfio-ccw. Changes from previous versions are recorded in git notes for each patch. I dropped the "Remove inline get_schid()" patch from this version. When I made the change suggested in v2, it seemed rather frivolous and better to just drop it for the time being. I suspect that patches 5 and 7 would be better squashed together, but I have not done that here. For future versions, I guess. With this, and the corresponding QEMU series (to be posted momentarily), applied I am able to configure off/on a CHPID (for example, by issuing "chchp -c 0/1 xx" on the host), and the guest is able to see both the events and reflect the updated path masks in its structures. v2: https://lore.kernel.org/kvm/20200206213825.11444-1-farman@linux.ibm.com/ v1: https://lore.kernel.org/kvm/20191115025620.19593-1-farman@linux.ibm.com/ Eric Farman (3): vfio-ccw: Refactor the unregister of the async regions vfio-ccw: Refactor IRQ handlers vfio-ccw: Add trace for CRW event Farhan Ali (5): vfio-ccw: Introduce new helper functions to free/destroy regions vfio-ccw: Register a chp_event callback for vfio-ccw vfio-ccw: Introduce a new schib region vfio-ccw: Introduce a new CRW region vfio-ccw: Wire up the CRW irq and CRW region Documentation/s390/vfio-ccw.rst | 35 +++++- drivers/s390/cio/Makefile | 2 +- drivers/s390/cio/vfio_ccw_chp.c | 148 +++++++++++++++++++++++++ drivers/s390/cio/vfio_ccw_drv.c | 163 ++++++++++++++++++++++++++-- drivers/s390/cio/vfio_ccw_ops.c | 65 ++++++++--- drivers/s390/cio/vfio_ccw_private.h | 16 +++ drivers/s390/cio/vfio_ccw_trace.c | 1 + drivers/s390/cio/vfio_ccw_trace.h | 30 +++++ include/uapi/linux/vfio.h | 3 + include/uapi/linux/vfio_ccw.h | 18 +++ 10 files changed, 453 insertions(+), 28 deletions(-) create mode 100644 drivers/s390/cio/vfio_ccw_chp.c