From patchwork Wed Jun 16 01:47:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Farman X-Patchwork-Id: 12323749 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=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 E72CAC48BE5 for ; Wed, 16 Jun 2021 01:51:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A95A661209 for ; Wed, 16 Jun 2021 01:51:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A95A661209 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltKiQ-0004CX-Td for qemu-devel@archiver.kernel.org; Tue, 15 Jun 2021 21:51:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltKf5-000812-Be; Tue, 15 Jun 2021 21:48:11 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:26060 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltKf0-0003Ee-Dt; Tue, 15 Jun 2021 21:48:11 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15G1YLk3107264; Tue, 15 Jun 2021 21:48:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pp1; bh=ccabrK71i3snGGwmBP3fg0WVZzvOjXt3mtsdfuhqGl4=; b=El4RbXx+2ISixK0j+omPZK5CDUdGEkKuJTIDZNSEEsRCsEtm4744kslnLUWtr1XZhw5n ooN2Y4JegKjEuIhma8NJ00wfySiKvRbRovq/unE4eGiDWykOScLvvVZXHQGEFrsBW8ro yoROv18PVvgTY0ECM7glsOtxY3S43trjm/zHO37sDefuIxmjIxJqsZFYG/Rfcom8QWoX wfN4XBp0I6PkQftsiF+VjFnf+LUbqfPuqwBhteYfBGYsjc8NmWylOyi0FESiPX8y+2L0 O5mJMKuWWkki/u1mkApAuhUPieN//OAZHfQFERRIUw4ioXEUcOOjaenkZPxxfOCnNiJo mA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3976r59mm8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jun 2021 21:48:03 -0400 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15G1Ym5T108291; Tue, 15 Jun 2021 21:48:03 -0400 Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com with ESMTP id 3976r59mjy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jun 2021 21:48:03 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15G1gtMn029003; Wed, 16 Jun 2021 01:48:01 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma06fra.de.ibm.com with ESMTP id 394m6h909h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jun 2021 01:48:01 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15G1ktNm33358080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Jun 2021 01:46:55 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 472B5A4064; Wed, 16 Jun 2021 01:47:58 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 30843A405F; Wed, 16 Jun 2021 01:47:58 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 16 Jun 2021 01:47:58 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 4958) id BA88CE02C2; Wed, 16 Jun 2021 03:47:57 +0200 (CEST) From: Eric Farman To: Cornelia Huck , qemu-devel@nongnu.org, qemu-s390x@nongnu.org Subject: [PATCH v3 0/4] s390x: Fix IRB sense data Date: Wed, 16 Jun 2021 03:47:45 +0200 Message-Id: <20210616014749.2460133-1-farman@linux.ibm.com> X-Mailer: git-send-email 2.25.1 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: JtJv4VTaLkutAi663z13ggTN5HtQdnCT X-Proofpoint-ORIG-GUID: VNm0wMX6gpDk-gzd9qBjfiziSmsTc3ig X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-06-15_09:2021-06-15, 2021-06-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 mlxscore=0 malwarescore=0 impostorscore=0 suspectscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106160007 Received-SPF: pass client-ip=148.163.158.5; envelope-from=farman@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Matthew Rosato , David Hildenbrand , Richard Henderson , Eric Farman , Halil Pasic , Christian Borntraeger , Alex Williamson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Conny, et al, Here is a (significantly larger) set of patches to address the problem with building passsthrough sense data in an IRB, using a subchannel-specific callback. The first three patches are primarily code refactoring. But, since patch 3 doesn't implement the callback for vfio-ccw subchannels, it fixes the problem encountered with "dasdfmt -M quick" failing to run correctly in the guest because we no longer fill out the other stuff in the IRB associated with the sense data. Patch 4 implements that for vfio-ccw. v2->v3: - [EF] Drop Fixes tag - [CH] Implement a callback for the IRB sense data - [CH] Copy IRB.ESW from passthrough hardware - [CH] Only put sense in IRB.ECW if passthrough device did v1->v2: - [MR] Add Fixes: tags - [CH] Reinstate the memcpy(sch->sense_data, irb.ecw) in vfio_ccw - [CH] Look at IRB.SCSW.E before copying sense into guest IRB v2: https://lore.kernel.org/qemu-devel/20210611202151.615410-1-farman@linux.ibm.com/ v1: https://lore.kernel.org/qemu-devel/20210610202011.391029-1-farman@linux.ibm.com/ Eric Farman (4): s390x/css: Introduce an ESW struct s390x/css: Split out the IRB sense data s390x/css: Refactor IRB construction s390x/css: Add passthrough IRB hw/s390x/3270-ccw.c | 1 + hw/s390x/css.c | 84 ++++++++++++++++++++++++++++----------- hw/s390x/s390-ccw.c | 1 + hw/s390x/virtio-ccw.c | 1 + hw/vfio/ccw.c | 4 ++ include/hw/s390x/css.h | 5 +++ include/hw/s390x/ioinst.h | 12 +++++- 7 files changed, 83 insertions(+), 25 deletions(-)