Re: [PATCH v2 10/10] KVM: selftests: Add option to run dirty_log_perf_test vCPUs in L2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux