[PW_SID:1083508] KVM: selftests: Use kernel-style integer and g[vp]a_t types#1804
[PW_SID:1083508] KVM: selftests: Use kernel-style integer and g[vp]a_t types#1804linux-riscv-bot wants to merge 20 commits into
Conversation
Replace all occurrences of vm_vaddr_t with gva_t to align with KVM code and with the conversion helpers (e.g. addr_gva2hva()). 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, and dropping renames of functions that allocate memory within a given VM. No functional change intended. Signed-off-by: David Matlack <dmatlack@google.com> [sean: drop renames of allocator APIs] Signed-off-by: Sean Christopherson <seanjc@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()). 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> [sean: drop bogus changelog blurb about renaming functions] Signed-off-by: Sean Christopherson <seanjc@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. In practice, the bugs are benign as both gva_t and gpa_t are u64 typedefs, i.e. gpa_t and gva_t are interchangeable from a functional perspective, the code is just confusing. No functional change intended. Signed-off-by: David Matlack <dmatlack@google.com> [sean: call out that both are u64 typedefs] Signed-off-by: Sean Christopherson <seanjc@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. Include <linux/types.h> in include/kvm_util_types.h, iinclude/test_util.h, and include/x86/pmu.h to pick up the tools-defined u64. Arguably, all headers (especially kvm_util_types.h) should have already been including stdint.h to get uint64_t from the libc headers, but the missing dependency only rears its head once KVM uses u64 instead of uint64_t. No functional change intended. Signed-off-by: David Matlack <dmatlack@google.com> [sean: rename pread_uint64() => pread_u64, expand on types.h include] Signed-off-by: Sean Christopherson <seanjc@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: Sean Christopherson <seanjc@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: Sean Christopherson <seanjc@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: Sean Christopherson <seanjc@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: Sean Christopherson <seanjc@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: Sean Christopherson <seanjc@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: Sean Christopherson <seanjc@google.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…ven VM Now that KVM selftests use gva_t instead of vm_vaddr_t, drop "vaddr_" from the core memory allocation APIs as the information is extraneous and does more harm than good. E.g. the APIs don't _just_ allocate virtual memory, they allocate backing physical memory and install mappings in the guest page tables. And as proven by kmalloc() and malloc(), developers generally expect that allocations come with a working virtual address. Opportunistically clean up the function comment for vm_alloc(), and drop the misleading and superfluous comments for its wrappers. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Now that KVM selftests use gva_t instead of vm_vaddr_t, rename the API for finding an unused range of virtual memory to drop the defunct terminology and use "vm" for the scope. Opportunistically clean up the function comment to drop superfluous and redundant information. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…bitmap() Now that KVM selftests use gva_t instead of vm_vaddr_t, rename the helper for populating the initial GVA bitmap to drop the defunct terminology and use "vm" for the scope. Opportunistically fixup the declaration of the API, which has been broken since day 1. The flaw went unnoticed because the sole caller is defined after the weak version, i.e. can see the prototype without a previous declaration. No functional change intended. Fixes: e8b9a05 ("KVM: arm64: selftests: Align VA space allocator with TTBR0") Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…hpa() Rename arm64's translate_to_host_paddr() to translate_hva_to_hpa() and update variable names to match, as using "vaddr" and "paddr" terminology is super confusing due to selftests using those exact names for *guest* addresses. Opportunisitically drop superfluous local page_addr and paddr variables. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Replace all variations of "vaddr" variables in KVM selftests with "gva", with the exception of the ELF structures, as those fields are not specific to guest virtual addresses, to complete the conversion from vm_vaddr_t to gva_t. Opportunistically use gva_t instead of u64 for relevant variables, and fixup indentation as appropriate. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use gpa_t instead of u64 for obvious declarations of GPA variables. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
In x86's nested TDP APIs, use the appropriate gpa_t typedef and rename variables from nested_paddr to l2_gpa to match KVM x86's nomenclature. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Replace all variations of "paddr" variables in KVM selftests with "gpa", with the exception of the ELF structures, as those fields are not specific to guest virtual addresses, to complete the conversion from vm_paddr_t to gpa_t. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v3,01/19] KVM: selftests: Use gva_t instead of vm_vaddr_t" |
|
Patch 1: "[v3,01/19] KVM: selftests: Use gva_t instead of vm_vaddr_t" |
|
Patch 1: "[v3,01/19] KVM: selftests: Use gva_t instead of vm_vaddr_t" |
|
Patch 1: "[v3,01/19] KVM: selftests: Use gva_t instead of vm_vaddr_t" |
|
Patch 1: "[v3,01/19] KVM: selftests: Use gva_t instead of vm_vaddr_t" |
|
Patch 1: "[v3,01/19] KVM: selftests: Use gva_t instead of vm_vaddr_t" |
|
Patch 1: "[v3,01/19] KVM: selftests: Use gva_t instead of vm_vaddr_t" |
|
Patch 1: "[v3,01/19] KVM: selftests: Use gva_t instead of vm_vaddr_t" |
|
Patch 1: "[v3,01/19] KVM: selftests: Use gva_t instead of vm_vaddr_t" |
|
Patch 1: "[v3,01/19] KVM: selftests: Use gva_t instead of vm_vaddr_t" |
|
Patch 18: "[v3,18/19] KVM: selftests: Replace "u64 nested_paddr" with "gpa_t l2_gpa"" |
|
Patch 18: "[v3,18/19] KVM: selftests: Replace "u64 nested_paddr" with "gpa_t l2_gpa"" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
|
Patch 19: "[v3,19/19] KVM: selftests: Replace "paddr" with "gpa" throughout" |
da65025 to
50e3f1e
Compare
PR for series 1083508 applied to workflow
Name: KVM: selftests: Use kernel-style integer and g[vp]a_t types
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1083508
Version: 3