lkml.org 
[lkml]   [2021]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 02/19] KVM: selftests: Zero out the correct page in the Hyper-V features test
From
Fix an apparent copy-paste goof in hyperv_features where hcall_page
(which is two pages, so technically just the first page) gets zeroed
twice, and hcall_params gets zeroed none times.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
tools/testing/selftests/kvm/x86_64/hyperv_features.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_features.c b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
index 9947ef63dfa1..030c9447cb90 100644
--- a/tools/testing/selftests/kvm/x86_64/hyperv_features.c
+++ b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
@@ -630,7 +630,7 @@ int main(void)
memset(addr_gva2hva(vm, hcall_page), 0x0, 2 * getpagesize());

hcall_params = vm_vaddr_alloc(vm, getpagesize(), 0x20000, 0, 0);
- memset(addr_gva2hva(vm, hcall_page), 0x0, getpagesize());
+ memset(addr_gva2hva(vm, hcall_params), 0x0, getpagesize());

vcpu_args_set(vm, VCPU_ID, 2, addr_gva2gpa(vm, hcall_page), hcall_params);
vcpu_enable_cap(vm, VCPU_ID, &cap);
--
2.32.0.288.g62a8d224e6-goog
\
 
 \ /
  Last update: 2021-06-22 22:06    [W:0.149 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site