Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3134290ybv; Mon, 24 Feb 2020 19:00:05 -0800 (PST) X-Google-Smtp-Source: APXvYqykso2JmC3DjcddLzIAEFKjJ7UwEYm6RqORI3VEKaTkLId9g7F3MaXRCPna6A38OhPplxnX X-Received: by 2002:aca:bcd7:: with SMTP id m206mr1864201oif.46.1582599605711; Mon, 24 Feb 2020 19:00:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582599605; cv=none; d=google.com; s=arc-20160816; b=XXFAktWaCjKjiVr0BQPR3aCmsNhOykMTNr0AO85WDy+uMotFJTKWJyMEB0fQ+nQW6x 7ErFxRvk2x6XdlsNqeInxWrckj0lZFmdFbdj2Jtu9rDUeQBWlzf+5M7Z//eyKVd89ubc yPTKJCmT01nYMeW0a9jwTe/umGyIFTYwit+eqbUbVt5Ab49tXxyrGP52Ffcv5aDKSJ+T HoAfOhmstSHRH7+mehLhgq/+Cl1VcUoZex1q7cIBrhd3eS5Qica6ly8b7VMoCk/f05aM NCMi/uRyQiSB1cj+VxRwFiNz33u/p5gXbwj8P3956DQboxiN5lpOZT24jb61X7KQPyLe e4Mw== 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; bh=uMmLOxCZTxyNdX4ZRNa1Y1eiM5m5ZIZxHBGNRH5tYuQ=; b=Hbph7/k4D/wjQxX5dcywom2D1xBTaybxEi5iWZFSYdPwS9nd0Z/D3X30tbO9N+XTAq 5VPRlXI3UO0HKnzyzjucDUTduClra0QWgRzbS6SXTSWKOsWL6zn7+KG7qinEynjLRrdm 8Qac+QzuePLNFwly969PZzApo/MkLqLF655bFlG/s6Ej5AyhILKhcuuC/SH31IObtDLF sxbeYm1SPZpjKW1GM7CP9uzI2Sg6ZMX8IhpjVkiyZaxqyL9meGDlR1jqOIhQ7t56XweR SNDnjGGnfTumCbDFbF5ucU5xHeha1MZYbcbE0TfET9WgLHr0AJayN/bu+3zrgvO5Dhx/ blqg== 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 b2si5893930oic.205.2020.02.24.18.59.52; Mon, 24 Feb 2020 19:00:05 -0800 (PST) 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 S1728862AbgBYC7p (ORCPT + 99 others); Mon, 24 Feb 2020 21:59:45 -0500 Received: from mga09.intel.com ([134.134.136.24]:1520 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbgBYC7p (ORCPT ); Mon, 24 Feb 2020 21:59:45 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Feb 2020 18:59:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,482,1574150400"; d="scan'208";a="410085978" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 24 Feb 2020 18:59:43 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Feb 2020 18:59:42 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Feb 2020 18:59:42 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.5]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.158]) with mapi id 14.03.0439.000; Tue, 25 Feb 2020 10:59:38 +0800 From: "Tian, Kevin" To: Alex Williamson , "kvm@vger.kernel.org" CC: "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "dev@dpdk.org" , "mtosatti@redhat.com" , "thomas@monjalon.net" , "bluca@debian.org" , "jerinjacobk@gmail.com" , "Richardson, Bruce" , "cohuck@redhat.com" Subject: RE: [PATCH v2 3/7] vfio/pci: Introduce VF token Thread-Topic: [PATCH v2 3/7] vfio/pci: Introduce VF token Thread-Index: AQHV51YI52su8gffRkOPjcjW9Q2JM6grPNwA Date: Tue, 25 Feb 2020 02:59:37 +0000 Message-ID: References: <158213716959.17090.8399427017403507114.stgit@gimli.home> <158213845243.17090.15563257812711358228.stgit@gimli.home> In-Reply-To: <158213845243.17090.15563257812711358228.stgit@gimli.home> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWI1MTkzZjEtNmRjMi00NDE1LTg2NTItYjUxYTUwZjQzOWE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUklkNFYxXC9Nb1JxemdjSHYxTHVuUVJ5V0NpYSs3VUhyZUdTNWhkSjlTd1I3dHhPN3FNeGFKN01XWE03MkdrS3QifQ== 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-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiBGcm9tOiBBbGV4IFdpbGxpYW1zb24NCj4gU2VudDogVGh1cnNkYXksIEZlYnJ1YXJ5IDIwLCAy MDIwIDI6NTQgQU0NCj4gDQo+IElmIHdlIGVuYWJsZSBTUi1JT1Ygb24gYSB2ZmlvLXBjaSBvd25l ZCBQRiwgdGhlIHJlc3VsdGluZyBWRnMgYXJlIG5vdA0KPiBmdWxseSBpc29sYXRlZCBmcm9tIHRo ZSBQRi4gIFRoZSBQRiBjYW4gYWx3YXlzIGNhdXNlIGEgZGVuaWFsIG9mIHNlcnZpY2UNCj4gdG8g dGhlIFZGLCBldmVuIGlmIGJ5IHNpbXBseSByZXNldHRpbmcgaXRzZWxmLiAgVGhlIGRlZ3JlZSB0 byB3aGljaCBhIFBGDQo+IGNhbiBhY2Nlc3MgdGhlIGRhdGEgcGFzc2VkIHRocm91Z2ggYSBWRiBv ciBpbnRlcmZlcmUgd2l0aCBpdHMgb3BlcmF0aW9uDQo+IGlzIGRlcGVuZGVudCBvbiBhIGdpdmVu IFNSLUlPViBpbXBsZW1lbnRhdGlvbi4gIFRoZXJlZm9yZSB3ZSB3YW50IHRvDQo+IGF2b2lkIGEg c2NlbmFyaW8gd2hlcmUgYW4gZXhpc3RpbmcgdmZpby1wY2kgYmFzZWQgdXNlcnNwYWNlIGRyaXZl ciBtaWdodA0KPiBhc3N1bWU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