From patchwork Fri Jan 23 20:56:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Huang X-Patchwork-Id: 432299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 15E431402AE for ; Sat, 24 Jan 2015 07:59:52 +1100 (AEDT) Received: from localhost ([::1]:33109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YElKY-0006C5-8C for incoming@patchwork.ozlabs.org; Fri, 23 Jan 2015 15:59:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YElJv-0004rj-6A for qemu-devel@nongnu.org; Fri, 23 Jan 2015 15:59:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YElJp-0000iX-1s for qemu-devel@nongnu.org; Fri, 23 Jan 2015 15:59:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YElJo-0000iN-RV for qemu-devel@nongnu.org; Fri, 23 Jan 2015 15:59:04 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0NKx2uH002565 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jan 2015 15:59:02 -0500 Received: from apm-mustang-ev3-09.ml3.eng.bos.redhat.com (apm-mustang-ev3-09.ml3.eng.bos.redhat.com [10.19.176.141]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0NKwxNY007446; Fri, 23 Jan 2015 15:59:01 -0500 From: Wei Huang To: qemu-devel@nongnu.org Date: Fri, 23 Jan 2015 15:56:03 -0500 Message-Id: <1422046564-10270-4-git-send-email-wei@redhat.com> In-Reply-To: <1422046564-10270-1-git-send-email-wei@redhat.com> References: <1422046564-10270-1-git-send-email-wei@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, peter.maydell@linaro.org Subject: [Qemu-devel] [PATCH V3 3/4] kvm_stat: Add aarch64 support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch enables aarch64 support for kvm_stat. The platform detection is based on OS uname. Signed-off-by: Wei Huang --- scripts/kvm/kvm_stat | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat index cb23877..8f6f007 100755 --- a/scripts/kvm/kvm_stat +++ b/scripts/kvm/kvm_stat @@ -209,10 +209,18 @@ def ppc_init(): } }) +def aarch64_init(): + globals().update({ + 'sc_perf_evt_open' : 241 + }) + def detect_platform(): if os.uname()[4].startswith('ppc'): ppc_init() return + elif os.uname()[4].startswith('aarch64'): + aarch64_init() + return for line in file('/proc/cpuinfo').readlines(): if line.startswith('flags'):