Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: selftests: Use gpa_t for GPAs in Hyper-V selftests

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]
Link: https://patch.msgid.link/20260420212004.3938325-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>

authored by

David Matlack and committed by
Sean Christopherson
6d349425 97dcda3f

+6 -6
+1 -1
tools/testing/selftests/kvm/x86/hyperv_evmcs.c
··· 76 76 } 77 77 78 78 void guest_code(struct vmx_pages *vmx_pages, struct hyperv_test_pages *hv_pages, 79 - gva_t hv_hcall_page_gpa) 79 + gpa_t hv_hcall_page_gpa) 80 80 { 81 81 #define L2_GUEST_STACK_SIZE 64 82 82 unsigned long l2_guest_stack[L2_GUEST_STACK_SIZE];
+1 -1
tools/testing/selftests/kvm/x86/hyperv_features.c
··· 82 82 GUEST_DONE(); 83 83 } 84 84 85 - static void guest_hcall(gva_t pgs_gpa, struct hcall_data *hcall) 85 + static void guest_hcall(gpa_t pgs_gpa, struct hcall_data *hcall) 86 86 { 87 87 u64 res, input, output; 88 88 uint8_t vector;
+3 -3
tools/testing/selftests/kvm/x86/hyperv_ipi.c
··· 45 45 struct hv_vpset vp_set; 46 46 }; 47 47 48 - static inline void hv_init(gva_t pgs_gpa) 48 + static inline void hv_init(gpa_t pgs_gpa) 49 49 { 50 50 wrmsr(HV_X64_MSR_GUEST_OS_ID, HYPERV_LINUX_OS_ID); 51 51 wrmsr(HV_X64_MSR_HYPERCALL, pgs_gpa); 52 52 } 53 53 54 - static void receiver_code(void *hcall_page, gva_t pgs_gpa) 54 + static void receiver_code(void *hcall_page, gpa_t pgs_gpa) 55 55 { 56 56 u32 vcpu_id; 57 57 ··· 85 85 asm volatile("nop"); 86 86 } 87 87 88 - static void sender_guest_code(void *hcall_page, gva_t pgs_gpa) 88 + static void sender_guest_code(void *hcall_page, gpa_t pgs_gpa) 89 89 { 90 90 struct hv_send_ipi *ipi = (struct hv_send_ipi *)hcall_page; 91 91 struct hv_send_ipi_ex *ipi_ex = (struct hv_send_ipi_ex *)hcall_page;
+1 -1
tools/testing/selftests/kvm/x86/hyperv_svm_test.c
··· 67 67 68 68 static void __attribute__((__flatten__)) guest_code(struct svm_test_data *svm, 69 69 struct hyperv_test_pages *hv_pages, 70 - gva_t pgs_gpa) 70 + gpa_t pgs_gpa) 71 71 { 72 72 unsigned long l2_guest_stack[L2_GUEST_STACK_SIZE]; 73 73 struct vmcb *vmcb = svm->vmcb;