From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4821BC433EF for ; Fri, 22 Apr 2022 09:38:05 +0000 (UTC) Received: from localhost ([::1]:54644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhpjo-0004im-E5 for qemu-devel@archiver.kernel.org; Fri, 22 Apr 2022 05:38:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhpiU-0002LP-Bb; Fri, 22 Apr 2022 05:36:43 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhpiS-0007C9-G0; Fri, 22 Apr 2022 05:36:41 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23M96exB022106; Fri, 22 Apr 2022 09:36:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=mC1XemPiharFf83IKvcbaNuVQOIIIwB6eyiqep+ojMs=; b=mVpo9Hc9qjrKd3e9i4EMe06PwzGVW8UicWb708du2xV3bn+uw/E78Hk0OfqhKyKiWzPn 5hb9GmbAr6JjScxRFhRLhCn4xmlsEpyVOPLxGnHqfZwNBJcMttmYjgCKWmPU6K3/Ogof S61cuKvD2XmDa9ks2cXtKVIlLfCgvSMmb2PsB4Y1iKLwnxBVuk0fS9il55rW066+oEoT 2cQ91f6Yoy5CPvSNL6DHCqyh7p8tYUgOlRnZQ8zyFBiCJTrsgj/pp0fNZ5h5SzVKgSul Yyqpoi3iBg6IuKOhkZSFyOJkuHbWPkpgBwsXdOlxrHcXtJ2k3iYBHqRKt+rQH4GdGJB3 /Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fkseprh78-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Apr 2022 09:36:37 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23M984bg031999; Fri, 22 Apr 2022 09:36:37 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fkseprh6m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Apr 2022 09:36:36 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23M9NI1m019142; Fri, 22 Apr 2022 09:36:34 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04ams.nl.ibm.com with ESMTP id 3ffne994x4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Apr 2022 09:36:34 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23M9aVXG36635036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Apr 2022 09:36:31 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 62936A4051; Fri, 22 Apr 2022 09:36:31 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AE764A4040; Fri, 22 Apr 2022 09:36:30 +0000 (GMT) Received: from [9.171.20.253] (unknown [9.171.20.253]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 22 Apr 2022 09:36:30 +0000 (GMT) Message-ID: <31b5f911-0e1f-ba3c-94f2-1947d5b16057@linux.ibm.com> Date: Fri, 22 Apr 2022 11:39:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH v5 7/9] s390x/pci: enable adapter event notification for interpreted devices Content-Language: en-US To: Matthew Rosato , qemu-s390x@nongnu.org References: <20220404181726.60291-1-mjrosato@linux.ibm.com> <20220404181726.60291-8-mjrosato@linux.ibm.com> From: Pierre Morel In-Reply-To: <20220404181726.60291-8-mjrosato@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 7zsO9FnJv5-UH90NTr3BcUaFzEEuv43c X-Proofpoint-ORIG-GUID: zYAO1eRw-znCDt1Rr0GkW4UaiHglXqf2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-22_02,2022-04-21_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 priorityscore=1501 phishscore=0 clxscore=1015 suspectscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204220042 Received-SPF: pass client-ip=148.163.156.1; envelope-from=pmorel@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farman@linux.ibm.com, kvm@vger.kernel.org, schnelle@linux.ibm.com, cohuck@redhat.com, richard.henderson@linaro.org, thuth@redhat.com, qemu-devel@nongnu.org, pasic@linux.ibm.com, alex.williamson@redhat.com, mst@redhat.com, pbonzini@redhat.com, david@redhat.com, borntraeger@linux.ibm.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 4/4/22 20:17, Matthew Rosato wrote: > Use the associated kvm ioctl operation to enable adapter event notification > and forwarding for devices when requested. This feature will be set up > with or without firmware assist based upon the 'forwarding_assist' setting. > > Signed-off-by: Matthew Rosato > --- > hw/s390x/s390-pci-bus.c | 20 ++++++++++++++--- > hw/s390x/s390-pci-inst.c | 40 +++++++++++++++++++++++++++++++-- > hw/s390x/s390-pci-kvm.c | 30 +++++++++++++++++++++++++ > include/hw/s390x/s390-pci-bus.h | 1 + > include/hw/s390x/s390-pci-kvm.h | 14 ++++++++++++ > 5 files changed, 100 insertions(+), 5 deletions(-) > > diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c > index 9c02d31250..47918d2ce9 100644 > --- a/hw/s390x/s390-pci-bus.c > +++ b/hw/s390x/s390-pci-bus.c > @@ -190,7 +190,10 @@ void s390_pci_sclp_deconfigure(SCCB *sccb) > rc = SCLP_RC_NO_ACTION_REQUIRED; > break; > default: > - if (pbdev->summary_ind) { > + if (pbdev->interp && (pbdev->fh & FH_MASK_ENABLE)) { > + /* Interpreted devices were using interrupt forwarding */ > + s390_pci_kvm_aif_disable(pbdev); Same remark as for the kernel part. The VFIO device is already initialized and the action is on this device, Shouldn't we use the VFIO device interface instead of the KVM interface? regards, Pierre -- Pierre Morel IBM Lab Boeblingen