Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp717168pxu; Thu, 3 Dec 2020 10:48:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4vhwu0ZM2gl+RSU+D3NCTBpRMdEZ5SQjtRCkQ1MtSQnB77tEbdo1gzph4x6JC08G5Y44P X-Received: by 2002:a17:906:5841:: with SMTP id h1mr3480730ejs.77.1607021294076; Thu, 03 Dec 2020 10:48:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607021294; cv=none; d=google.com; s=arc-20160816; b=tI16m8ZPH+rY+SrRNYfD2JzoQ+aKoS2b9HQ1X+w3RKO4StzVn4yREkRbpwaqVcGgEM c9HFL8PJsKRwfATzgRQo4CbVL0L1BmjCl14JvLhBAuYzXGq1YyTlDR2t7BNNYsFrBrL+ /BpXnZ/95lKJf7tPpUQMGJQt/rmEX3PYKxjpB90rESWDxhcHUTQMZF2vZ29Ncu+rWnGD s11KAZjMuaIob4cMHbvZma0415tZWDRhtW5mzifLsfhqFMq72axwzsG0HNPBiVwT0qZc uBPSA9lOEgc5Xkrs3z5pBAKhTTth+jvxZH9+v6MSMQoCWt3T50cTrOMDack1kLLMLRYi sraA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=Nq8ZJjtrZU9AbHa6Wej775/iDFcWUjyI8y+Hi7TIqLc=; b=c7gHxNsUWbrbE/R9Jk9o1FEuGagVNq1pD9k4kqWqi9B2IvKNi/Voq8T79Y+Kuc9oux FVBhBY8pF/n0+ATu1gl7sOImmX0e6a4SX2KEay2eyTlw/r0kPSFeSIKFnnpyIoXUUnuV cshnz/zX5oUX9C/bSeDZOwUh39TQMcWO6o2GIyxUVf6N0fqYsCimcZNZwSh5ZUZuvWmn ZdCJGfPhC6g+l03pnQ2Lu4e8vTIiitupmjNafmscb3bNKGxI2qD/ZKmgh7AwoIuF/8Yy AcqvWgc20VCkMzpW/bAbgzFdV0MDA6/RsnHYZGl8WWSYrktWrssMI8Fd3GZqyhMmiOoD jx3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c26si1492564edv.182.2020.12.03.10.47.49; Thu, 03 Dec 2020 10:48:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731293AbgLCSns convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 Dec 2020 13:43:48 -0500 Received: from szxga01-in.huawei.com ([45.249.212.187]:2084 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726012AbgLCSns (ORCPT ); Thu, 3 Dec 2020 13:43:48 -0500 Received: from dggeme758-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Cn4Sj3QmgzVgff; Fri, 4 Dec 2020 02:42:13 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by dggeme758-chm.china.huawei.com (10.3.19.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Fri, 4 Dec 2020 02:42:59 +0800 Received: from lhreml710-chm.china.huawei.com ([169.254.81.184]) by lhreml710-chm.china.huawei.com ([169.254.81.184]) with mapi id 15.01.1913.007; Thu, 3 Dec 2020 18:42:57 +0000 From: Shameerali Kolothum Thodi To: Auger Eric , wangxingang CC: Xieyingtai , "jean-philippe@linaro.org" , "kvm@vger.kernel.org" , "maz@kernel.org" , "joro@8bytes.org" , "will@kernel.org" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "vivek.gautam@arm.com" , "alex.williamson@redhat.com" , "zhangfei.gao@linaro.org" , "robin.murphy@arm.com" , "kvmarm@lists.cs.columbia.edu" , "eric.auger.pro@gmail.com" , "Zengtao (B)" , qubingbing Subject: RE: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs Thread-Topic: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs Thread-Index: AQHWvZ36CODK3kmCyk2T9hmchYhCqqniWTe/gANqCPA= Date: Thu, 3 Dec 2020 18:42:57 +0000 Message-ID: References: <20201118112151.25412-8-eric.auger@redhat.com> <1606829590-25924-1-git-send-email-wangxingang5@huawei.com> <2e69adf5-8207-64f7-fa8e-9f2bd3a3c4e3@redhat.com> In-Reply-To: <2e69adf5-8207-64f7-fa8e-9f2bd3a3c4e3@redhat.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.200.67.109] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eric, > -----Original Message----- > From: kvmarm-bounces@lists.cs.columbia.edu > [mailto:kvmarm-bounces@lists.cs.columbia.edu] On Behalf Of Auger Eric > Sent: 01 December 2020 13:59 > To: wangxingang > Cc: Xieyingtai ; jean-philippe@linaro.org; > kvm@vger.kernel.org; maz@kernel.org; joro@8bytes.org; will@kernel.org; > iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org; > vivek.gautam@arm.com; alex.williamson@redhat.com; > zhangfei.gao@linaro.org; robin.murphy@arm.com; > kvmarm@lists.cs.columbia.edu; eric.auger.pro@gmail.com > Subject: Re: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with > unmanaged ASIDs > > Hi Xingang, > > On 12/1/20 2:33 PM, Xingang Wang wrote: > > Hi Eric > > > > On Wed, 18 Nov 2020 12:21:43, Eric Auger wrote: > >> @@ -1710,7 +1710,11 @@ static void arm_smmu_tlb_inv_context(void > *cookie) > >> * insertion to guarantee those are observed before the TLBI. Do be > >> * careful, 007. > >> */ > >> - if (smmu_domain->stage == ARM_SMMU_DOMAIN_S1) { > >> + if (ext_asid >= 0) { /* guest stage 1 invalidation */ > >> + cmd.opcode = CMDQ_OP_TLBI_NH_ASID; > >> + cmd.tlbi.asid = ext_asid; > >> + cmd.tlbi.vmid = smmu_domain->s2_cfg.vmid; > >> + } else if (smmu_domain->stage == ARM_SMMU_DOMAIN_S1) { > > > > Found a problem here, the cmd for guest stage 1 invalidation is built, > > but it is not delivered to smmu. > > > > Thank you for the report. I will fix that soon. With that fixed, have > you been able to run vSVA on top of the series. Do you need other stuff > to be fixed at SMMU level? I am seeing another issue with this series. This is when you have the vSMMU in non-strict mode(iommu.strict=0). Any network pass-through dev with iperf run will be enough to reproduce the issue. It may randomly stop/hang. It looks like the .flush_iotlb_all from guest is not propagated down to the host correctly. I have a temp hack to fix this in Qemu wherein CMDQ_OP_TLBI_NH_ASID will result in a CACHE_INVALIDATE with IOMMU_INV_GRANU_PASID flag and archid set. Please take a look and let me know. As I am going to respin soon, please let me > know what is the best branch to rebase to alleviate your integration. Please find the latest kernel and Qemu branch with vSVA support added here, https://github.com/hisilicon/kernel-dev/tree/5.10-rc4-2stage-v13-vsva https://github.com/hisilicon/qemu/tree/v5.2.0-rc1-2stage-rfcv7-vsva I have done some basic minimum vSVA tests on a HiSilicon D06 board with a zip dev that supports STALL. All looks good so far apart from the issues that have been already reported/discussed. The kernel branch is actually a rebase of sva/uacce related patches from a Linaro branch here, https://github.com/Linaro/linux-kernel-uadk/tree/uacce-devel-5.10 I think going forward it will be good(if possible) to respin your series on top of a sva branch with STALL/PRI support added. Hi Jean/zhangfei, Is it possible to have a branch with minimum required SVA/UACCE related patches that are already public and can be a "stable" candidate for future respin of Eric's series? Please share your thoughts. Thanks, Shameer > Best Regards > > Eric > > _______________________________________________ > kvmarm mailing list > kvmarm@lists.cs.columbia.edu > https://lists.cs.columbia.edu/mailman/listinfo/kvmarm