Commit 3ad74a75 authored by Pu Wen's avatar Pu Wen Committed by Greg Kroah-Hartman

perf tools: Add Hygon Dhyana support

[ Upstream commit 4787eff3 ]

The tool perf is useful for the performance analysis on the Hygon Dhyana
platform. But right now there is no Hygon support for it to analyze the
KVM guest os data. So add Hygon Dhyana support to it by checking vendor
string to share the code path of AMD.
Signed-off-by: default avatarPu Wen <puwen@hygon.cn>
Acked-by: default avatarBorislav Petkov <bp@suse.de>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1542008451-31735-1-git-send-email-puwen@hygon.cnSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 20a7ded0
...@@ -156,7 +156,7 @@ int cpu_isa_init(struct perf_kvm_stat *kvm, const char *cpuid) ...@@ -156,7 +156,7 @@ int cpu_isa_init(struct perf_kvm_stat *kvm, const char *cpuid)
if (strstr(cpuid, "Intel")) { if (strstr(cpuid, "Intel")) {
kvm->exit_reasons = vmx_exit_reasons; kvm->exit_reasons = vmx_exit_reasons;
kvm->exit_reasons_isa = "VMX"; kvm->exit_reasons_isa = "VMX";
} else if (strstr(cpuid, "AMD")) { } else if (strstr(cpuid, "AMD") || strstr(cpuid, "Hygon")) {
kvm->exit_reasons = svm_exit_reasons; kvm->exit_reasons = svm_exit_reasons;
kvm->exit_reasons_isa = "SVM"; kvm->exit_reasons_isa = "SVM";
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment