Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751404AbaGCE05 (ORCPT ); Thu, 3 Jul 2014 00:26:57 -0400 Received: from mga11.intel.com ([192.55.52.93]:37282 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbaGCE0z (ORCPT ); Thu, 3 Jul 2014 00:26:55 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,592,1400050800"; d="scan'208";a="564515179" From: "Liang, Kan" To: Jidong Xiao CC: Peter Zijlstra , Kernel development list , KVM , "andi@firstfloor.org" , Andi Kleen Subject: RE: [PATCH V2 1/3] perf ignore LBR and offcore_rsp. Thread-Topic: [PATCH V2 1/3] perf ignore LBR and offcore_rsp. Thread-Index: AQHPlmMa2+E29q6Tk0SWaq86jnLk6JuNGj0AgACZg9A= Date: Thu, 3 Jul 2014 04:26:51 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077014BDCCD@SHSMSX103.ccr.corp.intel.com> References: <1404324855-15166-1-git-send-email-kan.liang@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id s634R1LE004634 > > On Wed, Jul 2, 2014 at 2:14 PM, wrote: > > From: Kan Liang > > > > x86, perf: Protect LBR and offcore rsp against KVM lying > > > > With -cpu host, KVM reports LBR and offcore support, if the host has > support. > > When the guest perf driver tries to access LBR or offcore_rsp MSR, it > > #GPs all MSR accesses,since KVM doesn't handle LBR and offcore support. > > So check the related MSRs access right once at initialization time to avoid > the error access at runtime. > > > > For reproducing the issue, please build the kernel with > CONFIG_KVM_INTEL = y. > This is for host kernel, > > And CONFIG_PARAVIRT = n and CONFIG_KVM_GUEST = n. > And this is for guest kernel, right? > Right. > -Jidong ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?