summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-02-10 21:26:06 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2021-02-11 16:02:09 +0300
commita685d99208621b39dd0764e2bfdddfd19bb080f2 (patch)
tree7849ce63d704c5de4e2660f99cac63add9384a2d /tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c
parent2f3b90fd90b59d1bde088f57ec3d25f81d63bd59 (diff)
downloadlinux-a685d99208621b39dd0764e2bfdddfd19bb080f2.tar.xz
KVM: selftests: Fix size of memslots created by Xen tests
For better or worse, the memslot APIs take the number of pages, not the size in bytes. The Xen tests need 2 pages, not 8192 pages. Fixes: 8d4e7e80838f ("KVM: x86: declare Xen HVM shared info capability and add test case") Cc: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210210182609.435200-3-seanjc@google.com> Reviewed-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c b/tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c
index 86653361c695..8389e0bfd711 100644
--- a/tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c
+++ b/tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c
@@ -102,8 +102,7 @@ int main(int argc, char *argv[])
/* Map a region for the hypercall pages */
vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS,
- HCALL_REGION_GPA, HCALL_REGION_SLOT,
- 2 * getpagesize(), 0);
+ HCALL_REGION_GPA, HCALL_REGION_SLOT, 2, 0);
virt_map(vm, HCALL_REGION_GPA, HCALL_REGION_GPA, 2, 0);
for (;;) {