Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3709201imu; Mon, 28 Jan 2019 09:24:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN4UScM8Er54EXrlOvSNINeSTzR/EA9MeNa/QLp6R6BStDd+MCSqVBqpgrzlTgZPGg06FR8z X-Received: by 2002:a17:902:e085:: with SMTP id cb5mr22329715plb.24.1548696277557; Mon, 28 Jan 2019 09:24:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696277; cv=none; d=google.com; s=arc-20160816; b=DD65qwfeRxu0RXsM21QdSdMY9g/K87kLO8h5jNXnmbHzcwO+vfdl9dHzfCue9PKBV3 OCTS6VRR+U2Lu52Sm6/EGjD12nx3aRLh/2cCV2gB7knCGUb5NvBhY5hbzLcLU4UoUV6J 49suKfNx+cpCoV792nWJGHZtsEhDKPEjf4kCDLLRPhM0cyQJxt8BPYYWicp1q+ZIF4WU usKTv50GA3LjjS62hQ0TnXKjUhtgW6qfutJMOKNdyRj+64Him373P0UqnVNtxPyD2xde BKTswpoWBX1Eq1ZVVo4QgLk6G0qkXoeWcDzJg9o1MfLU63ArS5eGuY0snpSxurNd3L5t MNmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=K5PFXzDcHFqJsiLa8KBtOsYF7ydJr6YcErJDkgvkfb0=; b=QRqYpv/9Kk6QZO8sq/1nmNSJhkp+fUvtCWqhfA5jccVw7Kg+T5PSup/qZWUHqxGwrK rp5jBinYpK2kAEnhNZgeM5Tl9EVtIfuDhRqFvcYqJnPY2AGB0yrehF7DFjAnMIwZgDBV Z6oLNcwfSWq/2KC+nMlKJEfZx+OdjnsvuEL7qNA/1RWukkyacTc1FubdtSQszn8agg+M K4/VjGlhNphwkV0AH69DTZ2AxaYghdAMT/K3zESiHrxbXv+mukurLVgWURfk9ukFSaqK TXYeDvDyp2zlmSu4Hw9nqvLJAGTOxXeOfSxJ5ugI18M5fkWXzk6TdZ7XDxkD0I0NXvzk dfCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mbXtrHgF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si21953911pgo.595.2019.01.28.09.24.22; Mon, 28 Jan 2019 09:24:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mbXtrHgF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731114AbfA1QBs (ORCPT + 99 others); Mon, 28 Jan 2019 11:01:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:47022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729271AbfA1QBr (ORCPT ); Mon, 28 Jan 2019 11:01:47 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8A76921848; Mon, 28 Jan 2019 16:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691306; bh=NpBzhb76FkwGomBDiLGlWepY8ZCWLmsM6eCJLDiXKvk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mbXtrHgFZ4vC9x01JWu4eeExAXYyPxRgRuuLXa2Dxd1rItqrif7DJSN+OtgLvJv6K BT5c2EMjIy1I/Vye5NrrJjJWrCG9UFHQ+wf77rqDhtPreRjcQ44jrvjIq8HuXdmJpW h2N6T3zHDqsYfrq3VkbliKISPVbJP6dimKgqiu/Y= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Pu Wen , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Peter Zijlstra , Thomas Gleixner , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH AUTOSEL 4.19 053/258] perf tools: Add Hygon Dhyana support Date: Mon, 28 Jan 2019 10:55:59 -0500 Message-Id: <20190128155924.51521-53-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pu Wen [ Upstream commit 4787eff3fa88f62fede6ed7afa06477ae6bf984d ] 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: Pu Wen Acked-by: Borislav Petkov Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1542008451-31735-1-git-send-email-puwen@hygon.cn Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/arch/x86/util/kvm-stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/arch/x86/util/kvm-stat.c b/tools/perf/arch/x86/util/kvm-stat.c index b32409a0e546..081353d7b095 100644 --- a/tools/perf/arch/x86/util/kvm-stat.c +++ b/tools/perf/arch/x86/util/kvm-stat.c @@ -156,7 +156,7 @@ int cpu_isa_init(struct perf_kvm_stat *kvm, const char *cpuid) if (strstr(cpuid, "Intel")) { kvm->exit_reasons = vmx_exit_reasons; 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_isa = "SVM"; } else -- 2.19.1