KVM: selftests: Add additional pages to the guest to accommodate ucall
authorAaron Lewis <aaronlewis@google.com>
Sat, 29 Jul 2023 00:36:15 +0000 (17:36 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 2 Aug 2023 21:41:59 +0000 (14:41 -0700)
commit215a681710a554b224d743e4a9cd68965889713c
tree18c93f7ce5eacb90aa0926a6cb13533a77a12356
parente5119382499cefc839097dcc78f27ab00131e7ad
KVM: selftests: Add additional pages to the guest to accommodate ucall

Add additional pages to the guest to account for the number of pages
the ucall headers need.  The only reason things worked before is the
ucall headers are fairly small.  If they were ever to increase in
size the guest could run out of memory.

This is done in preparation for adding string formatting options to
the guest through the ucall framework which increases the size of
the ucall headers.

Fixes: 426729b2cf2e ("KVM: selftests: Add ucall pool based implementation")
Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Link: https://lore.kernel.org/r/20230729003643.1053367-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/ucall_common.h
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/lib/ucall_common.c