Received: by 10.213.65.68 with SMTP id h4csp1168372imn; Mon, 26 Mar 2018 02:04:00 -0700 (PDT) X-Google-Smtp-Source: AG47ELu2IQE255MKiZSKTkpe7Hk34147yc2DsfaGNt4w8USwki/8q3n1DUFJVpQzQP8wnILP9eli X-Received: by 10.167.129.7 with SMTP id b7mr9882707pfi.122.1522055040768; Mon, 26 Mar 2018 02:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522055040; cv=none; d=google.com; s=arc-20160816; b=xgkJXmN1ejDP5U470LPcB9v/ZeZqX8AaJK628of4hKWQyA1bWhp6l9lh3ru1fhZIMt CKooA0xKWiP5VOZIgTZVQWAjCZ+VQy2ZpXFxIHCFC08Wsj0rRv0nR2Y9F7Eh4aanhj9I HFROo1kl9xM6hy/BE6k+IOLTHbvNRoKLGgXZRwFAFrfWlzCT/VdpTU8Ba7bx7fniBjN3 ZGNVW+Cwnc0NmbwxSeO/Uc5vzuYsO0G5a3PMi+JymYxdVRvXWd7t+HthtYSK0DxOS4DZ iUJ5t23X/cwY0/xHFbB2uWO4VK2wypHuqbuP3yFYY8wKQcZRzwNUC31IYTmoHz2W6bFq DHGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=8WZS+h2Vka4c4DCKkgkV8nGcRcZZLY9+1QBNIe46ijM=; b=vs/xq6rHOM+XNDFwrt/y2io79C9m+DTiN9ukeav9WpcAG3PDKvF1ssuRC7JWNUyXzp e9l1S5NWIPKmZSDBi1TqXZ6SBCWtz4Ie4YQ1KrzvfmxqcIkJmrY4VLtEwsskHm5OqZSO 4/bDuxH96JTqBt62HijvpzvEXuSp5yHmtOEHhXyMayVikyVepj2IJvVNtyS6dOxC5MMH kmri5QxTGp4Up5tUf7Y5fFb5/hYtgFqQWfipIwT8yhOuhkZMwahJ5ich9rrt5IVOEOo6 Q127uXmgyDr7i+BnwTX27ToiaW9QcLUCODm+N08ErIXDxefQexHH2qdjHXVzL0XLNlxN kMIw== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si9683203pgp.572.2018.03.26.02.03.45; Mon, 26 Mar 2018 02:04:00 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752004AbeCZJCa (ORCPT + 99 others); Mon, 26 Mar 2018 05:02:30 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:53524 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751150AbeCZJC2 (ORCPT ); Mon, 26 Mar 2018 05:02:28 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E01B98182D1B; Mon, 26 Mar 2018 09:02:27 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8D51215CDB5; Mon, 26 Mar 2018 09:02:26 +0000 (UTC) Date: Mon, 26 Mar 2018 11:02:24 +0200 From: Cornelia Huck To: Dong Jia Shi Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, borntraeger@de.ibm.com, pasic@linux.vnet.ibm.com, pmorel@linux.vnet.ibm.com Subject: Re: [PATCH 0/4] vfio: ccw: error handling fixes and improvements Message-ID: <20180326110224.1af0ad13.cohuck@redhat.com> In-Reply-To: <20180321020822.86255-1-bjsdjshi@linux.vnet.ibm.com> References: <20180321020822.86255-1-bjsdjshi@linux.vnet.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 26 Mar 2018 09:02:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 26 Mar 2018 09:02:27 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'cohuck@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Mar 2018 03:08:18 +0100 Dong Jia Shi wrote: > Hi Conny, > > Halil reported a host crash when using vfio-ccw. The root cause of the problem > is that vfio_pin_pages fails with EINVAL for reasons unknown. He has > experienced such failures after online-ing a dasd in the guest (the dasd has 3 > partitions, hat may or may not have any significance). The problem isn't > experienced on every attempt to online the dasd, and breaking at css_do_ssch > seems to make things work. > > One thing is sure: the host kernel should not crash under the described > circumstances. > > To fix the problem, the first patch of this series fixes the cleanup when > cp_prefetch fails in the higher level. The 2nd and the 3rd patches provide > correctness and denfensive actions for the interfaces in the lower level. So, is the first patch stable material? > > The 4th patch is trying to add tracepoints for vfio-ccw, so that we can debug > such issue easier in future. Tracepoints are nice :) > > For details see the commit message portions of the inividual patches. Still digging through the post-vacation mail pile, will do more looking later. > Thanks. > > Dong Jia Shi (2): > vfio: ccw: refactor and improve pfn_array_alloc_pin() > vfio: ccw: set ccw->cda to NULL defensively > > Halil Pasic (2): > vfio: ccw: fix cleanup if cp_prefetch fails > vfio: ccw: add traceponits for interesting error paths > > drivers/s390/cio/Makefile | 1 + > drivers/s390/cio/vfio_ccw_cp.c | 121 ++++++++++++++++++++------------------ > drivers/s390/cio/vfio_ccw_fsm.c | 13 ++++ > drivers/s390/cio/vfio_ccw_trace.h | 86 +++++++++++++++++++++++++++ > 4 files changed, 163 insertions(+), 58 deletions(-) > create mode 100644 drivers/s390/cio/vfio_ccw_trace.h >