Received: by 10.192.165.148 with SMTP id m20csp3920206imm; Mon, 30 Apr 2018 08:35:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpw6ivQnWKzHQIC3fsu1n5TH2qDMM+lf2zb5w4KdwvaqPUSlc/CN0zJg1aus4TDoV2kuVSo X-Received: by 2002:a63:5f4f:: with SMTP id t76-v6mr10424311pgb.108.1525102524041; Mon, 30 Apr 2018 08:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525102524; cv=none; d=google.com; s=arc-20160816; b=M3b4IYJZuXRIKD675ScOaDQXyp479xPiJXLmRYVF1mhETmyeuMQ7r9oP9uoBS649gl TjudPMGz5nroaKAsKX1vmkqtEUPwYIbDT9ycYkYRMJ0MxmCe1zUVs4/UV625BCt2UtBB hmELX2zyT0s6JV5vcZ0EOPwe/ocBFc/qx82VoPwGzofGuNGzFsGeGKYznIvveMpV+wJP +1NpmDkRXPO25Z85jMZWqk5ZjpkyhQvGIZJnGqL/XsNpQujFw34rPt/rdOELLbYBRJ52 EDLiz2ej7ME91+J6G4yQ9lSoxo9v8wmbpKaH0Vz56PhLpBYloYQRsRYeIf4GGWHg43sB uqvQ== 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=0JWZuiwtIlvDSv49wLNSMnuV+vX2+c+MWAmW3B/kUYo=; b=ENxz9E2FD0gbuYAvgivUrb6IJSCJeuUW1ouuKtZGJ/yBs97PP7IGqRy18K1cykFl5E 1be+a9FZ9CE7k28P0Fn9jNSRVXwVGoth/aCh4d3Fj9lAnmo76lzcay4YDsRzY7d9W9kA t+7r7u8Yghf05v6GMER5w/KhXR3R7suDRW4qpuRm5cO4AQegCVRkGu4VgX19twu0udas iU2xJIA4IyGxQQGGnY52ehia0EWuX1AZTEUxni4U11NTJlMWWGve7B+GDIN1W60LIF6V 2DA3oscJz3qVofl6s088CZZwiTJg3nbpMf8ihCbWrnpw4edOprJpf6yisA9F29qqZvsW RJaA== 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 b186-v6si6365564pgc.569.2018.04.30.08.35.09; Mon, 30 Apr 2018 08:35:24 -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 S1754777AbeD3PdM (ORCPT + 99 others); Mon, 30 Apr 2018 11:33:12 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52370 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753861AbeD3PdK (ORCPT ); Mon, 30 Apr 2018 11:33:10 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3414B81A88CD; Mon, 30 Apr 2018 15:33:08 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37C6C111AF06; Mon, 30 Apr 2018 15:33:07 +0000 (UTC) Date: Mon, 30 Apr 2018 17:33:05 +0200 From: Cornelia Huck To: Dong Jia Shi Cc: Pierre Morel , pasic@linux.vnet.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH 04/10] vfio: ccw: replace IO_REQ event with SSCH_REQ event Message-ID: <20180430173305.632faa80.cohuck@redhat.com> In-Reply-To: <20180426074806.GB12194@bjsdjshi@linux.vnet.ibm.com> References: <1524149293-12658-1-git-send-email-pmorel@linux.vnet.ibm.com> <1524149293-12658-5-git-send-email-pmorel@linux.vnet.ibm.com> <20180426073053.GZ12194@bjsdjshi@linux.vnet.ibm.com> <20180426074806.GB12194@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.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 30 Apr 2018 15:33:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 30 Apr 2018 15:33:09 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.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 Thu, 26 Apr 2018 15:48:06 +0800 Dong Jia Shi wrote: > * Dong Jia Shi [2018-04-26 15:30:54 +0800]: > > [...] > > > > @@ -179,7 +160,7 @@ static int fsm_irq(struct vfio_ccw_private *private, > > > if (private->io_trigger) > > > eventfd_signal(private->io_trigger, 1); > > > > > > - return private->state; > > > + return VFIO_CCW_STATE_IDLE; > > This is not right. For example, if we are in STANDBY state (subch driver > > is probed, but mdev device is not created), we can not jump to IDLE > > state. > > > I see my problem, for STANDBY state, we should introduce another event > callback for VFIO_CCW_EVENT_INTERRUPT. It doesn't make sense to call > fsm_irq() which tries to signal userspace with interrupt notification > when mdev is not created yet... So we'd need a separated fix for this > issue too. But how do we even get into that situation when we don't have an mdev yet?