Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp106960ybb; Tue, 7 Apr 2020 18:04:05 -0700 (PDT) X-Google-Smtp-Source: APiQypKlxXftPYpgdNEiqO13uv4aQqEsoNfspeSKKyfopvMJg3+L9FVgc7ohVqAYEFzXAwlACkQV X-Received: by 2002:aca:5712:: with SMTP id l18mr696666oib.178.1586307845040; Tue, 07 Apr 2020 18:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586307845; cv=none; d=google.com; s=arc-20160816; b=iOJ1xQImXi4H2o8x5KeOhbAWnpvKw0eT578YrHk0wdvUYQ7sUBYLb6lMcJlFJDZftc Y2xXXkmVvHkGod7fLJXIKeeR7/lPUwCceZ+xuaK9LitOie5rVf5t55STMk9/xuIlMN/J fwlkiUJXF/wapCBdLQJAaJtuJbFGTnAiTe3Nbym7unLWqJiQFaZ9cOxwaVZ4WiGBfcGo hEIoTEI4Hnf6ZsIEKuYv16LBgKUTB/WQXdD/pvjY0an6reXPVM0+LfXqn+YbVNB08/TE UW9VaZtLGJUwOnUqlRrGDNqq8/nzo2jUAJ8HoAYLiFCR85K9tOtAqNEklCNV+ECyHq28 BWqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=sFL3vWniYj5iOT/XZxe8KuPrwo/N4trPGPortXbTzvc=; b=miJgQa1/natKgpE1wADI0OT2d9nXE8uZ3c1FlwxCj1GYYN45IlcBB+1ovbaUZk0bDN Lpz/TMai7w3jeVHbStbj7zykZw3oLAYHKVto/3NFwws/rinblW+WyW9Fn6A183Rbz6/1 7GwdEWASZKQDAPs2wp4jl8ABkUapGWicKTHimg5zFIpEmXrT+qJ+eJbXtBIOb3noviti otUpB4COH5RYGjTU/QFtECq+ntiqYlxidtZSEHNhzredcXWDZLuKDN7u9BMGfqn9WKC4 AtjDCm2o/lKey1YTwFwfeswmqV9UDTKYC+xw3eFTlPQn0NkaODHNG1aGuzezPLLxkj4W xpsQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si1286244oie.121.2020.04.07.18.03.49; Tue, 07 Apr 2020 18:04:05 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726494AbgDHBC4 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 7 Apr 2020 21:02:56 -0400 Received: from mga04.intel.com ([192.55.52.120]:1582 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbgDHBC4 (ORCPT ); Tue, 7 Apr 2020 21:02:56 -0400 IronPort-SDR: 4dbzYw+tIZR/z0qjm62dvyIFzo08GoWVyPozslIWbuSK0vmX5Gub0GLDyiMsoOsX8NvNl1rTRI L5cCGUrJK7zg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 18:02:55 -0700 IronPort-SDR: aoIgWarb9rwY1gMIByAFYJfIksZEwy6R2tUCK1nWiJ/zDgSSL5U3c++igIgFK/DpicWLudRxgt tMxJ4x9k/FfQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,357,1580803200"; d="scan'208";a="424955822" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga005.jf.intel.com with ESMTP; 07 Apr 2020 18:02:55 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Apr 2020 18:02:55 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Apr 2020 18:02:54 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.7]) with mapi id 14.03.0439.000; Wed, 8 Apr 2020 09:02:52 +0800 From: "Liu, Yi L" To: Jean-Philippe Brucker , Auger Eric CC: "alex.williamson@redhat.com" , "Tian, Kevin" , "jacob.jun.pan@linux.intel.com" , "joro@8bytes.org" , "Raj, Ashok" , "Tian, Jun J" , "Sun, Yi Y" , "peterx@redhat.com" , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Wu, Hao" Subject: RE: [PATCH v1 5/8] vfio/type1: Report 1st-level/stage-1 format to userspace Thread-Topic: [PATCH v1 5/8] vfio/type1: Report 1st-level/stage-1 format to userspace Thread-Index: AQHWAEUcqZEEdiOKbEGofjWp2Yic+6hjfq+AgAC/vLD//4YrAIAC1vWAgAbjh1CAAQJ/8A== Date: Wed, 8 Apr 2020 01:02:51 +0000 Message-ID: References: <1584880325-10561-1-git-send-email-yi.l.liu@intel.com> <1584880325-10561-6-git-send-email-yi.l.liu@intel.com> <20200403082305.GA1269501@myrica> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Liu, Yi L > Sent: Tuesday, April 7, 2020 5:43 PM > > > We don't, the PASID spaces are per-VM on Arm, so this function should > > consult the IOMMU driver before setting flags. As you said on patch 3, > > nested doesn't necessarily imply PASID support. The SMMUv2 does not > > support PASID but does support nesting stages 1 and 2 for the IOVA space. > > SMMUv3 support of PASID depends on HW capabilities. So I think this > > needs to be finer grained: > > > > Does the container support: > > * VFIO_IOMMU_PASID_REQUEST? > > -> Yes for VT-d 3 > > -> No for Arm SMMU > > * VFIO_IOMMU_{,UN}BIND_GUEST_PGTBL? > > -> Yes for VT-d 3 > > -> Sometimes for SMMUv2 > > -> No for SMMUv3 (if we go with BIND_PASID_TABLE, which is simpler due to > > PASID tables being in GPA space.) > > * VFIO_IOMMU_BIND_PASID_TABLE? > > -> No for VT-d > > -> Sometimes for SMMUv3 > > > > Any bind support implies VFIO_IOMMU_CACHE_INVALIDATE support. > > good summary. do you expect to see any please ignore this message. I planned to ask if possible to report VFIO_IOMMU_CACHE_INVALIDATE only (no bind support). But I stopped typing it when I came to believe it's unnecessary to report it if there is no bind support. Regards, Yi Liu