Commit 96d41cfd authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini

KVM: selftests: Zero out the correct page in the Hyper-V features test

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: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20210622200529.3650424-3-seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent ecc3a92c
...@@ -630,7 +630,7 @@ int main(void) ...@@ -630,7 +630,7 @@ int main(void)
memset(addr_gva2hva(vm, hcall_page), 0x0, 2 * getpagesize()); memset(addr_gva2hva(vm, hcall_page), 0x0, 2 * getpagesize());
hcall_params = vm_vaddr_alloc(vm, getpagesize(), 0x20000, 0, 0); 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_args_set(vm, VCPU_ID, 2, addr_gva2gpa(vm, hcall_page), hcall_params);
vcpu_enable_cap(vm, VCPU_ID, &cap); vcpu_enable_cap(vm, VCPU_ID, &cap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment