From: Pu Wen <puwen@hygon.cn> To: <boris.ostrovsky@oracle.com>, <jgross@suse.com>, <bp@alien8.de>, <tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>, <x86@kernel.org> Cc: <linux-kernel@vger.kernel.org>, <xen-devel@lists.xenproject.org>, Pu Wen <puwen@hygon.cn> Subject: [RFC PATCH] x86/xen/pmu: Use MSRs C001_020X instead of the legacy MSRs for Hygon Date: Fri, 22 Mar 2019 18:43:39 +0800 [thread overview] Message-ID: <1553251419-7066-1-git-send-email-puwen@hygon.cn> (raw) The Hygon Dhyana processor supports MSRs C001_020X for the performance monitor counter(PMC). There are six core performance events counters for Dhyana but there are only four legacy PMC MSRs. So switching to use MSRs C001_020X(compatible with the F15H ones) for Xen vPMU infrastructure on Hygon platform. Signed-off-by: Pu Wen <puwen@hygon.cn> --- arch/x86/xen/pmu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/xen/pmu.c b/arch/x86/xen/pmu.c index e13b0b4..6480eed 100644 --- a/arch/x86/xen/pmu.c +++ b/arch/x86/xen/pmu.c @@ -92,11 +92,11 @@ static void xen_pmu_arch_init(void) break; } } else if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) { - amd_num_counters = F10H_NUM_COUNTERS; - amd_counters_base = MSR_K7_PERFCTR0; - amd_ctrls_base = MSR_K7_EVNTSEL0; - amd_msr_step = 1; - k7_counters_mirrored = 0; + amd_num_counters = F15H_NUM_COUNTERS; + amd_counters_base = MSR_F15H_PERF_CTR; + amd_ctrls_base = MSR_F15H_PERF_CTL; + amd_msr_step = 2; + k7_counters_mirrored = 1; } else { uint32_t eax, ebx, ecx, edx; -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Pu Wen <puwen@hygon.cn> To: boris.ostrovsky@oracle.com, jgross@suse.com, bp@alien8.de, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Pu Wen <puwen@hygon.cn> Subject: [RFC PATCH] x86/xen/pmu: Use MSRs C001_020X instead of the legacy MSRs for Hygon Date: Fri, 22 Mar 2019 18:43:39 +0800 [thread overview] Message-ID: <1553251419-7066-1-git-send-email-puwen@hygon.cn> (raw) The Hygon Dhyana processor supports MSRs C001_020X for the performance monitor counter(PMC). There are six core performance events counters for Dhyana but there are only four legacy PMC MSRs. So switching to use MSRs C001_020X(compatible with the F15H ones) for Xen vPMU infrastructure on Hygon platform. Signed-off-by: Pu Wen <puwen@hygon.cn> --- arch/x86/xen/pmu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/xen/pmu.c b/arch/x86/xen/pmu.c index e13b0b4..6480eed 100644 --- a/arch/x86/xen/pmu.c +++ b/arch/x86/xen/pmu.c @@ -92,11 +92,11 @@ static void xen_pmu_arch_init(void) break; } } else if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) { - amd_num_counters = F10H_NUM_COUNTERS; - amd_counters_base = MSR_K7_PERFCTR0; - amd_ctrls_base = MSR_K7_EVNTSEL0; - amd_msr_step = 1; - k7_counters_mirrored = 0; + amd_num_counters = F15H_NUM_COUNTERS; + amd_counters_base = MSR_F15H_PERF_CTR; + amd_ctrls_base = MSR_F15H_PERF_CTL; + amd_msr_step = 2; + k7_counters_mirrored = 1; } else { uint32_t eax, ebx, ecx, edx; -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2019-03-22 11:14 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-22 10:43 Pu Wen [this message] 2019-03-22 10:43 ` [RFC PATCH] x86/xen/pmu: Use MSRs C001_020X instead of the legacy MSRs for Hygon Pu Wen
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=1553251419-7066-1-git-send-email-puwen@hygon.cn \ --to=puwen@hygon.cn \ --cc=boris.ostrovsky@oracle.com \ --cc=bp@alien8.de \ --cc=hpa@zytor.com \ --cc=jgross@suse.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@redhat.com \ --cc=tglx@linutronix.de \ --cc=x86@kernel.org \ --cc=xen-devel@lists.xenproject.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.