Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1279530ybh; Thu, 23 Jul 2020 05:06:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4ZpSQS7PV2yWRCRG6s9D6aOuHjq1ZnrIKFNN6sPL+Jf7i2iJVyjKfDZH+UGk6MBuen8NK X-Received: by 2002:aa7:d043:: with SMTP id n3mr3999971edo.102.1595506003178; Thu, 23 Jul 2020 05:06:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595506003; cv=pass; d=google.com; s=arc-20160816; b=f0eElZ14JSPfEnHgUjmslTbuvo9ZcgYNya4oyIOufl+SrbCca7KRxkyqu7qnPkB/uM 9TkYow+VhtkCYLVjFDWs1D7v+F6FhILaoGq31J/BoQu4uScDhKUXyepLeL1S3xF32Jll xRys3g2c2YdF4YtfPm8GwTVx/y8OUxjQzhFHpyG9Nw3FAGuX6uClr6+gJfKv7DPN9kvJ QfnuYaciT03O/mwiShjGjEjhmZxICrlfYc+LmZ2OdOslK3aXnyleasoFO0T/EKTcrxNo 77h3ttiVHu2oAOHUdIpkEJFBNbhV7Cq6ZCBYzvQndNst0LptxkWjXrNFSAdNV2ED/jpU t0hA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-product:dlp-version:dlp-reaction:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:ironport-sdr :ironport-sdr; bh=XU0xVkNRG7Ih/+Xs97zWNr94AjZozEaUK4V22gBuO2k=; b=OvhqLwSdBS02jhMcndRbxAOBrOMNHrE+PNYu+RutBXz1fOWv+nPdKKzXPmanmnXQ4d 6ZDch+Bm2mwhlPY3fOmQhuqP1qC3LywPcXPdeNw5UPJZRbS8n8Tz59eQ7z84L4P4dVfZ Y5xlQl9TipNNSz5tnoNvk0ody+BRVzJ4XDUd/LJp2miXIOUdXlA58dzdpOZyW5x0keQF Ogi9btiDbFOfQ4INfEcfHBD7DYWbLwfyN+0Kc9OEcoCbmBEK6LVUi2KQkCoTZPU1p3/D 0dTUPzUVARERZjuraW7T75O/vQm9U3TjlwjRaxKgPTAbFvM+Qs1+BmlybdWEsXkbzhMz GvTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=P56rWQmR; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si1843304ejb.350.2020.07.23.05.06.19; Thu, 23 Jul 2020 05:06:43 -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=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=P56rWQmR; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727885AbgGWMGH (ORCPT + 99 others); Thu, 23 Jul 2020 08:06:07 -0400 Received: from mga07.intel.com ([134.134.136.100]:21389 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbgGWMGG (ORCPT ); Thu, 23 Jul 2020 08:06:06 -0400 IronPort-SDR: GBJK0pOInx7XunwR8j3w+bygFeR/iSLHB4Kn0etslXn/IJ8wzQAtJrjpGxeq/w0lR3QJo0T0uF /5pje0kSTXKA== X-IronPort-AV: E=McAfee;i="6000,8403,9690"; a="215120761" X-IronPort-AV: E=Sophos;i="5.75,386,1589266800"; d="scan'208";a="215120761" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2020 05:05:59 -0700 IronPort-SDR: SBisw0KLhXfk9DVG+dAku/va1s5OZ4NRVe/T0a6CylLFrNB9dWnoeA6dasD+PArKRPcOjIazig St5VppGdqxSA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,386,1589266800"; d="scan'208";a="320630836" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga002.fm.intel.com with ESMTP; 23 Jul 2020 05:05:55 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 05:05:54 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX111.amr.corp.intel.com (10.22.240.12) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 05:05:54 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.172) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Jul 2020 05:05:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T6gnJAKz9S5yraYiYGbHrsMTrtlbJ/BPuQZVNlg6fmA+5We8rq9zX/MZWPqe70IQYDSyCMvP42S4P980LVRXH+lnOzuHJ0wztqOc+NRBii/j59s9x3x9uK6Bwr/EzuglQaVtM3mKEcIrCzS7WGaP7UP8ipDIId7aqy71ZPeqaGtvVXZ9j/7DibPO7DF7SHjWXew9EnyeLY2dEXBOt3GIcoDujH+nCv7UisUwVc7U5WbmGpsglugA9EFCYZBQz2n1NtXEYtikkVek8Amb1SQqSs0kmHI23XSJBl09UrgIIZI96Gy3rtzogH6jdOTVBW2s1hw0pjy2k9lpknSY7A/OMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XU0xVkNRG7Ih/+Xs97zWNr94AjZozEaUK4V22gBuO2k=; b=UmTDczu1L+AeZzAliG0aimbJKqWd7+c2RedxHqWPVhxAyWL1yhZrJZ5ljxHa3KwCtiWXBTnl+xNH4Mek2leoTC3dkJnWklBeZelqzzLgLjz9QPKJoLFrriNa7OXnJj3PplGTJV2RRfmMVllD9dWVBJ66pDOmhxT7LAm0dDDbsvkz1WTQnQ+MvOZv063DlgIS1XOZ7iBAlPeaf8OmnLOi4EcJVyaLId3yB7DqFAfMGHxkduHaqVvcHifxQ/Ohyg2MM2TJR9QEG8n8fh6qk/+Es+XmUbJmF/iqFzeudi8CiSgBCJaAiQzI4Qa/seY2CZyqX02WAJWuxbkPkaw++uAVUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XU0xVkNRG7Ih/+Xs97zWNr94AjZozEaUK4V22gBuO2k=; b=P56rWQmRDrysrIygAYJF4pdM97HBxWHC3djYyH8LOeCKN2Nxgq5QTJzDGN+v+fyfF/c8mfaWUbuX20ZY6MCSI9u1BpZRMOcZ/Su62zkSGRAn28D77AFRV8/h3ro69k8b6xB+mPcsnxseA81Hsp5IVrWKngOHMlTp6G8GPTo+KAA= Received: from DM5PR11MB1435.namprd11.prod.outlook.com (2603:10b6:4:7::18) by DM6PR11MB3515.namprd11.prod.outlook.com (2603:10b6:5:6c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20; Thu, 23 Jul 2020 12:05:52 +0000 Received: from DM5PR11MB1435.namprd11.prod.outlook.com ([fe80::9002:97a2:d8c0:8364]) by DM5PR11MB1435.namprd11.prod.outlook.com ([fe80::9002:97a2:d8c0:8364%10]) with mapi id 15.20.3216.020; Thu, 23 Jul 2020 12:05:52 +0000 From: "Liu, Yi L" To: Auger Eric , "alex.williamson@redhat.com" , "baolu.lu@linux.intel.com" , "joro@8bytes.org" CC: "Tian, Kevin" , "jacob.jun.pan@linux.intel.com" , "Raj, Ashok" , "Tian, Jun J" , "Sun, Yi Y" , "jean-philippe@linaro.org" , "peterx@redhat.com" , "Wu, Hao" , "stefanha@gmail.com" , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v5 12/15] vfio/type1: Add vSVA support for IOMMU-backed mdevs Thread-Topic: [PATCH v5 12/15] vfio/type1: Add vSVA support for IOMMU-backed mdevs Thread-Index: AQHWWD2m9cYqxGch9Ui/XGA0vhDWoakQcFWAgASyDUA= Date: Thu, 23 Jul 2020 12:05:52 +0000 Message-ID: References: <1594552870-55687-1-git-send-email-yi.l.liu@intel.com> <1594552870-55687-13-git-send-email-yi.l.liu@intel.com> <5921bffc-9daa-99be-9a12-6d94ce1950d2@redhat.com> In-Reply-To: <5921bffc-9daa-99be-9a12-6d94ce1950d2@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.216] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d440f6ab-454f-4d0d-12f7-08d82f00bf21 x-ms-traffictypediagnostic: DM6PR11MB3515: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HHYWynRlaS6Zyr92pEyjSSFzWqp3TfyphmEHqCPyB03vnUM5ZzgbZBh/hN2Sk0G6ZDSWPPEOiCxU/9ttF9GcQDOTh9y82RYe2H2kORthqKXq87PMY8FWRSVPSpObg1NWlQmMoFZzaJZSw9/9GS9CYbngvRYea3o6Ml8Lds1daq/eIkMbOfXNnvGQg01CJ2MmMBZLEqUtm11hD59lPtUInBtWN5l5Yp8Y+cYj72QXGRVb6nXjzBxTU09dFzep1P6FlIrbic+jl0AEzeqH/XFfP/qGjw2Y5/3K8fLxmsltz/qWjPbxoJbI0rLMm/t2KQid21Oq0mqNCbsEsE9It+8FPpCNz2BXKiTGLEg+VJaIb/D/0cfm0luiahUlaWywsnvK5yPYLOU9p0ckCl7bza8vstbgssJaKRajJ4hzcDTtanvyBNv+Mvsr+ATaMSU0gNqCctYTOcFX6e9EozhnpG6uuqICq8sp3e+ZXQTF6yrvdrQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR11MB1435.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(346002)(376002)(366004)(396003)(136003)(8936002)(76116006)(2906002)(966005)(8676002)(71200400001)(7416002)(66446008)(83380400001)(64756008)(66556008)(66476007)(66946007)(52536014)(316002)(54906003)(5660300002)(53546011)(6506007)(9686003)(110136005)(33656002)(55016002)(478600001)(86362001)(26005)(186003)(4326008)(7696005)(15398625002)(43620500001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: AQVCJhZuGJhbwxv3tIMxtwti1Q7s2wFGtgQuzEjMbZndKJ1bRgOJG0O+Td3uSw0PM3JpBdBz2RbXYj6kurnO9z+VNvBwrdf0O6Si6cVMUrG5aUh/VGfFjfHKUe2oHQZfS/dXymV3rKRH7YLOkVEzBeBqmHaqc6+0KphWxV0U/kSgDwvxCrxFKGoaKHM4C9urEVeZ+0us3WvZxp9dFun33NyepkVd1pIOQ5O8TgrzhpS1LNSWWjXd29DTLgjqQSzHvdDMd6LdBuiY0kJOx2bNm2BFbT4Jz1ZDdDmnOj4HcwDFuJ3ibZ6sJeF9hVlvRTXmge85xTUYvJmcixTG+ABikStcM+JPi5NsW3J+vcxn4bQL935j6VbOPB4UF69ICzH0B9ihDEDg2igvGPb3Rjj9G2G5V5bfX9qL0bB4MSdSrm7n3tQoqaGFG0IkSk2OaRB7FL6O9Eyk3lwypGmbSBrfKrF7q+fWgh5I31Hm88vHXJPFxrA99slEJdMT3FUTDTEg Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR11MB1435.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d440f6ab-454f-4d0d-12f7-08d82f00bf21 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jul 2020 12:05:52.4297 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: n3/09sYkki1B0zf3hRUuPpHP7fAOoXqlF3qtaZGZLK+rSkoDB8oYoznHl9JDrMMaqlvmr1sWpxgql9Lcaz2noQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3515 X-OriginatorOrg: intel.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgRXJpYywNCg0KPiBGcm9tOiBBdWdlciBFcmljIDwgZXJpYy5hdWdlckByZWRoYXQuY29tPg0K PiBTZW50OiBNb25kYXksIEp1bHkgMjAsIDIwMjAgODoyMiBQTQ0KPiANCj4gWWksDQo+IA0KPiBP biA3LzEyLzIwIDE6MjEgUE0sIExpdSBZaSBMIHdyb3RlOg0KPiA+IFJlY2VudCB5ZWFycywgbWVk aWF0ZWQgZGV2aWNlIHBhc3MtdGhyb3VnaCBmcmFtZXdvcmsgKGUuZy4gdmZpby1tZGV2KQ0KPiA+ IGlzIHVzZWQgdG8gYWNoaWV2ZSBmbGV4aWJsZSBkZXZpY2Ugc2hhcmluZyBhY3Jvc3MgZG9tYWlu cyAoZS5nLiBWTXMpLg0KPiA+IEFsc28gdGhlcmUgYXJlIGhhcmR3YXJlIGFzc2lzdGVkIG1lZGlh dGVkIHBhc3MtdGhyb3VnaCBzb2x1dGlvbnMgZnJvbQ0KPiA+IHBsYXRmb3JtIHZlbmRvcnMuIGUu Zy4gSW50ZWwgVlQtZCBzY2FsYWJsZSBtb2RlIHdoaWNoIHN1cHBvcnRzIEludGVsDQo+ID4gU2Nh bGFibGUgSS9PIFZpcnR1YWxpemF0aW9uIHRlY2hub2xvZ3kuIFN1Y2ggbWRldnMgYXJlIGNhbGxl ZCBJT01NVS0NCj4gPiBiYWNrZWQgbWRldnMgYXMgdGhlcmUgYXJlIElPTU1VIGVuZm9yY2VkIERN QSBpc29sYXRpb24gZm9yIHN1Y2ggbWRldnMuDQo+IHRoZXJlIGlzIElPTU1VIGVuZm9yY2VkIERN QSBpc29sYXRpb24NCj4gPiBJbiBrZXJuZWwsIElPTU1VLWJhY2tlZCBtZGV2cyBhcmUgZXhwb3Nl ZCB0byBJT01NVSBsYXllciBieSBhdXgtZG9tYWluDQo+ID4gY29uY2VwdCwgd2hpY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