From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH V1 0/4] KVM vPMU support for x86 Date: Mon, 3 Nov 2014 18:56:31 +0100 Message-ID: <20141103175630.GA2009@potion.brq.redhat.com> References: <1414771534-29411-1-git-send-email-wei@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]:43679 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753642AbaKCR4g (ORCPT ); Mon, 3 Nov 2014 12:56:36 -0500 Content-Disposition: inline In-Reply-To: <1414771534-29411-1-git-send-email-wei@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 2014-10-31 12:05-0400, Wei Huang: > Currently KVM only supports vPMU for Intel platforms. This patch set=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. The functionality looks good, so I just want verify the basic design: why don't we emulate AMD PMU on Intel, and vice versa? (Underlying PERF_COUNTs are identical in both.) > V1: > * Adopt the file layout suggested by Radim Kr=C4=8Dm=C3=A1=C5=99 (I'll still advocate for more separation, sorry.) > * Link arch module with its specific PMU file >=20 > RFC: > * Initial version for RFC >=20 > Wei Huang (4): > KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch > KVM: x86/vPMU: Convert pmu.c code into Intel specific code > KVM: x86/vPMU: Implement AMD PMU support for KVM > KVM: x86/vPMU: Enable PMU handling for AMD PERFCTRn and EVNTSELn MS= Rs >=20 > arch/x86/include/asm/kvm_host.h | 52 ++-- > arch/x86/kvm/Makefile | 6 +- > arch/x86/kvm/cpuid.c | 2 +- > arch/x86/kvm/lapic.c | 1 + > arch/x86/kvm/pmu.c | 576 ------------------------------= --------- > arch/x86/kvm/pmu_amd.c | 390 ++++++++++++++++++++++++++ > arch/x86/kvm/pmu_intel.c | 586 ++++++++++++++++++++++++++++++= ++++++++++ > arch/x86/kvm/svm.c | 7 + > arch/x86/kvm/vmx.c | 7 + > arch/x86/kvm/x86.c | 74 ++--- > 10 files changed, 1070 insertions(+), 631 deletions(-) > delete mode 100644 arch/x86/kvm/pmu.c > create mode 100644 arch/x86/kvm/pmu_amd.c > create mode 100644 arch/x86/kvm/pmu_intel.c >=20 > --=20 > 1.8.3.1 >=20