Received: by 10.192.165.148 with SMTP id m20csp1916312imm; Thu, 3 May 2018 07:27:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpbIMC2x64hD/vu4krYFZlhW0vOoXr+Yt27hA82nQR2CFhgt6v6xJSSmmLLryeio7nk2HXZ X-Received: by 10.98.33.28 with SMTP id h28mr22708600pfh.249.1525357675543; Thu, 03 May 2018 07:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525357675; cv=none; d=google.com; s=arc-20160816; b=NuP6nJbFYcUNNhxqQetMV7YzHHcZA23EhRYxrLLZsQN1nbXx/wRmkE3xg/a1oi+ydF HvvG+VLfXqpwSaciNHgGSyX5SVEthLkv9QlWb8pKZWM6lDghWf1tDYq3Cc/oLOVEkvES 3e1s6vmoX5fgBr0VHDUC8H4bxsdUiv7rSVHC67t/DsqswGTZ0LLBX27mboLqTVp8tO2i 34WyAYSBSNeAw/54Fx5SJhfRQzN7PLi4CTsFr9IMgGQGXXfzkyyyEB3vFWAEYamBvPhU vUyDudu+sx4OEf7CIjeYWyv9ndm1TrJIG2IlAAiqIt4O9fxaQka8MytZ7GE045lqZNUl xClg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject:arc-authentication-results; bh=Js99eBPF/0qQQwjLbnF6YmAmjBsl8dUJSfBwcEKSGog=; b=yQCm5jbyNv51DXUdIBtiI5kBB+wCiDcaBGE5rjTKtx1J4mS6Zvhy65PqyRM014n0oX NdmYlg3k7aD0aPl9qZICp2YBnPVGe2GKJux34nvD+pPnnHMxBHLU7pSWfEcMNaNNR8xn C8KoF51TbkEE4RbdY/xkKzDxsEjU2l/hNt2ZyHJi14y4Mtj8QeSzW2mLwgOa21svNSRO j2UoabrKPsgKHn9RaXfeD15sK6ogcKh9FCCNx9t1UB95pqBvyqt0HotCRBHHnkvQlUlq kmih74AfJI2anRZ6+0xUZ0P2AwJih0sgLRZ6IbME8yKdOrAFVUeDakqhlUK6x8Tq3cY8 SNkA== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11-v6si4720728pgn.267.2018.05.03.07.27.11; Thu, 03 May 2018 07:27:55 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751277AbeECO0i (ORCPT + 99 others); Thu, 3 May 2018 10:26:38 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60980 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751236AbeECO0g (ORCPT ); Thu, 3 May 2018 10:26:36 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w43EKbmZ017180 for ; Thu, 3 May 2018 10:26:34 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hr3jt22bu-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 03 May 2018 10:26:34 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 3 May 2018 15:26:33 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 3 May 2018 15:26:30 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w43EQU9i3277278; Thu, 3 May 2018 14:26:30 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1E9C911C058; Thu, 3 May 2018 15:18:04 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CAA2411C064; Thu, 3 May 2018 15:18:03 +0100 (BST) Received: from [9.152.224.33] (unknown [9.152.224.33]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 3 May 2018 15:18:03 +0100 (BST) Subject: Re: [PATCH 04/10] vfio: ccw: replace IO_REQ event with SSCH_REQ event To: Dong Jia Shi , Cornelia Huck Cc: pasic@linux.vnet.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org 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> From: Pierre Morel Date: Thu, 3 May 2018 16:26:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180502074622.GV5428@bjsdjshi@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18050314-0012-0000-0000-000005D19525 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050314-0013-0000-0000-0000194EBCB8 Message-Id: <5816643d-5406-06b9-0727-fdcd771aba63@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-03_07:,, 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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805030126 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/05/2018 09:46, 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? > :) Isn't it exactly what my patch series handle? -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany