Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2724947imj; Mon, 11 Feb 2019 07:33:14 -0800 (PST) X-Google-Smtp-Source: AHgI3IY3fBI7R2ZwNWJRtIyL+F+B733tBlYtdTuxzjl2+WDB0+faXfRPnFAK4BSQLT4UWqyLTkZ0 X-Received: by 2002:a17:902:6b8a:: with SMTP id p10mr20909952plk.109.1549899194142; Mon, 11 Feb 2019 07:33:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549899194; cv=none; d=google.com; s=arc-20160816; b=oQNwjlwf6Nmq2xYezqZVOkjyOedTdGwNzPWVzKI+a1pktoOpTkU/0HspGN0zumyLFT BqqzdOLqh0uNLSAgsNT1JB8xsFH/fl57CAgxi6/BNah0r6LiY6BFacloPFvM1DI+SqEf cKvbDZzAj9EiJ8pVur9FOT3mCYjQl8h+KxsoAnWhbOGajbZX+HfkzvZ2zcFNp4Zr1LKZ n/sMYqZ2brENP3XQsGSqlkGHA54DwdasgujllXZ2YRbWovhRSw0FIOItbh/kjosB1c8q Vd9ngGDZZCs9j+579g0i02ukGGGSSj1QHhslpc9bJsaAUtMXkT3ty/+3tsVCzFyjbJlV Nmsg== 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=OCTKsd675v6ms+J/ycHF9CZJ0KkqCZ/xqfXtaM8AjYQ=; b=oGHEw2z2yKdLO2aKyr6hTjqhtMl+PbhQOMnFWEJMoXrg0AWfnWhJzPK5ThS9Pr+vVx YTgGFJjEPOTtGu90XRkbgSAKIE8TFDK9RL/YqG8L5cIiq6Oi0/vt+J2uT70Ytdf3MfiX HRfU7QNHtD+o7g4maM2HvwBTUzLDILiG3viM58M3WhUBjmhIgygEHgMCRWqRwj6PLC2S Re09k+LIw74zl22f7HCeAu0Llv7cQ0xnsprW9Pg+NkK1/9vBTGWiDj/S52iAFxggxWzi wZFcjM1SDdd/CycStIM0j7gDuPVFY4LtS34J941tLHDDxA+qVZma5qZYWqmbljOGpHOf +JMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vRAqQ9bD; 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 s7si9927348plq.237.2019.02.11.07.32.58; Mon, 11 Feb 2019 07:33:14 -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=vRAqQ9bD; 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 S1730698AbfBKPcD (ORCPT + 99 others); Mon, 11 Feb 2019 10:32:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:42286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729729AbfBKOzR (ORCPT ); Mon, 11 Feb 2019 09:55:17 -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 7D7B4222A1; Mon, 11 Feb 2019 14:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549896917; bh=C7Z2sT1/AeZldiG+9QHlhhUOiukh4QjYG/lNwpCmdcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vRAqQ9bDNIgnSiAl7EwbrUPSE4V6YCbmTMO784lE8Qiw8ONugOvZ0u1bdxG0IRN1n s/Myvakaqd7Tl/sngeSWpTREu1TSmUrBtj/4iKxTFzuEBFpCTPopWqtED+VK0VM+Is eRBMV9TLyO14Em7NabftAd4sEZBjXDOvk4B1SLQc= 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.14 031/205] perf tools: Add Hygon Dhyana support Date: Mon, 11 Feb 2019 15:17:09 +0100 Message-Id: <20190211141829.783359132@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@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.14-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