Received: by 10.192.165.148 with SMTP id m20csp4723054imm; Tue, 24 Apr 2018 07:26:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/b4UTl3J+r0VHqB/LY+Pv5lbK6mCFS1/Qf/AEolwbgLgVqjhYXKqRw3rwtzo3TM30JXq16 X-Received: by 2002:a17:902:8b84:: with SMTP id ay4-v6mr25071843plb.57.1524580018141; Tue, 24 Apr 2018 07:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524580018; cv=none; d=google.com; s=arc-20160816; b=d66nVwoGYHRnCwUTmz5ykb78ly3IouZ06Wzet8f8oOheuSDSLNULzHRnBAxMri+0Ua VUEXph2Sb5wRTZYm5zfFS/L1Wnu7ZZiCRbPa/GBzZjHdmHrS6p0Sxy3k24eFUqDAlwlp CUAOXHfLbiGCwTqKmRgO7V7fbPOMKP839RHqo7wN/UwvYfbEFC+T0woPhXwexgsSACgB 47k94/g7DEl+8EpPy315fsIc04XRzokZIdn2wg3nWliXfJoW7ROQRtfsV2KLM8XbaNca QStGxqcfjPDIIeyPkxi0BqTp/aDy1Xyrf8fQ3oFqt3+PUEdnzfkEBEW5Bea4xX1ysD6B 6o3w== 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=e6GBWVolAS8b39vIpCN/Sdhx6lYaEq9c19Mb1AuZBiA=; b=yyI5mitmajjlz+GPGt45Ordyc9r2xjsvnq0Z3YX4iN448ZzwtaD+Mnp+zL6YoqUdQr A9sxf2/LQORhj9semj8442anovBDoep+FsWaQCnRTsHgZszfQvpug1bur924BBdSZgbh I+m3famTNiMoDhlruH8MOnSO6Malyd+yYMj1go0lfX4iKjKKa9wJ2CvYxfzizrQRVO9n z4GXSo8Vn9JlZquD5MPKwpV9RpVTgwNvocqZd3/fyIW99nV4JFmKtMusN9SL4Kx3WJUW A9+T/KeyooM0Zxs8ssf9PYRrXJwI2UeTec1gMoSXumFCFayUloYuHo6HC73gX8IfNdpg plCw== 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 h2-v6si13401073plr.320.2018.04.24.07.26.43; Tue, 24 Apr 2018 07:26:58 -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 S933055AbeDXIlK (ORCPT + 99 others); Tue, 24 Apr 2018 04:41:10 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44584 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932850AbeDXIlD (ORCPT ); Tue, 24 Apr 2018 04:41:03 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3O8e5lW130144 for ; Tue, 24 Apr 2018 04:41:03 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2hj14p8dxx-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 Apr 2018 04:41:02 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Apr 2018 09:41:01 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 24 Apr 2018 09:40:57 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3O8evAB11075972; Tue, 24 Apr 2018 08:40:57 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D92A84C040; Tue, 24 Apr 2018 09:33:18 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 973A84C044; Tue, 24 Apr 2018 09:33:18 +0100 (BST) Received: from [9.152.224.146] (unknown [9.152.224.146]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 24 Apr 2018 09:33:18 +0100 (BST) Subject: Re: [PATCH 01/10] vfio: ccw: Moving state change out of IRQ context To: Dong Jia Shi Cc: pasic@linux.vnet.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, cohuck@redhat.com References: <1524149293-12658-1-git-send-email-pmorel@linux.vnet.ibm.com> <1524149293-12658-2-git-send-email-pmorel@linux.vnet.ibm.com> <20180424065442.GV12194@bjsdjshi@linux.vnet.ibm.com> From: Pierre Morel Date: Tue, 24 Apr 2018 10:40:56 +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: <20180424065442.GV12194@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: 18042408-0012-0000-0000-000005CE1CE0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042408-0013-0000-0000-0000194A8B57 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-24_02:,, 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-1804240086 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/04/2018 08:54, Dong Jia Shi wrote: > * Pierre Morel [2018-04-19 16:48:04 +0200]: > > [...] > >> @@ -94,9 +83,15 @@ static void vfio_ccw_sch_io_todo(struct work_struct *work) >> static void vfio_ccw_sch_irq(struct subchannel *sch) >> { >> struct vfio_ccw_private *private = dev_get_drvdata(&sch->dev); >> + struct irb *irb = this_cpu_ptr(&cio_irb); >> >> inc_irq_stat(IRQIO_CIO); >> - vfio_ccw_fsm_event(private, VFIO_CCW_EVENT_INTERRUPT); >> + memcpy(&private->irb, irb, sizeof(*irb)); >> + >> + WARN_ON(work_pending(&private->io_work)); > Hmm, why do we need this? The current design insure that we have not two concurrent SSCH requests. How ever I want here to track spurious interrupt. If we implement cancel, halt or clear requests, we also may trigger (AFAIU) a second interrupts depending on races between instructions, controller and device. We do not need it strongly. > >> + queue_work(vfio_ccw_work_q, &private->io_work); >> + if (private->completion) >> + complete(private->completion); >> } >> >> static int vfio_ccw_sch_probe(struct subchannel *sch) > [...] > -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany