All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zeng Tao <prime.zeng@hisilicon.com>
To: <kvm@vger.kernel.org>
Cc: <pbonzini@redhat.com>, <raspl@de.ibm.com>, <linuxarm@huawei.com>,
	Zeng Tao <prime.zeng@hisilicon.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH] tools/kvm_stat: fix out of date aarch64 kvm_exit reason definations
Date: Sat, 3 Apr 2021 17:17:31 +0800	[thread overview]
Message-ID: <1617441453-15560-1-git-send-email-prime.zeng@hisilicon.com> (raw)

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 <prime.zeng@hisilicon.com>
---
 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


             reply	other threads:[~2021-04-03  9:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-03  9:17 Zeng Tao [this message]
2021-04-05  8:14 ` [PATCH] tools/kvm_stat: fix out of date aarch64 kvm_exit reason definations Stefan Raspl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1617441453-15560-1-git-send-email-prime.zeng@hisilicon.com \
    --to=prime.zeng@hisilicon.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=pbonzini@redhat.com \
    --cc=raspl@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.