On Fri, Apr 29, 2022 at 06:39:35PM +0000, David Matlack wrote: > +static void perf_test_l1_guest_code(struct vmx_pages *vmx, uint64_t vcpu_id) > +{ > +#define L2_GUEST_STACK_SIZE 64 > + unsigned long l2_guest_stack[L2_GUEST_STACK_SIZE]; > + unsigned long *rsp; > + > + GUEST_ASSERT(vmx->vmcs_gpa); > + GUEST_ASSERT(prepare_for_vmx_operation(vmx)); > + GUEST_ASSERT(load_vmcs(vmx)); > + GUEST_ASSERT(ept_1g_pages_supported()); > + > + rsp = &l2_guest_stack[L2_GUEST_STACK_SIZE - 1]; > + *rsp = vcpu_id; > + prepare_vmcs(vmx, perf_test_l2_guest_entry, rsp); Just to purely ask: is this setting the same stack pointer to all the vcpus? > + > + GUEST_ASSERT(!vmlaunch()); > + GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_VMCALL); > + GUEST_DONE(); > +} [...] > +/* Identity map the entire guest physical address space with 1GiB Pages. */ > +void nested_map_all_1g(struct vmx_pages *vmx, struct kvm_vm *vm) > +{ > + __nested_map(vmx, vm, 0, 0, vm->max_gfn << vm->page_shift, PG_LEVEL_1G); > +} Could max_gfn be large? Could it consumes a bunch of pages even if mapping 1G only? Thanks, -- Peter Xu