From patchwork Wed Aug 30 16:36:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Halil Pasic X-Patchwork-Id: 807705 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xjB6p05hFz9sNn for ; Thu, 31 Aug 2017 02:39:30 +1000 (AEST) Received: from localhost ([::1]:51547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dn61X-0000SV-Ou for incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 12:39:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dn5yh-0007Fl-Aq for qemu-devel@nongnu.org; Wed, 30 Aug 2017 12:36:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dn5ye-0006H2-6a for qemu-devel@nongnu.org; Wed, 30 Aug 2017 12:36:31 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dn5yd-0006GX-Tw for qemu-devel@nongnu.org; Wed, 30 Aug 2017 12:36:28 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v7UGYaQp143845 for ; Wed, 30 Aug 2017 12:36:25 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2cp09w2rrd-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 30 Aug 2017 12:36:25 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 30 Aug 2017 17:36:23 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 30 Aug 2017 17:36:20 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v7UGaKpp10813498; Wed, 30 Aug 2017 16:36:20 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CE57A5203F; Wed, 30 Aug 2017 16:31:46 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id A056F52041; Wed, 30 Aug 2017 16:31:46 +0100 (BST) From: Halil Pasic To: Cornelia Huck Date: Wed, 30 Aug 2017 18:36:00 +0200 X-Mailer: git-send-email 2.13.5 X-TM-AS-GCONF: 00 x-cbid: 17083016-0008-0000-0000-000004917044 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17083016-0009-0000-0000-00001E21C2D5 Message-Id: <20170830163609.50260-1-pasic@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-08-30_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1708300251 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 0/9] X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dong Jia Shi , Halil Pasic , Pierre Morel , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This series has a character of a refactoring, as the initial motivation was improving readability and reducing complexity. Despite of the original intent the tree first patches buxfixes, and according to Dong Jia the patch-set also has a functional value: for ccw pass-through, he is planing to pass-through the instruction completion information (cc or interruption condition) from the kernel, and this patch set can pretty much be seen as a preparation for that. The basic idea is: tell how to handle an unusual conditon where it's identified, instead of mapping it to an errno (more or less arbitrarily), then possibly mapping these errnos around, to finally (mentally) map the errno back to the condition and take appropriate action. At the end of the series we also have 125 lines of code less to maintain, and the executable got a bit smaller too. Halil Pasic (9): s390x/css: fix cc handling for XSCH s390x: fix invalid use of cc 1 for SSCH s390x/css: be more consistent if broken beyond repair s390x: refactor error handling for SSCH and RSCH s390x: refactor error handling for XSCH handler s390x: refactor error handling for CSCH handler s390x: refactor error handling for HSCH handler s390x: refactor error handling for MSCH handler s390x: factor out common ioinst handler logic hw/s390x/css.c | 158 ++++++++++++-------------------------- hw/s390x/s390-ccw.c | 8 +- hw/vfio/ccw.c | 32 ++++++-- include/hw/s390x/css.h | 38 +++++++--- include/hw/s390x/s390-ccw.h | 2 +- target/s390x/ioinst.c | 181 ++++++++++---------------------------------- 6 files changed, 147 insertions(+), 272 deletions(-)