Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2425072ybb; Mon, 30 Mar 2020 05:59:23 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuE41QdGpCfkyuNCr3EUmCOcNHG8soDoGyl1uvUJLmZG2pBhHVLYHVqW0RjzTztJu2bDHeb X-Received: by 2002:a9d:4698:: with SMTP id z24mr8785589ote.271.1585573163238; Mon, 30 Mar 2020 05:59:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585573163; cv=none; d=google.com; s=arc-20160816; b=axyAq5lSYUoNxAEpaRSAgweqiS8Y+2GoFbaAElWx7BWcvCKZuLXgBf4PN/7VrUJ3Na nGhjxlm1p+00HC05zeVH36IdfrnUpyK1jugqGoansxY68pGzIAQ/AOcG5Tm6u/z1EC55 bnyiqWSgtBV9oXt/tSFiSXmMHZDZKZCBv7I3jOD7GoU3jXYPekiDCkaJVVZZydxA5esE wnSNcqQoOlvLQ5dmZ8i0kRFBfM3iDnodw6QyigLR0M5WcMj7u2m1QuWzrSS5xR0w1uBs IhhG2amcHHBPO60Gsnbp2pEtDWGjIV/mAg1j7luL98EzAX43skTakBFUdp7AbhmUox+s qHpg== 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=/nyikjw8laU8M76RzOO84Zs51VhNTFhN1ft/kOHg2i0=; b=wsUpC/zxvL7IvTRPR7gg2kFenqNJ3nrpS3VJIgBZ421Hum2Er0FoQy36usZEuPAs6z JuXCMHvSoxl7Nz3bDhf6bcrqIg5ZoWkDWZTHCy7xuxfd8Zefhv1xNZfLufp52gxNBDpr yIvhihryOpuXG1jFDJwNHR+F4Ka3gUM5YgOsDPvxaxDxSHHvRYXcPsr39mQgmLMz5PdM S31Ex+ZG2TsCj5ENitNwECpCToKscG6BCAwUkeyZYJDe5AdyWkEBuxGbuybOp4Mtziqx Urr0p45R5gZD0pAk0T0MBNr/RadMsvNG5WA7YQadHMj2N0LqTqSdlDHZgyY/zZ+txb38 Ugsw== 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 j15si6694112ots.187.2020.03.30.05.59.10; Mon, 30 Mar 2020 05:59:23 -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 S1730184AbgC3M6U (ORCPT + 99 others); Mon, 30 Mar 2020 08:58:20 -0400 Received: from mga17.intel.com ([192.55.52.151]:62428 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729705AbgC3M6U (ORCPT ); Mon, 30 Mar 2020 08:58:20 -0400 IronPort-SDR: S3k+WCWYjnABA1eHmFjp47vsU3pB3CfSudVOPobJ05O9qgYEiyHBt+T8ba9FCWkEWkXX99Zhgw ruCz5Xsnto/g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2020 05:58:19 -0700 IronPort-SDR: g/AWCXdXyO4HidWwQg0ayWCYUSanvHNkem/fUxHxz4Q6ktOv49wSyXBmbwvRBLl2NyCyh0IpZZ +TlZgXC6TCdw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,324,1580803200"; d="scan'208";a="242019923" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 30 Mar 2020 05:58:18 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 30 Mar 2020 05:58:15 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.213]) with mapi id 14.03.0439.000; Mon, 30 Mar 2020 20:58:11 +0800 From: "Tian, Kevin" To: "Liu, Yi L" , "alex.williamson@redhat.com" , "eric.auger@redhat.com" CC: "jacob.jun.pan@linux.intel.com" , "joro@8bytes.org" , "Raj, Ashok" , "Tian, Jun J" , "Sun, Yi Y" , "jean-philippe@linaro.org" , "peterx@redhat.com" , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Wu, Hao" Subject: RE: [PATCH v1 7/8] vfio/type1: Add VFIO_IOMMU_CACHE_INVALIDATE Thread-Topic: [PATCH v1 7/8] vfio/type1: Add VFIO_IOMMU_CACHE_INVALIDATE Thread-Index: AQHWAEUdbUtKvEWiiEiZu1SnRvWegKhhIjHA Date: Mon, 30 Mar 2020 12:58:11 +0000 Message-ID: References: <1584880325-10561-1-git-send-email-yi.l.liu@intel.com> <1584880325-10561-8-git-send-email-yi.l.liu@intel.com> In-Reply-To: <1584880325-10561-8-git-send-email-yi.l.liu@intel.com> 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="utf-8" Content-Transfer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