On Wed, Mar 01, 2023, Aaron Lewis wrote: > Add additional pages to the guest to account for the number of pages > the ucall framework uses. > > This is done in preparation for adding string formatting options to > the guest through ucall helpers. > > Signed-off-by: Aaron Lewis <aaronlewis@xxxxxxxxxx> > --- > tools/testing/selftests/kvm/include/ucall_common.h | 1 + > tools/testing/selftests/kvm/lib/kvm_util.c | 4 ++++ > tools/testing/selftests/kvm/lib/ucall_common.c | 5 +++++ > 3 files changed, 10 insertions(+) > > diff --git a/tools/testing/selftests/kvm/include/ucall_common.h b/tools/testing/selftests/kvm/include/ucall_common.h > index 1a6aaef5ccae..0b1fde23729b 100644 > --- a/tools/testing/selftests/kvm/include/ucall_common.h > +++ b/tools/testing/selftests/kvm/include/ucall_common.h > @@ -34,6 +34,7 @@ void *ucall_arch_get_ucall(struct kvm_vcpu *vcpu); > void ucall(uint64_t cmd, int nargs, ...); > uint64_t get_ucall(struct kvm_vcpu *vcpu, struct ucall *uc); > void ucall_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa); > +int ucall_header_size(void); I like keeping the ucall_header definition in ucall_common.c, but we should hide away the detail that it's a "header" (which doesn't even really make sense to me). E.g. maybe ucall_nr_pages_required()? And then obviously do the align_up() and whatnot in the helper.