Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1848723pxf; Sat, 3 Apr 2021 02:23:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnUGCo/f8odI7fYMMnl387A/RZi2q66Hdl5nvT58bDU5eLoXdi2noIVlsO6s1JHqimFy/m X-Received: by 2002:a17:906:cb0a:: with SMTP id lk10mr17731489ejb.479.1617441798369; Sat, 03 Apr 2021 02:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617441798; cv=none; d=google.com; s=arc-20160816; b=jme4Q+cYNA8bjSrbSlcgTp2hNk63SWTdOjWj23b6xCEesqQ8VUrIlM2p2k2spL3Y0y hxYrl1YmxB0NOm44cUU31wtyKoZO7ycs3rZ6e5IBjGoWKzMNWvJxBreImXAAyz/JBGu0 itOIHT0/Ffl7uhv+I3DMXTAYL9dmYF4W4S9+ZrQMpWpCMthbZG8+W5O82yTeNt8UMne1 ZlWX0SgJIALWOVkBBUh8DlmG5kGLCZFc227egujFnGzAC7ZIcJA/U+J0r+zODo1HJh8w hjwChlHcDbqaPpz/DG8iLANyMtH7TfHKS51bc280VA2c+26T5vmzadkj1J2FQ75CL3an Xesw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=3yAmSBenCvXl3oNH2I/Inz2kjSiBE5A2+yE7ftmyKyw=; b=wLIPHTKiAUotfXgcmSQIdL4K5yYpiUk7tLAaiXsXre1w1nCt1QUwvGmDNQE1/U/T0V XKuNX57e7C0iNDP+CgRsgQPloWOsJcUkZ5Ab3dmjjTcSR6qWQQ3jD8Qh7eR0jnDRVVRW lo7BFYgMllOnbicEoCofllJSqNn1jT7LH51EqrxWFPOAR1VuVw8ggFqvjTZ8FQPpuVfu AxOHZEv1guf57DM+HVdA6Tm8/eBVuE4IL63thSNrYoPKvIlhnsoZx+GmhFK9NFALObQK rsFPANx2eAonSee3Mblsj7l0b0oe2nxaYFwQ2HS2Eravq371qkpG6BEzkcqEtTXQDFF5 +tHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hisilicon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc11si7979836edb.17.2021.04.03.02.22.54; Sat, 03 Apr 2021 02:23:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236615AbhDCJUc (ORCPT + 99 others); Sat, 3 Apr 2021 05:20:32 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15537 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236587AbhDCJUZ (ORCPT ); Sat, 3 Apr 2021 05:20:25 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FCBCQ5t5kzNrcc; Sat, 3 Apr 2021 17:17:38 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Sat, 3 Apr 2021 17:20:11 +0800 From: Zeng Tao To: CC: , , , Zeng Tao , Subject: [PATCH] tools/kvm_stat: fix out of date aarch64 kvm_exit reason definations Date: Sat, 3 Apr 2021 17:17:31 +0800 Message-ID: <1617441453-15560-1-git-send-email-prime.zeng@hisilicon.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Aarch64 kvm exit reason defination is out of date for some time, so in this patch: 1. Sync some newly introduced or missing EC definations. 2. Change the WFI to WFx. 3. Fix the comment. Not all the definations are used or usable for aarch64 kvm, but it's better to keep align across the whole kernel. Signed-off-by: Zeng Tao --- tools/kvm/kvm_stat/kvm_stat | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat index b0bf56c..63d87fd 100755 --- a/tools/kvm/kvm_stat/kvm_stat +++ b/tools/kvm/kvm_stat/kvm_stat @@ -154,17 +154,19 @@ SVM_EXIT_REASONS = { 'NPF': 0x400, } -# EC definition of HSR (from arch/arm64/include/asm/kvm_arm.h) +# EC definition of HSR (from arch/arm64/include/asm/esr.h) AARCH64_EXIT_REASONS = { 'UNKNOWN': 0x00, - 'WFI': 0x01, + 'WFx': 0x01, 'CP15_32': 0x03, 'CP15_64': 0x04, 'CP14_MR': 0x05, 'CP14_LS': 0x06, 'FP_ASIMD': 0x07, 'CP10_ID': 0x08, + 'PAC': 0x09, 'CP14_64': 0x0C, + 'BTI': 0x0D, 'ILL_ISS': 0x0E, 'SVC32': 0x11, 'HVC32': 0x12, @@ -173,6 +175,10 @@ AARCH64_EXIT_REASONS = { 'HVC64': 0x16, 'SMC64': 0x17, 'SYS64': 0x18, + 'SVE': 0x19, + 'ERET': 0x1a, + 'FPAC': 0x1c, + 'IMP_DEF': 0x1f, 'IABT': 0x20, 'IABT_HYP': 0x21, 'PC_ALIGN': 0x22, -- 2.8.1