On Tue, May 17, 2022 at 07:05:24PM +0000, David Matlack wrote: > +uint64_t perf_test_nested_pages(int nr_vcpus) > +{ > + /* > + * 513 page tables to identity-map the L2 with 1G pages, plus a few > + * pages per-vCPU for data structures such as the VMCS. > + */ > + return 513 + 10 * nr_vcpus; Shouldn't that 513 magic value be related to vm->max_gfn instead (rather than assuming all hosts have 39 bits PA)? If my math is correct, it'll require 1GB here just for the l2->l1 pgtables on a 5-level host to run this test nested. So I had a feeling we'd better still consider >4 level hosts some day very soon.. No strong opinion, as long as this test is not run by default. > +} -- Peter Xu