Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp654096ybx; Wed, 30 Oct 2019 02:55:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxu+T9WNwvGrhYNGJs+XerwCL7HpdyBxOGHVhofbUylrtasEWWau+eVXsHrI9F8GM24Krp/ X-Received: by 2002:a17:906:6d82:: with SMTP id h2mr7942598ejt.127.1572429359661; Wed, 30 Oct 2019 02:55:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572429359; cv=none; d=google.com; s=arc-20160816; b=ubp2Q8CEP1ZaBLNKgZIs6s+cvzUaSimL23EAvItWjl/Ox47f6srYYTx43oPXAccQvI BG1AOC2zBZQu7LAbcJHIHNuJdVJvJk3bJuvCrHrkrrL3L9WOzpIr+uLpW0T+GeJAagVM mP7543X2fplNNr7QSHH5Fj9s+K2VZ1rGrcdyQo0WuGzPU6fzXplRY2Ru1Lm43Gesxlo6 dVhTRkwv8h45sN8K0YKK5LwN4aEO++y5lAeuuzYuPhzjcob/Uj3bhglG4kPEQ3oCsSy5 7vzjn8iwLNLZU6+yYCYNWxDRWOVixb1BbK/FvzM/6WLiiysuD2wc0e+9dNMc6FLCq/6l BjRg== 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:dkim-signature; bh=hZscaMFd68WRefJPnNBfniqTe1cBPy4JDMz4CwY8NGY=; b=kVVPmJzc2RTPGUQth314E1vs6mOSVZ8Cop6Vpl8k4BlHLv9IwnuCTJGc1BDFbg2G8v RuwuJ4rAUS36Y5B8zblQ9g1Ya6sRxqusfD03YRDgttoVPekaA75nquCdgiXKqJBMWDND WUS+luQ7Qv1d+qkbv++R44Q3+RjF9sXNcEYDtM0q7BikD1JMH4vhMml/IkFbtqNOyT51 HiDgVMlkSztEhZQ4/deXbBJfIfZooz2cBn/xopWElZ01Nizm95BZ43EmULHbflVH29qB 47XaXY2aHJoOciPSnnvTuDXMjQ+yRTMqJIR5Cf/CPmQpQ/xcMiIsY4y+J02jHwlsX2mo wgUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=DUWupKwP; 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 j11si906040ejv.211.2019.10.30.02.55.35; Wed, 30 Oct 2019 02:55:59 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=DUWupKwP; 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 S1726413AbfJ3Jwg (ORCPT + 99 others); Wed, 30 Oct 2019 05:52:36 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49528 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfJ3Jwf (ORCPT ); Wed, 30 Oct 2019 05:52:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hZscaMFd68WRefJPnNBfniqTe1cBPy4JDMz4CwY8NGY=; b=DUWupKwPEmaunrC1ogUx+eZHy l2XFgEOn5TTw5Wuvnxoi64xvV6W5/nP/wVHeCUP39qG1J+2z36HELIAkOYU6IlCQPQslBP8NhnnU3 5RENZlhc/mJznfvOhFk3eTwK2Q6SI0nUxKDzqfdfs807tYZztCxRL/NjRsCwKjpTTcq0caJGj/2tZ nQl7kbtAukhAfttOROrGSr4LHf0WbOSOmrPeh1DuVS95pH0c5nSRaS87JSjS/fynG12/WzUV8VKeW DgyHRzE/LMTM71Y6qAqnCfmgv4ltTqRzVA3dNlIFoOZJ6c0mZYBKjNl/ade2P5bOH+uC8qfGRPv/k efNOfvTCg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iPkeF-00072R-TD; Wed, 30 Oct 2019 09:52:16 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8475B300596; Wed, 30 Oct 2019 10:51:13 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A5EB52B4574F3; Wed, 30 Oct 2019 10:52:14 +0100 (CET) Date: Wed, 30 Oct 2019 10:52:14 +0100 From: Peter Zijlstra To: "Kang, Luwei" Cc: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "pbonzini@redhat.com" , "rkrcmar@redhat.com" , "Christopherson, Sean J" , "vkuznets@redhat.com" , "wanpengli@tencent.com" , "jmattson@google.com" , "joro@8bytes.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "hpa@zytor.com" , "x86@kernel.org" , "ak@linux.intel.com" , "thomas.lendacky@amd.com" , "acme@kernel.org" , "mark.rutland@arm.com" , "alexander.shishkin@linux.intel.com" , "jolsa@redhat.com" , "namhyung@kernel.org" Subject: Re: [PATCH v1 7/8] KVM: x86: Expose PEBS feature to guest Message-ID: <20191030095214.GT4097@hirez.programming.kicks-ass.net> References: <1572217877-26484-1-git-send-email-luwei.kang@intel.com> <1572217877-26484-8-git-send-email-luwei.kang@intel.com> <20191029150531.GN4097@hirez.programming.kicks-ass.net> <82D7661F83C1A047AF7DC287873BF1E173835B45@SHSMSX104.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82D7661F83C1A047AF7DC287873BF1E173835B45@SHSMSX104.ccr.corp.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 30, 2019 at 04:07:03AM +0000, Kang, Luwei wrote: > > > Expose PEBS feature to guest by IA32_MISC_ENABLE[bit12]. > > > IA32_MISC_ENABLE[bit12] is Processor Event Based Sampling (PEBS) > > > Unavailable (RO) flag: > > > 1 = PEBS is not supported; 0 = PEBS is supported. > > > > Why does it make sense to expose this on SVM? > > Thanks for the review. This patch won't expose the pebs feature to SVM and return not supported. AFAICT it exposes/emulates an Intel MSR on AMD, which is just weird.