Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2648777imj; Mon, 11 Feb 2019 06:27:12 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia8ctrOz2rmGcEHJW82j6WlrwT9jONNeDxnjJ+3NlK3qBc/Ff5XMpcNt1HNRtOaIkIZHbrL X-Received: by 2002:a17:902:6b03:: with SMTP id o3mr19288492plk.126.1549895232299; Mon, 11 Feb 2019 06:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895232; cv=none; d=google.com; s=arc-20160816; b=RUAzxW473spXrun9CI7luzcoUNL8GpVXZbax7HbSXOyW5HfUPOBGq1Bkxg70HXFeNe Un1g5U8/oX16jQzp0HB4+neAbyd+6AZ+iQih9PxziYGAtJWFsLK3ShwiSjyu7RCZaDUo +EFTkvuGPaY5EGL682C1ixevVhf7aG9gdbuxLEIEtLdLl1thCtGNRqKn9pZx0Fn4fjPR wV4WRcuDiIY2W4nlA1XtbdF1eJ2luh9UleagfCueGUcVa9vawdap9jjiP3Oo6hMNScwv FjWDiP2eS0zwVhMi0q16EtvLm0pjQVKO1ZYnewfDg4O7noB2j11PN+PPrnymn5egnJrj FXEw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MUOsHAt6BBlnLMBZyUaPiM1VDu9PXy5wukClmXwwnyg=; b=izwHI2wl+2qe9rsxbOUJd6QmyU0NEyMIGxbWIzE9HI+JLvrTr/fgCxVJch0LfCQNcW Rt/mWdMWB9YdfGd+JYKEtMLSmVoPmE2K2p+sMgH11xExxZ/KiRW1i8qRdAyxqehjk5So F+puF9ho1bxGOtXvItzSG4nGeglz0LPdtW+KQx4P+miahpYJm+sMklAl6O9Y5qDvyXIT ytZMJbNy1w1ULGwoqIq/A0ooQDO9lO5eWi1OSBoagdl4of1XCOI9F1lJcXgwsCSKXnkj aCRnWLiLsYyB4k/20vKp9A/MG/nbthoeF5svuuRSvu/1SnFH2gYUtOJq0ktH3gTq96tJ Qxxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eVtHPJ4u; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si10608080plm.63.2019.02.11.06.26.56; Mon, 11 Feb 2019 06:27:12 -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=eVtHPJ4u; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728947AbfBKOXL (ORCPT + 99 others); Mon, 11 Feb 2019 09:23:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:56126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728933AbfBKOXH (ORCPT ); Mon, 11 Feb 2019 09:23:07 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8DCBD20838; Mon, 11 Feb 2019 14:23:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549894987; bh=C7+PgRpDVrFqtjyM8f8OR/Le69hz4IOdtss2CR0Q9dc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eVtHPJ4ul/OLUKjY64al0rYKevMtTkX8ucMmtBKqoAJxe79XgOQt1T54t+efg+DZe EfjNCUwC5yyPGYjuw5A+mnQapRhF+AOAi8njJCErNIuhd1GFxFBYhLXxfPgOx3wJ48 y8bxYf8+esUVhcsT0MU4Lir+uBAjZ7HOn1/QnwCA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pu Wen , Borislav Petkov , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Peter Zijlstra , Thomas Gleixner , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.20 054/352] perf tools: Add Hygon Dhyana support Date: Mon, 11 Feb 2019 15:14:41 +0100 Message-Id: <20190211141849.635896182@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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