From patchwork Mon Apr 8 21:05:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farhan Ali X-Patchwork-Id: 10890153 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 1B79C13B5 for ; Mon, 8 Apr 2019 21:05:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05DE0287E9 for ; Mon, 8 Apr 2019 21:05:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE5AF287ED; Mon, 8 Apr 2019 21:05:41 +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 9FAA6287E9 for ; Mon, 8 Apr 2019 21:05:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728587AbfDHVFk (ORCPT ); Mon, 8 Apr 2019 17:05:40 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37390 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726826AbfDHVFk (ORCPT ); Mon, 8 Apr 2019 17:05:40 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x38L0Plq116546 for ; Mon, 8 Apr 2019 17:05:38 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0b-001b2d01.pphosted.com with ESMTP id 2rrckqu7hp-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 08 Apr 2019 17:05:38 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 8 Apr 2019 22:05:37 +0100 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 8 Apr 2019 22:05:36 +0100 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x38L5YvC30081102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 Apr 2019 21:05:34 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 611A26A04F; Mon, 8 Apr 2019 21:05:34 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C932F6A05D; Mon, 8 Apr 2019 21:05:33 +0000 (GMT) Received: from alifm-ThinkPad-T470p.pok.ibm.com (unknown [9.56.58.129]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTPS; Mon, 8 Apr 2019 21:05:33 +0000 (GMT) From: Farhan Ali To: kvm@vger.kernel.org, linux-s390@vger.kernel.org Cc: farman@linux.ibm.com, cohuck@redhat.com, pasic@linux.ibm.com, pmorel@linux.ibm.com, alifm@linux.ibm.com Subject: [RFC v2 0/3] fio-ccw fixes for kernel stacktraces Date: Mon, 8 Apr 2019 17:05:30 -0400 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 19040821-0004-0000-0000-000014FA1A23 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010891; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000284; SDB=6.01186271; UDB=6.00621283; IPR=6.00967029; MB=3.00026349; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-08 21:05:37 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040821-0005-0000-0000-00008B2FEA4E Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-08_09:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=935 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904080155 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, I have recently seen some interesting kernel stacktraces while testing vfio-ccw mediated devices. These stack traces are seen when things don't go right, for example when a guest crashes or dies while still doing some I/O on the mediated device. I have also come across an issue in the common vfio code as well which I reported upstream (https://marc.info/?l=kvm&m=155369393523503&w=2) and submitted a patch separately for it (https://marc.info/?l=kvm&m=155414703613868&w=2). I would appreciate any review or feedback on these patches. Thanks Farhan ChangeLog --------- v1 -> v2 - Use the return code from cio_cancel_halt_clear to prevent waiting unnecessarily (patch 2). - No need to reset the device on the remove path (patch 3). Farhan Ali (3): vfio-ccw: Do not call flush_workqueue while holding the spinlock vfio-ccw: Prevent quiesce function going into an infinite loop vfio-ccw: Release any channel program when releasing/removing vfio-ccw mdev drivers/s390/cio/vfio_ccw_drv.c | 27 ++++++++++++--------------- drivers/s390/cio/vfio_ccw_ops.c | 11 ++++++++++- 2 files changed, 22 insertions(+), 16 deletions(-)