From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] perf/x86: Fix HO/GO counting with SVM disabled Date: Tue, 28 Feb 2012 19:24:38 +0200 Message-ID: <4F4D0DD6.9030302@redhat.com> References: <20120227182325.GA12302@8bytes.org> <1330444544-15665-1-git-send-email-joerg.roedel@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, joro@8bytes.org, Peter Zijlstra , Ingo Molnar , Stephane Eranian , David Ahern , Gleb Natapov , Robert Richter To: Joerg Roedel Return-path: In-Reply-To: <1330444544-15665-1-git-send-email-joerg.roedel@amd.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 02/28/2012 05:55 PM, Joerg Roedel wrote: > > __init int amd_pmu_init(void) > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > index 5fa553b..773fee2 100644 > --- a/arch/x86/kvm/svm.c > +++ b/arch/x86/kvm/svm.c > @@ -29,6 +29,7 @@ > #include > #include > > +#include > #include > #include > #include > @@ -575,6 +576,8 @@ static void svm_hardware_disable(void *garbage) > wrmsrl(MSR_AMD64_TSC_RATIO, TSC_RATIO_DEFAULT); > > cpu_svm_disable(); > + > + x86_pmu_disable_virt(); > } > > static int svm_hardware_enable(void *garbage) > @@ -622,6 +625,8 @@ static int svm_hardware_enable(void *garbage) > > svm_init_erratum_383(); > > + x86_pmu_enable_virt(); > + > return 0; > } > These should go into x86.c. If the functions later gain meaning on Intel, we want them to be called (and nothing in the name suggests they're AMD specific). -- error compiling committee.c: too many arguments to function