Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756009AbcJPNvs (ORCPT ); Sun, 16 Oct 2016 09:51:48 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:39179 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753318AbcJPNvj (ORCPT ); Sun, 16 Oct 2016 09:51:39 -0400 Date: Sun, 16 Oct 2016 15:50:39 +0200 From: Peter Zijlstra To: Imre Palik Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andi Kleen , Stephane Eranian , Kan Liang , David Carrillo-Cisneros , linux-kernel@vger.kernel.org, Alexander Kozyrev , Artyom Kuanbekov , Imre Palik , Matt Wilson Subject: Re: [RFC PATCH] perf: honouring the cpuid for number of fixed counters in hypervisors Message-ID: <20161016135039.GK3142@twins.programming.kicks-ass.net> References: <1476347289-6261-1-git-send-email-imrep.amz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476347289-6261-1-git-send-email-imrep.amz@gmail.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 255 Lines: 8 On Thu, Oct 13, 2016 at 01:28:09AM -0700, Imre Palik wrote: > + if (version > 1) { > + unsigned int ecx = cpuid_ecx(1); > + > + if (ecx >> 31) What is this magic, undocumented gunk doing? Is that supposed to be static_cpu_has(X86_FEATURE_HYPERVISOR) ?