Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3506404ybb; Mon, 23 Mar 2020 02:20:50 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvytbMji0UWzdbHatBYPSxXCFyWEA8or0WiGkkInoQdPCeoIdF7eoLIsldHRXzzgNWi3PIS X-Received: by 2002:a9d:bf5:: with SMTP id 108mr18209401oth.260.1584955250165; Mon, 23 Mar 2020 02:20:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584955250; cv=none; d=google.com; s=arc-20160816; b=nKCa7uAbtidyTQkgHpBnA1PyaMAuheSC3KxSpAF6eR0cOhwAfGM1vyb48UtGu6/Cj1 hf96pz4ZDkBLdqq3wvgBdGomYtrCauWtqDEwc2JlsiYZdfAGmr+oXrI3QEHuxUvElbJF PhYCfcuRVFYmLO45Vq/VbYbLKIWDX3u8LaYBonixK/2Ct1UvVxnwGZlsng0qKnjm3+tv /0hHVxgIdLllCTXCaggW1vRMkYTt98jNLSG0uWmmjs3I0agqMsZcCCCBPNmjozebst4/ FVAP+zM2oRXoBLtjZIJCYEJSn11rxl+m4TLZuaQWqlMsQBUmEtMhWumqUvP9jEM5ScPm uQjg== 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=qqOFYF0acMHkFuooZwGyyRLPhRMLsXRxjdKRHBWwnO0=; b=y0dIlStbCTknNoA70DL8fvIQcgNPYNBf50EaiOKpTgFt2fdiXiChSDHLSfuj7wPFRD xeLL2XaZzSAX8UJuor163SajIIcgq8bomcjRSXXYe7TDUuFDCii486kxVBqdaVtruRFU aeuCHd2VLxBE1wJvRaEqNuW+nRMEfKVGryASYxYiZnwQkWMErUo4wk95BxIYBq3C465i 9rU5XwnItm10H9xc9N8v8j0AxXnYDPViea0QvffBUf/VAbuw5b7YIE/2WAmVvnoAMtlC IwUVEfJGzmm6EpfCxpVrHeAikIdhpme7WQTAMCeAb24HHE/e8WozBn99jhno5iM0MZMm zcow== 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 n82si6726746oib.123.2020.03.23.02.20.37; Mon, 23 Mar 2020 02:20:50 -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 S1727696AbgCWJUP (ORCPT + 99 others); Mon, 23 Mar 2020 05:20:15 -0400 Received: from mga09.intel.com ([134.134.136.24]:51869 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727650AbgCWJUP (ORCPT ); Mon, 23 Mar 2020 05:20:15 -0400 IronPort-SDR: BMI2jGWvrg7wszD5Eqv5IVTmjk+hEtUrh1VDn2nEyHIVkl7N4rnofNwESQWtae29gyQM4tnm/O jP9nbZFcn5aQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2020 02:20:11 -0700 IronPort-SDR: LKQNZLB1BZUqh/ypIKhHHHsV6NuYtcEoozkqRUqIjaIUiOjfbaUXJDu/s6ZPZeShBB6uy2EtzA TfaLrMQLhbcg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,295,1580803200"; d="scan'208";a="249556906" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 23 Mar 2020 02:20:10 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Mar 2020 02:20:10 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 23 Mar 2020 02:20:04 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 23 Mar 2020 02:20:03 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.86]) with mapi id 14.03.0439.000; Mon, 23 Mar 2020 17:20:02 +0800 From: "Kang, Luwei" To: "Christopherson, Sean J" CC: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "pbonzini@redhat.com" , "vkuznets@redhat.com" , "wanpengli@tencent.com" , "jmattson@google.com" , "joro@8bytes.org" Subject: RE: [PATCH] KVM: VMX: Disable Intel PT before VM-entry Thread-Topic: [PATCH] KVM: VMX: Disable Intel PT before VM-entry Thread-Index: AQHV/Nh9FI7fbfgIUkqDZ3DrcNQ1xKhN+YUAgAfwusA= Date: Mon, 23 Mar 2020 09:20:01 +0000 Message-ID: <82D7661F83C1A047AF7DC287873BF1E1738A9724@SHSMSX104.ccr.corp.intel.com> References: <1584503298-18731-1-git-send-email-luwei.kang@intel.com> <20200318154826.GC24357@linux.intel.com> In-Reply-To: <20200318154826.GC24357@linux.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-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 PiBPbiBXZWQsIE1hciAxOCwgMjAyMCBhdCAxMTo0ODoxOEFNICswODAwLCBMdXdlaSBLYW5nIHdy b3RlOg0KPiA+IElmIHRoZSBsb2dpY2FsIHByb2Nlc3NvciBpcyBvcGVyYXRpbmcgd2l0aCBJbnRl bCBQVCBlbmFibGVkICgNCj4gPiBJQTMyX1JUSVRfQ1RMLlRyYWNlRW4gPSAxKSBhdCB0aGUgdGlt ZSBvZiBWTSBlbnRyeSwgdGhlIOKAnGxvYWQNCj4gPiBJQTMyX1JUSVRfQ1RM4oCdIFZNLWVudHJ5 IGNvbnRyb2wgbXVzdCBiZSAwKFNETSAyNi4yLjEuMSkuDQo+ID4NCj4gPiBUaGUgZmlyc3QgZGlz YWJsZWQgdGhlIGhvc3QgSW50ZWwgUFQoQ2xlYXIgVHJhY2VFbikgd2lsbCBtYWtlIGFsbCB0aGUN Cj4gPiBidWZmZXJlZCBwYWNrZXRzIGFyZSBmbHVzaGVkIG91dCBvZiB0aGUgcHJvY2Vzc29yIGFu ZCBpdCBtYXkgY2F1c2UgYW4NCj4gPiBJbnRlbCBQVCBQTUkuIFRoZSBob3N0IEludGVsIFBUIHdp bGwgYmUgcmUtZW5hYmxlZCBpbiB0aGUgaG9zdCBJbnRlbA0KPiA+IFBUIFBNSSBoYW5kbGVyLg0K PiA+DQo+ID4gaGFuZGxlX3BtaV9jb21tb24oKQ0KPiA+ICAgICA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