Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp293223ybg; Wed, 18 Mar 2020 23:13:46 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv76tcjUPMvwG+AfVcxqNxP2N0g84ebtMNDoLAwDGZV6hL5UkcFSVVCvIEerAIx8Ds+5bgJ X-Received: by 2002:aca:acd5:: with SMTP id v204mr1170824oie.124.1584598425955; Wed, 18 Mar 2020 23:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584598425; cv=none; d=google.com; s=arc-20160816; b=XR4+F8VveL3G5Ag2RAl8EAgslHXe69JUMywaYsbNYjjjL1Q/gFjX+UFDCOTZ4CYtPi x7yf3fEXRMUHuBb7Ub/HLriWOX7Ha9hyAJEGkiuNp87J6ugNHqmzuGymL25qRztOaOse jZ+gB/RW60GhOJcuSZPcuxJtAaun/flvS5k5MAagNndW8XSqt+zVcUH4lJF4VhjcmbKN vdPA16PLlKyj5XIg9rfBjsAVropViXzvcgNp+kVRkTva1h9HRlGNjl1fFd3lvbDvqiK/ 9kNBAghvByeaCSbJGojqT3ppf0IepK7sMiFEUwKRP/VDR3uLgDetB8bi763Q+bKwjRoV 3W8A== 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=R+V+M+gt8PX/60VWpNPh3zKIFF0cj48y2bTiTQF1WJI=; b=joBNCVBUZ7hkTYapuHhI+FJasZ5a1nzevosUet9OQQeoTYuh3bjcmnKnSHC2jmvm1e rL23OO0o6BRBFO+99mI3zBd1W7HYjZB1DIvH3tn2TVPa775mLgdt7XojozZuv+YtkGYf qXu3a9WyChm3UWM9P/R/U1CaZXgfUbvNk41iHZ8d88T96erNHYW0oNY/ZE2TqcJwXzC3 LRNAGnJR0ktdcAqK7HW/Lqb9X0GhaRIAX0jezGonZYQgLyPRmKjSv0oi8z6aHaqSZcwm Vvl+ZU90Xm18Ja/7YW8n2o2F/CnEuZL/DrtIN2m6J+Hv6ns7CFhlwWF89zKC3xtXSjd9 ie7A== 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 u136si538181oif.197.2020.03.18.23.13.32; Wed, 18 Mar 2020 23:13:45 -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 S1726990AbgCSGNR (ORCPT + 99 others); Thu, 19 Mar 2020 02:13:17 -0400 Received: from mga04.intel.com ([192.55.52.120]:62892 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbgCSGNQ (ORCPT ); Thu, 19 Mar 2020 02:13:16 -0400 IronPort-SDR: +BHVM9Ee+l4dg2OfdYk2TT/x7akb4dod2o4/934llKl9bMdlvP476vZwBIxWU2kG8LKeO4r7NU HkT06CK5GzTg== 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; 18 Mar 2020 23:13:16 -0700 IronPort-SDR: tCGZPbLdaeDR2b3+pyNi2ayHDMczwriRIZZYMGnHOfV8Sd3ukDD1KpOxz7CHjFCYuzmMLAyOWf Tw/xugilGiIg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,570,1574150400"; d="scan'208";a="418229706" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 18 Mar 2020 23:13:15 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Mar 2020 23:13:15 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Mar 2020 23:13:15 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.96]) with mapi id 14.03.0439.000; Thu, 19 Mar 2020 14:13:12 +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+YUAgAFLryA= Date: Thu, 19 Mar 2020 06:13:11 +0000 Message-ID: <82D7661F83C1A047AF7DC287873BF1E1738A8E20@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 PiA+IElmIHRoZSBsb2dpY2FsIHByb2Nlc3NvciBpcyBvcGVyYXRpbmcgd2l0aCBJbnRlbCBQVCBl bmFibGVkICgNCj4gPiBJQTMyX1JUSVRfQ1RMLlRyYWNlRW4gPSAxKSBhdCB0aGUgdGltZSBvZiBW TSBlbnRyeSwgdGhlIOKAnGxvYWQNCj4gPiBJQTMyX1JUSVRfQ1RM4oCdIFZNLWVudHJ5IGNvbnRy b2wgbXVzdCBiZSAwKFNETSAyNi4yLjEuMSkuDQo+ID4NCj4gPiBUaGUgZmlyc3QgZGlzYWJsZWQg dGhlIGhvc3QgSW50ZWwgUFQoQ2xlYXIgVHJhY2VFbikgd2lsbCBtYWtlIGFsbCB0aGUNCj4gPiBi dWZmZXJlZCBwYWNrZXRzIGFyZSBmbHVzaGVkIG91dCBvZiB0aGUgcHJvY2Vzc29yIGFuZCBpdCBt YXkgY2F1c2UgYW4NCj4gPiBJbnRlbCBQVCBQTUkuIFRoZSBob3N0IEludGVsIFBUIHdpbGwgYmUg cmUtZW5hYmxlZCBpbiB0aGUgaG9zdCBJbnRlbA0KPiA+IFBUIFBNSSBoYW5kbGVyLg0KPiA+DQo+ ID4gaGFuZGxlX3BtaV9jb21tb24oKQ0KPiA+ICAgICAtPiBpbnRlbF9wdF9pbnRlcnJ1cHQoKQ0K PiA+ICAgICAgICAgICAgIC0+IHB0X2NvbmZpZ19zdGFydCgpDQo+IA0KPiBJSVVDLCB0aGlzIGlz IG9ubHkgcG9zc2libGUgd2hlbiBQVCAicGxheXMgbmljZSIgd2l0aCBWTVgsIGNvcnJlY3Q/DQo+ IE90aGVyd2lzZSBwdC0+dm14X29uIHdpbGwgYmUgdHJ1ZSBhbmQgcHRfY29uZmlnX3N0YXJ0KCkg d291bGQgc2tpcCB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