* [PATCH] tools/kvm_stat: fix out of date aarch64 kvm_exit reason definations
@ 2021-04-03 9:17 Zeng Tao
2021-04-05 8:14 ` Stefan Raspl
0 siblings, 1 reply; 2+ messages in thread
From: Zeng Tao @ 2021-04-03 9:17 UTC (permalink / raw)
To: kvm; +Cc: pbonzini, raspl, linuxarm, Zeng Tao, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tools/kvm_stat: fix out of date aarch64 kvm_exit reason definations
2021-04-03 9:17 [PATCH] tools/kvm_stat: fix out of date aarch64 kvm_exit reason definations Zeng Tao
@ 2021-04-05 8:14 ` Stefan Raspl
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Raspl @ 2021-04-05 8:14 UTC (permalink / raw)
To: Zeng Tao, kvm; +Cc: pbonzini, raspl, linuxarm, linux-kernel
On 4/3/21 11:17 AM, Zeng Tao wrote:
> 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,
>
Reviewed-by: Stefan Raspl <raspl@linux.ibm.com>
--
Mit freundlichen Grüßen / Kind regards
Stefan Raspl
Linux on Z
-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland
Schoenaicher Str. 220
71032 Boeblingen
Phone: +49-7031-16-2177
E-Mail: stefan.raspl@de.ibm.com
-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH / Vorsitzender des Aufsichtsrats:
Gregor Pillen
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB
243294
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-05 8:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-03 9:17 [PATCH] tools/kvm_stat: fix out of date aarch64 kvm_exit reason definations Zeng Tao
2021-04-05 8:14 ` Stefan Raspl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).