Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1012226ybz; Thu, 16 Apr 2020 00:49:18 -0700 (PDT) X-Google-Smtp-Source: APiQypJml77xs/Wga36PMCoOqM6NlEAA1zucsfeHOcM1eq2O13VcxTJtiOL5cYuyVJIDRtSnXc/i X-Received: by 2002:a05:6402:b03:: with SMTP id bm3mr10518199edb.299.1587023358556; Thu, 16 Apr 2020 00:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587023358; cv=none; d=google.com; s=arc-20160816; b=0QpI0b6f/8y7PgTGyhBuupvmNMMQ0VUP7Zcp/G+1+fZaIqL/nYxsGuHAfvFx+yxp8t Vn0XdVIfrliXEfiurFyWUvjqqcj1a4ryzM0/N6o56efAXHXs7hk7FRiFMtCsXzFKnlDG PgnM6k8GbOvys0o7mqip7aM+6HkBl2i6X+U/LoGTUujJjfbjzme5Kx24Ow7t+jM+34VI +4jsfezZQJVqLHKixf0I2rf9tSk0bkgmLDIm7ifTz2mfD1LgDtBxMrx3z0OqAVvYt/8e QFw5hPlk3G6E8jiix0fsE9bgslToBfgaj3vey6SlJHuEYMEaONhBvKICnvrm96fa39z4 yykA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=xtMw61WExPfRdJ7k/9e2uGO0mShWA0MWE6V5DxSJKqU=; b=oR8Pl/bV58qnBJGUswSNaizokSbJlwb89g/SKtsGjKNiG88PICJYn06g1bWLntowkM KZripexeZvCSb6uMn7UR67PzxBi18zlC8FdaxNQRX+TSQhjDJ+3rCR1Oej4IiWDegOYx BJVNz1mec5gtSXqCIZvf6uhdSThvFUIxrfo5ciZUGM8Dia/yptgnhVyOiRBCqjCZqSxx 4PCrV6u20meryhyPtiVDlHgoI/BTN0MHaV7uC2j6YuNTZQOoF1qyHlTPGi6z1fOizTY9 R4BCOM7bdvQ+hxj7WVEaiu5nSPnusDUr81YpyUxIF4pvaqFWQKFlgbYZwoBwQV+ghGOA 0mCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="i+G/8B+L"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si6322976ejt.286.2020.04.16.00.48.55; Thu, 16 Apr 2020 00:49:18 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="i+G/8B+L"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439648AbgDPHpw (ORCPT + 99 others); Thu, 16 Apr 2020 03:45:52 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:54295 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2439413AbgDPHpq (ORCPT ); Thu, 16 Apr 2020 03:45:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587023142; 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=xtMw61WExPfRdJ7k/9e2uGO0mShWA0MWE6V5DxSJKqU=; b=i+G/8B+LndcvuUIqQdKBrI4GZL1jtZ6CTu+DL/h6yBNydVgnq5V2kcb77kLQ4A7WZbGedH lEHOvUzLDW4hWnGrPxMBJSgtyIzh3jrWpdcOQjAlfOkAqmrtQLSg8FnscRDejq031V/M0+ fZJZBuhG309cxzchzwSuj6aWPFKhSTw= 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-362-UyxvZ--jPOSsOW2DrZQkxw-1; Thu, 16 Apr 2020 03:45:35 -0400 X-MC-Unique: UyxvZ--jPOSsOW2DrZQkxw-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 7354A8017F5; Thu, 16 Apr 2020 07:45:32 +0000 (UTC) Received: from [10.36.115.53] (ovpn-115-53.ams2.redhat.com [10.36.115.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 943CE60BE0; Thu, 16 Apr 2020 07:45:25 +0000 (UTC) Subject: Re: [PATCH v11 00/13] SMMUv3 Nested Stage Setup (IOMMU part) To: Zhangfei Gao , eric.auger.pro@gmail.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, will@kernel.org, joro@8bytes.org, maz@kernel.org, robin.murphy@arm.com Cc: jean-philippe@linaro.org, shameerali.kolothum.thodi@huawei.com, alex.williamson@redhat.com, jacob.jun.pan@linux.intel.com, yi.l.liu@intel.com, peter.maydell@linaro.org, tn@semihalf.com, bbhushan2@marvell.com References: <20200414150607.28488-1-eric.auger@redhat.com> From: Auger Eric Message-ID: <06fe02f7-2556-8986-2f1e-dcdf59773b8c@redhat.com> Date: Thu, 16 Apr 2020 09:45:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Zhangfei, On 4/16/20 6:25 AM, Zhangfei Gao wrote: >=20 >=20 > On 2020/4/14 =E4=B8=8B=E5=8D=8811:05, Eric Auger wrote: >> This version fixes an issue observed by Shameer on an SMMU 3.2, >> when moving from dual stage config to stage 1 only config. >> The 2 high 64b of the STE now get reset. Otherwise, leaving the >> S2TTB set may cause a C_BAD_STE error. >> >> This series can be found at: >> https://github.com/eauger/linux/tree/v5.6-2stage-v11_10.1 >> (including the VFIO part) >> The QEMU fellow series still can be found at: >> https://github.com/eauger/qemu/tree/v4.2.0-2stage-rfcv6 >> >> Users have expressed interest in that work and tested v9/v10: >> - https://patchwork.kernel.org/cover/11039995/#23012381 >> - https://patchwork.kernel.org/cover/11039995/#23197235 >> >> Background: >> >> This series brings the IOMMU part of HW nested paging support >> in the SMMUv3. The VFIO part is submitted separately. >> >> The IOMMU API is extended to support 2 new API functionalities: >> 1) pass the guest stage 1 configuration >> 2) pass stage 1 MSI bindings >> >> Then those capabilities gets implemented in the SMMUv3 driver. >> >> The virtualizer passes information through the VFIO user API >> which cascades them to the iommu subsystem. This allows the guest >> to own stage 1 tables and context descriptors (so-called PASID >> table) while the host owns stage 2 tables and main configuration >> structures (STE). >> >> >=20 > Thanks Eric >=20 > Tested v11 on Hisilicon kunpeng920 board via hardware zip accelerator. > 1. no-sva works, where guest app directly use physical address via ioct= l. Thank you for the testing. Glad it works for you. > 2. vSVA still not work, same as v10, Yes that's normal this series is not meant to support vSVM at this stage. I intend to add the missing pieces during the next weeks. Thanks Eric > 3.=C2=A0 the v10 issue reported by Shameer has been solved,=C2=A0 first= start qemu > with=C2=A0 iommu=3Dsmmuv3, then start qemu without=C2=A0 iommu=3Dsmmuv3 > 4. no-sva also works without=C2=A0 iommu=3Dsmmuv3 >=20 > Test details in https://docs.qq.com/doc/DRU5oR1NtUERseFNL >=20 > Thanks >=20