Skip to content

[PW_SID:958351] RISC-V KVM selftests improvements#357

Closed
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw958351
Closed

[PW_SID:958351] RISC-V KVM selftests improvements#357
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw958351

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 958351 applied to workflow__riscv__fixes

Name: RISC-V KVM selftests improvements
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=958351
Version: 2

The current exeception register structure in selftests are missing
few registers (e.g stval). Instead of adding it manually, change
the ex_regs to align with pt_regs to make it future proof.

Suggested-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Currently, the sbi_pmu_test continues if the exception type is illegal
instruction because access to hpmcounter will generate that. However
illegal instruction exception may occur due to the other reasons
which should result in test assertion.

Use the stval to decode the exact type of instructions and which csrs are
being accessed if it is csr access instructions. Assert in all cases
except if it is a csr access instructions that access valid PMU related
registers.

Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add vector related tests with the ISA extension standard template.
However, the vector registers are bit tricky as the register length is
variable based on vlenb value of the system. That's why the macros are
defined with a default and overidden with actual value at runtime.

Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 109.63 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 879.49 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1134.67 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.17 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.31 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.67 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 66.40 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 2.33 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
kdoc
Desc: Detects for kdoc errors
Duration: 0.84 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 104.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 876.17 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1133.58 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.62 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.65 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 66.60 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
kdoc
Desc: Detects for kdoc errors
Duration: 0.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/3] KVM: riscv: selftests: Decode stval to identify exact exception type"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 104.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 875.71 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1133.58 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.16 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.82 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.74 seconds
Result: WARNING
Output:

WARNING: line length of 105 exceeds 100 columns
#163: FILE: tools/testing/selftests/kvm/riscv/get-reg-list.c:965:
+	KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_VECTOR | KVM_REG_RISCV_VECTOR_CSR_REG(vstart),

WARNING: line length of 101 exceeds 100 columns
#164: FILE: tools/testing/selftests/kvm/riscv/get-reg-list.c:966:
+	KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_VECTOR | KVM_REG_RISCV_VECTOR_CSR_REG(vl),

WARNING: line length of 104 exceeds 100 columns
#165: FILE: tools/testing/selftests/kvm/riscv/get-reg-list.c:967:
+	KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_VECTOR | KVM_REG_RISCV_VECTOR_CSR_REG(vtype),

WARNING: line length of 103 exceeds 100 columns
#166: FILE: tools/testing/selftests/kvm/riscv/get-reg-list.c:968:
+	KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_VECTOR | KVM_REG_RISCV_VECTOR_CSR_REG(vcsr),

WARNING: line length of 104 exceeds 100 columns
#167: FILE: tools/testing/selftests/kvm/riscv/get-reg-list.c:969:
+	KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_VECTOR | KVM_REG_RISCV_VECTOR_CSR_REG(vlenb),

WARNING: line length of 116 exceeds 100 columns
#200: FILE: tools/testing/selftests/kvm/riscv/get-reg-list.c:1002:
+	KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_V,

WARNING: line length of 102 exceeds 100 columns
#211: FILE: tools/testing/selftests/kvm/riscv/get-reg-list.c:1030:
+	{"v", .feature = KVM_RISCV_ISA_EXT_V, .regs = vector_regs, .regs_n = ARRAY_SIZE(vector_regs),}

total: 0 errors, 7 warnings, 0 checks, 199 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit f2f8c4b82296 ("KVM: riscv: selftests: Add vector extension tests") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 7 warnings, 0 checks, 199 lines checked
WARNING: line length of 101 exceeds 100 columns
WARNING: line length of 102 exceeds 100 columns
WARNING: line length of 103 exceeds 100 columns
WARNING: line length of 104 exceeds 100 columns
WARNING: line length of 105 exceeds 100 columns
WARNING: line length of 116 exceeds 100 columns


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 66.94 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
kdoc
Desc: Detects for kdoc errors
Duration: 1.49 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v2,3/3] KVM: riscv: selftests: Add vector extension tests"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw958351 branch April 30, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants