From: David Ahern <dsahern@gmail.com>
To: Avi Kivity <avi@redhat.com>, Joerg Roedel <joerg.roedel@amd.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
joro@8bytes.org, Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@elte.hu>,
Stephane Eranian <eranian@google.com>,
Gleb Natapov <gleb@redhat.com>,
Robert Richter <robert.richter@amd.com>
Subject: Re: [PATCH] perf/x86: Fix HO/GO counting with SVM disabled
Date: Tue, 28 Feb 2012 10:36:41 -0700 [thread overview]
Message-ID: <4F4D10A9.5010707@gmail.com> (raw)
In-Reply-To: <4F4D0DD6.9030302@redhat.com>
On 2/28/12 10:24 AM, Avi Kivity wrote:
> 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<linux/ftrace_event.h>
>> #include<linux/slab.h>
>>
>> +#include<asm/perf_event.h>
>> #include<asm/tlbflush.h>
>> #include<asm/desc.h>
>> #include<asm/kvm_para.h>
>> @@ -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).
>
I was to suggest the reverse: since this patch addesses an AMD bug, why
not push those functions into perf_event_amd.c and make them dependent
on CONFIG_CPU_SUP_AMD as well.
David
next prev parent reply other threads:[~2012-02-28 17:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120227182325.GA12302@8bytes.org>
2012-02-28 15:55 ` [PATCH] perf/x86: Fix HO/GO counting with SVM disabled Joerg Roedel
2012-02-28 17:24 ` Avi Kivity
2012-02-28 17:36 ` David Ahern [this message]
2012-02-28 17:38 ` Avi Kivity
2012-02-29 13:24 ` Joerg Roedel
2012-02-29 13:57 ` [PATCH v2] " Joerg Roedel
2012-02-29 17:00 ` Avi Kivity
2012-02-29 17:03 ` Gleb Natapov
2012-02-29 17:05 ` Joerg Roedel
2012-02-29 17:08 ` Avi Kivity
2012-02-29 17:24 ` Peter Zijlstra
2012-02-29 17:44 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F4D10A9.5010707@gmail.com \
--to=dsahern@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=avi@redhat.com \
--cc=eranian@google.com \
--cc=gleb@redhat.com \
--cc=joerg.roedel@amd.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=robert.richter@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).