Received: by 10.192.165.148 with SMTP id m20csp1767791imm; Thu, 3 May 2018 05:14:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpt8vFlsxpi4epOUgdtaG9JWWaUEsT/u417natz2raLo/deuL8RrYKldwM/oHC2XVj6bnog X-Received: by 2002:a17:902:a986:: with SMTP id bh6-v6mr17871374plb.245.1525349640963; Thu, 03 May 2018 05:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525349640; cv=none; d=google.com; s=arc-20160816; b=YpTPR1Q8FkWbZHBwiFDmc+Ht45/mGNbc0qlpUZhzYdZSjS5d3a6hSFhsFNglv9OVFt rq+u8GMxgJILvVRPZDjp4Nglcd5hLo70M7mx0qazcJcNQgEf0Zmu83byos2nCAEBLXO8 3jrSEmRdxzgBL0HnuTNxeo7qibZCcYTYFKyOTf0/vex9x9AeB4Dx/vLgFLyT3uRlDXKa wadRngdPSm/JFzs3bRaKq4dEFevaNtC6oqQKKHO5q0IGttFdx8779Vs+LY4QWBy1uFVv 2bc+vLinoicjUB/TM53Y2MKftm3pfvN6KSb2S+78QP8k44WkRfau0mu4JreIutqrwEFu b5RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=OKmMOFv3IVEHbTFE3sJnVOD3G2vdRifUGtC0bJ7sNzo=; b=kbhVZhn4vWOVk0jKKgH/4KVhf3MZ66OLQ4W7AP0xByc1yddTaKmn5/adSEf3RBrHA+ GMKWyzVsw0kk/GR0rveF4ITqbFKALLQyQUzxUHj/F7ajc7nSquCdVtOazHagNyr/vMD5 cQ5vDBUx3yZBI8K7k6yiEjYZB0mccY7Ow9Auh466xeQBla/rCsrg+mNuGH2DCPpKI94I jN6sT2QzUULlLcdwTH39ak5R75q8ttV8hGfb/EvsxylIGM/PVlL88sAme6oIZig3l97P KrtTf/QIiY2ygnqQizz1qwuy2H8cp+EgPZuHx6169w0dlFVDdSxlSTTmzJPQJSMIXhU6 Eosw== 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 c11-v6si12824898pll.102.2018.05.03.05.13.45; Thu, 03 May 2018 05:14:00 -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 S1751593AbeECMNJ (ORCPT + 99 others); Thu, 3 May 2018 08:13:09 -0400 Received: from mga03.intel.com ([134.134.136.65]:48675 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750930AbeECMNI (ORCPT ); Thu, 3 May 2018 08:13:08 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 May 2018 05:13:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,358,1520924400"; d="scan'208";a="225491764" Received: from um.fi.intel.com (HELO um) ([10.237.72.212]) by fmsmga006.fm.intel.com with ESMTP; 03 May 2018 05:13:04 -0700 Received: from ash by um with local (Exim 4.90_1) (envelope-from ) id 1fED6b-0007Ys-VR; Thu, 03 May 2018 15:13:02 +0300 Date: Thu, 3 May 2018 15:13:01 +0300 From: Alexander Shishkin To: "Kang, Luwei" Cc: Alexander Shishkin , "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 Message-ID: <20180503121301.nlbm4cotbv26tc7l@um.fi.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82D7661F83C1A047AF7DC287873BF1E167F6DDCE@SHSMSX101.ccr.corp.intel.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 03, 2018 at 11:04:52AM +0000, Kang, Luwei wrote: > > > 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]? Thanks, -- Alex