From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH V1 0/4] KVM vPMU support for x86 Date: Mon, 3 Nov 2014 19:39:51 +0100 Message-ID: <20141103183951.GB2009@potion.brq.redhat.com> References: <1414771534-29411-1-git-send-email-wei@redhat.com> <20141103175630.GA2009@potion.brq.redhat.com> <5457C83F.3050106@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, pbonzini@redhat.com, gleb@kernel.org To: Wei Huang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60858 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752610AbaKCSj5 (ORCPT ); Mon, 3 Nov 2014 13:39:57 -0500 Content-Disposition: inline In-Reply-To: <5457C83F.3050106@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 2014-11-03 12:23-0600, Wei Huang: >=20 >=20 > On 11/03/2014 11:56 AM, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > > 2014-10-31 12:05-0400, Wei Huang: > >> Currently KVM only supports vPMU for Intel platforms. This patch s= et=20 > >> enable vPMU support for AMD platform by creating a common PMU > >> interface for x86. The PMU calls from guest VMs are dispatched > >> to corresponding functions defined in arch specific files. > >=20 > > The functionality looks good, so I just want verify the basic desig= n: > > why don't we emulate AMD PMU on Intel, and vice versa? > > (Underlying PERF_COUNTs are identical in both.) >=20 > Thanks. The underlining perf counters can be very different between A= MD > and Intel. I think we can emulate AMD on Intel, or vice versa, for so= me > common perfmon_events (such as PERF_COUNT_HW_CPU_CYCLES). But as soon= as > guest VMs access raw counters (see PERF_TYPE_RAW), we can't emulate t= hem > anymore. Thanks, I guess raw counters are used more than I thought, so code complexity would overshadow the gain of having at least something. And then, there is the always perfect, "who cares" :)