Received: by 2002:a19:6d5:0:0:0:0:0 with SMTP id 204csp617949lfg; Wed, 24 Feb 2021 06:41:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRzucmygFg9UJHnzXcKP7LIDWHlU6APS3ldrdWzKsB1MV2ic/h8JH9Ze+dsqUCtqzAjnIT X-Received: by 2002:aca:4a0d:: with SMTP id x13mr2855706oia.111.1614177682453; Wed, 24 Feb 2021 06:41:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614177682; cv=none; d=google.com; s=arc-20160816; b=zztjF8HpF8dnlJsS5gVdfIGFUq78ZGoW5mgz1o7+e3VZiMm4ni47ygmqZzR0dG70iv tK9vqyxgEpWsbr13ROW8CvwrvYJRlAGm3wSsj1vNKUwkS+q70orCGqV+zEQOB/CMlimF YHttzRmyuDmRdAoNzOS6+cw0UubOztvF/i4xWc6ZNSYO7rR2DpSjr45e73broBvf3gca wg0RXNJRBufTsyRVbmOG3Uyp13stYRIolCH+8rohDGCqQFKgjiQKbx3eQ5fVDgNJMpWK f+wm2TEhAEiCFPgszTLHyRsgWd+pt6HBC8Sp1RxsUzftmHp5Bn7jV4hcIZ1HJh3hreOV YWJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=Ylr7UQTkFZQiYHni4UTaJMQZA/gj+wKWtICi8/+6cYI=; b=ELc6k+Gr2u4Vn0jnH9VDDhKYdm/7Ilhr43l9MJsWi1bx8QzPLLQyjGclme1e/kRHjo S76sm86A+nEtTeH+0IV8wuMUOhfKOlCdlb07fTlI03OSTO5yiX+GXDiJnOIlzEK9xES9 MFuaYXWYxG/DS5dZsKn/sPTfO4PW0gwRfFC7BF4cv1GziYPzbpyry1sb1Q60qklwoZZo ++nUB74NMOR+S5gpE+q5eeOHiSrc15h3jg+wN2IUCxgOH8iZQL9YlTiF5xNGn0WNdnCv Ec9yZiTE07lz3zqfcXoYemQ1LJdrcwxR8FaMxlUC45jMN1FsQeTUYXtQdD5qXE6JmBrQ bWpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=ApgWwrsG; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p203si1662085oig.46.2021.02.24.06.41.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Feb 2021 06:41:22 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=ApgWwrsG; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:42444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEvLt-0004n5-Dt for alex.bennee@linaro.org; Wed, 24 Feb 2021 09:41:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEvLW-0004Pr-9c for qemu-arm@nongnu.org; Wed, 24 Feb 2021 09:40:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lEvLL-0000rV-8S for qemu-arm@nongnu.org; Wed, 24 Feb 2021 09:40:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614177645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ylr7UQTkFZQiYHni4UTaJMQZA/gj+wKWtICi8/+6cYI=; b=ApgWwrsGKkI2iuaq1xqBpQn7HiOr3Lwwpv5at8hfSEgLWCiY/IUGAhXlEXR5IFsiy2bk49 hLPJASxI5Vi97BzxuVp1t0JCNSrX3WJhWO+JfSPZ1wDl1MrKHsfxQDsvgmhLs6O80pCXUi LqBiEDBDwMDKl3G1aKa173KykwwVZME= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-545-CTmCNTn9PZGIL2NvVtFpJw-1; Wed, 24 Feb 2021 09:39:59 -0500 X-MC-Unique: CTmCNTn9PZGIL2NvVtFpJw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1AC91907276; Wed, 24 Feb 2021 13:44:00 +0000 (UTC) Received: from [10.36.114.34] (ovpn-114-34.ams2.redhat.com [10.36.114.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7561160C5F; Wed, 24 Feb 2021 13:43:47 +0000 (UTC) Subject: Re: [RFC v7 26/26] vfio/pci: Implement return_page_response page response callback To: Shameerali Kolothum Thodi , "eric.auger.pro@gmail.com" , "qemu-devel@nongnu.org" , "qemu-arm@nongnu.org" , "alex.williamson@redhat.com" References: <20201116181349.11908-1-eric.auger@redhat.com> <20201116181349.11908-27-eric.auger@redhat.com> <494e4bdf5ecd4b528a016d4545d45f71@huawei.com> <5f85d8999c0c40a29c32ac63b8730fa8@huawei.com> <679c5696-c73f-517d-f555-90ec2c767fbb@redhat.com> From: Auger Eric Message-ID: <41b9d3a2-1199-5dad-876b-10efa51638bb@redhat.com> Date: Wed, 24 Feb 2021 14:43:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <679c5696-c73f-517d-f555-90ec2c767fbb@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eric.auger@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=216.205.24.124; envelope-from=eric.auger@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "peter.maydell@linaro.org" , "jacob.jun.pan@linux.intel.com" , "Zengtao \(B\)" , "jean-philippe@linaro.org" , "tn@semihalf.com" , "peterx@redhat.com" , "nicoleotsuka@gmail.com" , "vivek.gautam@arm.com" , "yi.l.liu@intel.com" , "zhangfei.gao@gmail.com" , yuzenghui , qubingbing Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: SDAXBC20dUtE Hi Shameer, On 2/18/21 2:32 PM, Auger Eric wrote: > Hi Shameer, > > On 2/18/21 12:46 PM, Shameerali Kolothum Thodi wrote: >> >> Hi Eric, >> >>> -----Original Message----- >>> From: Auger Eric [mailto:eric.auger@redhat.com] >>> Sent: 18 February 2021 10:42 >>> To: Shameerali Kolothum Thodi ; >>> eric.auger.pro@gmail.com; qemu-devel@nongnu.org; qemu-arm@nongnu.org; >>> alex.williamson@redhat.com >>> Cc: peter.maydell@linaro.org; jacob.jun.pan@linux.intel.com; Zengtao (B) >>> ; jean-philippe@linaro.org; tn@semihalf.com; >>> peterx@redhat.com; nicoleotsuka@gmail.com; vivek.gautam@arm.com; >>> yi.l.liu@intel.com; zhangfei.gao@gmail.com; yuzenghui >>> ; qubingbing >>> Subject: Re: [RFC v7 26/26] vfio/pci: Implement return_page_response page >>> response callback >>> >> [...] >> >>>> Also, I just noted that this patch breaks the dev hot add/del functionality. >>>> device_add works fine but device_del is not removing the dev cleanly.Thank >>> you for reporting this! >>> >>> The test matrix becomes bigger and bigger :-( I Need to write some >>> avocado-vt tests or alike. >>> >>> I am currently working on the respin. At the moment I investigate the >>> DPDK issue that you reported and I was able to reproduce. >> >> Ok. Good to know that it is reproducible. >> >>> I intend to rebase on top of Jean-Philippe's >>> [PATCH v12 00/10] iommu: I/O page faults for SMMUv3 >>> >>> Is that good enough for your SVA integration or do you want I prepare a >>> rebase on some extended code? >> >> Could you please try to base it on https://jpbrucker.net/git/linux/log/?h=sva/current > > OK. At least I will provide a branch. I sent the respin on top of master branch + Jean-Philippe's [PATCH v12 00/10] iommu: I/O page faults for SMMUv3. because I thought it makes more sense to post on master + some nearly "ready to go" stuff. Nevertheless I will do my best to prepare asap a branch based on Jean's sva/current branch (based on 5.11-rc5) Thanks Eric > > Eric >> >> I think that has the latest from Jean-Philippe and will be easy to add >> uacce/zip specific patches to test SVA/vSVA. >> >> Thanks, >> Shameer >> >> >>> Thanks >>> >>> Eric >>>> >>>> The below one fixes it. Please check. >>>> >>>> Thanks, >>>> Shameer >>>> >>>> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c >>>> index 797acd9c73..92c1d48316 100644 >>>> --- a/hw/vfio/pci.c >>>> +++ b/hw/vfio/pci.c >>>> @@ -3470,6 +3470,7 @@ static void vfio_instance_finalize(Object *obj) >>>> vfio_display_finalize(vdev); >>>> vfio_bars_finalize(vdev); >>>> vfio_region_finalize(&vdev->dma_fault_region); >>>> + vfio_region_finalize(&vdev->dma_fault_response_region); >>>> g_free(vdev->emulated_config_bits); >>>> g_free(vdev->rom); >>>> /* >>>> @@ -3491,6 +3492,7 @@ static void vfio_exitfn(PCIDevice *pdev) >>>> vfio_unregister_err_notifier(vdev); >>>> vfio_unregister_ext_irq_notifiers(vdev); >>>> vfio_region_exit(&vdev->dma_fault_region); >>>> + vfio_region_exit(&vdev->dma_fault_response_region); >>>> pci_device_set_intx_routing_notifier(&vdev->pdev, NULL); >>>> if (vdev->irqchip_change_notifier.notify) { >>>> >>> kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_not >>>> >>>> >>>> >>