Received: by 10.192.165.148 with SMTP id m20csp363279imm; Wed, 2 May 2018 01:24:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpIlft/pgnsKb0SpYdqCyiyEwAch8MCLhfpcBPR6WjPnlMOmM5ZjUmytJKNsezevw3jfySc X-Received: by 2002:a17:902:20eb:: with SMTP id v40-v6mr19022471plg.277.1525249474827; Wed, 02 May 2018 01:24:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525249474; cv=none; d=google.com; s=arc-20160816; b=To0h/iJAD13whvDV+5fffuzF8uELOU8MdE3WGP8KthG/kG1FRPP4zEnFGwoHygEvML dqoil9x5NhvG/Ml6dFIX6BapPG/dUVUIFsCEiOKAP1kC+GTgGVskxYlkA1i5iSErotOR VV98wSMMApt02UDFLafVlKiyEwOWSeaHut27tX0SaZgLaWmnBGHWpPc4iKfUqBecTBht hdY54FjYnXzQpWq/Mfp9wXjO512ZUAZpvFpc9W7moatoliHin/jm527P5OoRtrfeDgKw lwyVZehCwQSG8CZwaUMopkroC30gioCHloaYsabrAhZhpQuEG+OedNOdzbbxU/a407Jr S7rw== 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=iY8VoMr/HTYkLER2XwXCR/spSKrHXedZyYp4hbCW+28=; b=Cyna+9j9MNLvFHGtzjoXOc6YbJFZPM7+IX/lRk9se37jw5mpSCBQkrEI4ZjCOu3tLM dkxt7UuWIFOmRfdl8qLSzek+zirYRWd+qvy0s77YkwCcarpQZ2ncDwjWFEz3y5Y0t38+ N+/pZA51bH+UP5fWQ7t0MKAgBvOHskJGtUfDICn/8fqGxb96OScn3YTnKBYYKQbjoXUk hKHXq8G/rqm8LdeI3B7IW0aIoJzW0WYKsBNmq4jqufMztt78d9ectKOPU2eMw/KvnjfZ fcHEKGmY9wiwCjbdotOKyZ56m+op9vM6Oe7mYhctd4zO61fdIX6AcDgnGYQtaKCVz6JA Hl9g== 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 j6si11091000pfc.351.2018.05.02.01.24.20; Wed, 02 May 2018 01:24:34 -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 S1751480AbeEBIWX (ORCPT + 99 others); Wed, 2 May 2018 04:22:23 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52606 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751021AbeEBIWV (ORCPT ); Wed, 2 May 2018 04:22:21 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1A4F20E4B; Wed, 2 May 2018 08:22:20 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1EF42024CA1; Wed, 2 May 2018 08:22:19 +0000 (UTC) Date: Wed, 2 May 2018 10:22:17 +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: <20180502102217.702870af.cohuck@redhat.com> In-Reply-To: <20180502074622.GV5428@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> <20180430173305.632faa80.cohuck@redhat.com> <20180502074622.GV5428@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.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 02 May 2018 08:22:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 02 May 2018 08:22:20 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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, 2 May 2018 15:46:22 +0800 Dong Jia Shi wrote: > * Cornelia Huck [2018-04-30 17:33:05 +0200]: > > > 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? > > > We cann't... So let's assign fsm_nop() as the interrupt callback for > STANDBY state? Either that, or have a special fsm_should_not_happen() function that can pop out a trace message and then continue to do nothing.