Received: by 10.192.165.148 with SMTP id m20csp1787799imm; Thu, 3 May 2018 05:31:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqNHoRVLG92sR+2vkAEuI5yDdqetfYSWjVV5xkvCqq4v0Wa4UFvwDYz10XM6ARtYL0cfVKg X-Received: by 2002:a17:902:43a4:: with SMTP id j33-v6mr14219854pld.118.1525350698419; Thu, 03 May 2018 05:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525350698; cv=none; d=google.com; s=arc-20160816; b=rVLvOgNhc/wkUIT65CAYT5oh4Cdyskc58l5hqur2pIE7yVWNZY0O6Cgtg5UwXzmW0f ce+lxwhCg50tVqNPq7ZdxeN3ADkmwTQNiI9gnpOKiwnrtjg1VDoFB7VLTGEUOjG3f7Zu z3M/cf5VlUbF62dG1zPqe+yrUqz9wpG0+pasnyQAK8JKMKGcbYu0oKdiVv+RLg6G5QDv r6vbFfU/dbvQRN+dKLfo8X1RIeETZWvYgMl+2hxKMs1j1WHKLYWv0I9OttxN/LBsI2J6 zmJ6o6k1vXl7jtPykxa2nnTyUPO7cm9Q66RPQzcT+34XGPeuEDmmCBbJstvYDncUIBuw ZDKw== 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:arc-authentication-results; bh=Eq7L8RMsi8FCDzSR22x7xQFqTqEIBBEtBoj3WbYLa0s=; b=bXNkZywlOxy9d2DsCqqrmq+AhWdp6IQIHvHsTicGA/g6TaTWDK2sJrks8U8y3b1o4+ ZbNBWdYne+pIqd12BCUuj/S4CVoTGbn0tFqADytbWYorON6gA2CS2ZYccD4zd90jFrra wbV+wJOwj6+CgsXptgGAF3VlkpgzzY/lRHcp5NDVpzeuAimvVEs+p834+599UVu+EBPv LdrN2M0AnKkH9FXSx6luQpdNGF+Cqm9lO1Q/ZQGLPtBCQIhrkaH7pp/X7PzDoYD/r5XI 4nWsmUZlw5yxmwlygUSCU7LyhebwqI6ZZGmqFgkf+ZougSEr0302tV30qJW5UtxfeUPB idqw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s23-v6si6711289plr.458.2018.05.03.05.31.24; Thu, 03 May 2018 05:31:38 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752090AbeECMau convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 May 2018 08:30:50 -0400 Received: from mga12.intel.com ([192.55.52.136]:23848 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751453AbeECMas (ORCPT ); Thu, 3 May 2018 08:30:48 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 May 2018 05:30:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,358,1520924400"; d="scan'208";a="38378396" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 03 May 2018 05:30:47 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 3 May 2018 05:30:46 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 3 May 2018 05:30:46 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.40]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.240]) with mapi id 14.03.0319.002; Thu, 3 May 2018 20:30:45 +0800 From: "Kang, Luwei" To: Alexander Shishkin CC: "kvm@vger.kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" , "pbonzini@redhat.com" , "rkrcmar@redhat.com" , "linux-kernel@vger.kernel.org" , "joro@8bytes.org" , "peterz@infradead.org" , "chao.p.peng@linux.intel.com" Subject: RE: [PATCH v7 05/13] perf/x86/intel/pt: Introduce a new function to get capability of Intel PT Thread-Topic: [PATCH v7 05/13] perf/x86/intel/pt: Introduce a new function to get capability of Intel PT Thread-Index: AQHT4sefaepgQr78WUqju+HNtlv5nqQdTXEAgACIG+D//47xgIAAiXYQ Date: Thu, 3 May 2018 12:30:44 +0000 Message-ID: <82D7661F83C1A047AF7DC287873BF1E167F6DFFA@SHSMSX101.ccr.corp.intel.com> References: <1525349323-9938-1-git-send-email-luwei.kang@intel.com> <1525349323-9938-6-git-send-email-luwei.kang@intel.com> <20180503105032.h73n5lcrwkdbahgm@um.fi.intel.com> <82D7661F83C1A047AF7DC287873BF1E167F6DDCE@SHSMSX101.ccr.corp.intel.com> <20180503121301.nlbm4cotbv26tc7l@um.fi.intel.com> In-Reply-To: <20180503121301.nlbm4cotbv26tc7l@um.fi.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTcwOTI5ZmUtODgwZC00ZjhkLWFkMzItMTAyNDJhNDNjNDdiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJyUVZjdWVQcmNyeXBJZUhZY1BSTzVXSk0zdU5EN0lzMzVPeStuOWg0Nld0bTM4XC9kZ3lkWmw5b2RYRWc3TmpZcCJ9 dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > New function __pt_cap_get() will be invoked in KVM to check if a > > > > specific capability is availiable in KVM guest. > > > > Another function pt_cap_get() can only check the hardware > > > > capabilities but this may different with KVM guest because some > > > > features may not be exposed to guest. > > > > > > Do we really need both in KVM? > > > > Yes, KVM need get host capability to estimate if can expose this > > feature to guest > > Can you elaborate on this, what information do we need besides MSR_IA32_VMX_MISC[14]? Enable Intel PT in guest depend on SECONDARY_EXEC_PT_USE_GPA, EPT, MSR_IA32_VMX_MISC[14] and the capability of " PT_CAP_topa_output" on hardware. PT driver will return " -ENODEV" if hardware not support "PT_CAP_topa_output". Thanks, Luwei Kang > > Thanks, > -- > Alex