Skip to content

[PW_SID:958854] KVM: selftests: Convert to kernel-style types#365

Closed
linux-riscv-bot wants to merge 11 commits into
workflow__riscv__fixesfrom
pw958854
Closed

[PW_SID:958854] KVM: selftests: Convert to kernel-style types#365
linux-riscv-bot wants to merge 11 commits into
workflow__riscv__fixesfrom
pw958854

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 958854 applied to workflow__riscv__fixes

Name: KVM: selftests: Convert to kernel-style types
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=958854
Version: 1

Linux RISC-V bot and others added 11 commits April 30, 2025 11:41
Replace all occurrences of vm_vaddr_t with gva_t to align with KVM code
and with the conversion helpers (e.g. addr_gva2hva()). Also replace
vm_vaddr in function names with gva to align with the new type name.

This commit was generated with the following command:

  git ls-files tools/testing/selftests/kvm | \
          xargs sed -i 's/vm_vaddr_/gva_/g'

Then by manually adjusting whitespace to make checkpatch.pl happy.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Replace all occurrences of vm_paddr_t with gpa_t to align with KVM code
and with the conversion helpers (e.g. addr_hva2gpa()). Also replace
vm_paddr in function names with gpa to align with the new type name.

This commit was generated with the following command:

  git ls-files tools/testing/selftests/kvm | \
          xargs sed -i 's/vm_paddr_/gpa_/g'

Then by manually adjusting whitespace to make checkpatch.pl happy.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Fix various Hyper-V selftests to use gpa_t for variables that contain
guest physical addresses, rather than gva_t.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use u64 instead of uint64_t to make the KVM selftests code more concise
and more similar to the kernel (since selftests are primarily developed
by kernel developers).

This commit was generated with the following command:

  git ls-files tools/testing/selftests/kvm | xargs sed -i 's/uint64_t/u64/g'

Then by manually adjusting whitespace to make checkpatch.pl happy.

Also include <linux/types.h> in include/x86/pmu.h to avoid compilation
failure.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use s64 instead of int64_t to make the KVM selftests code more concise
and more similar to the kernel (since selftests are primarily developed
by kernel developers).

This commit was generated with the following command:

  git ls-files tools/testing/selftests/kvm | xargs sed -i 's/int64_t/s64/g'

Then by manually adjusting whitespace to make checkpatch.pl happy.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use u32 instead of uint32_t to make the KVM selftests code more concise
and more similar to the kernel (since selftests are primarily developed
by kernel developers).

This commit was generated with the following command:

  git ls-files tools/testing/selftests/kvm | xargs sed -i 's/uint32_t/u32/g'

Then by manually adjusting whitespace to make checkpatch.pl happy.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use s32 instead of int32_t to make the KVM selftests code more concise
and more similar to the kernel (since selftests are primarily developed
by kernel developers).

This commit was generated with the following command:

  git ls-files tools/testing/selftests/kvm | xargs sed -i 's/int32_t/s32/g'

Then by manually adjusting whitespace to make checkpatch.pl happy.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use u16 instead of uint16_t to make the KVM selftests code more concise
and more similar to the kernel (since selftests are primarily developed
by kernel developers).

This commit was generated with the following command:

  git ls-files tools/testing/selftests/kvm | xargs sed -i 's/uint16_t/u16/g'

Then by manually adjusting whitespace to make checkpatch.pl happy.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use s16 instead of int16_t to make the KVM selftests code more concise
and more similar to the kernel (since selftests are primarily developed
by kernel developers).

This commit was generated with the following command:

  git ls-files tools/testing/selftests/kvm | xargs sed -i 's/int16_t/s16/g'

Then by manually adjusting whitespace to make checkpatch.pl happy.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use u8 instead of uint8_t to make the KVM selftests code more concise
and more similar to the kernel (since selftests are primarily developed
by kernel developers).

This commit was generated with the following command:

  git ls-files tools/testing/selftests/kvm | xargs sed -i 's/uint8_t/u8/g'

Then by manually adjusting whitespace to make checkpatch.pl happy.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 110.49 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 880.84 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1143.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.09 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 11.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 67.00 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
kdoc
Desc: Detects for kdoc errors
Duration: 0.93 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
module-param
Desc: Detect module_param changes
Duration: 0.36 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/10] KVM: selftests: Use gva_t instead of vm_vaddr_t"
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: "[02/10] KVM: selftests: Use gpa_t instead of vm_paddr_t"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 104.64 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/10] KVM: selftests: Use gpa_t instead of vm_paddr_t"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 878.05 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/10] KVM: selftests: Use gpa_t instead of vm_paddr_t"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1143.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/10] KVM: selftests: Use gpa_t instead of vm_paddr_t"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/10] KVM: selftests: Use gpa_t instead of vm_paddr_t"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.80 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/10] KVM: selftests: Use gpa_t instead of vm_paddr_t"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 6.48 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/10] KVM: selftests: Use gpa_t instead of vm_paddr_t"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 66.69 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[08/10] KVM: selftests: Use u16 instead of uint16_t"
module-param
Desc: Detect module_param changes
Duration: 0.36 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[08/10] KVM: selftests: Use u16 instead of uint16_t"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[08/10] KVM: selftests: Use u16 instead of uint16_t"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 105.15 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 878.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1143.17 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.70 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.41 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 66.62 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
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 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
kdoc
Desc: Detects for kdoc errors
Duration: 0.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.62 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 9: "[09/10] KVM: selftests: Use s16 instead of int16_t"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 104.43 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 878.81 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1142.80 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.44 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.34 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 9.48 seconds
Result: WARNING
Output:

CHECK: No space is necessary after a cast
#800: FILE: tools/testing/selftests/kvm/s390/memop.c:234:
+static u8 __aligned(PAGE_SIZE) mem2[65536];

CHECK: No space is necessary after a cast
#902: FILE: tools/testing/selftests/kvm/s390/tprot.c:17:
+static __aligned(PAGE_SIZE) u8 pages[2][PAGE_SIZE];

WARNING: externs should be avoided in .c files
#973: FILE: tools/testing/selftests/kvm/x86/fix_hypercall_test.c:32:
+extern u8 hypercall_insn[HYPERCALL_INSN_SIZE];

total: 0 errors, 1 warnings, 2 checks, 1191 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 d1dd1102a6a1 ("KVM: selftests: Use u8 instead of uint8_t") 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, 1 warnings, 2 checks, 1191 lines checked
CHECK: No space is necessary after a cast
WARNING: externs should be avoided in .c files


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 67.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
kdoc
Desc: Detects for kdoc errors
Duration: 0.92 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
module-param
Desc: Detect module_param changes
Duration: 0.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/10] KVM: selftests: Use u8 instead of uint8_t"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.38 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch from 4d9ad71 to 625be03 Compare May 6, 2025 09:20
@linux-riscv-bot linux-riscv-bot deleted the pw958854 branch May 7, 2025 14: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