]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: selftests: Slightly simplify memstress_setup_nested()
authorYosry Ahmed <yosry.ahmed@linux.dev>
Tue, 13 Jan 2026 17:14:56 +0000 (17:14 +0000)
committerSean Christopherson <seanjc@google.com>
Wed, 14 Jan 2026 17:06:45 +0000 (09:06 -0800)
commitf756ed82c62aa2725757ac011710492d4cc8c7d8
treead77bfef191770abce233854061d3c37d6de96b6
parente353850499c717f1f984f7c208f49a8618beff2f
KVM: selftests: Slightly simplify memstress_setup_nested()

Instead of calling memstress_setup_ept_mappings() only in the first
iteration in the loop, move it before the loop.

The call needed to happen within the loop before commit e40e72fec0de
("KVM: selftests: Stop passing VMX metadata to TDP mapping functions"),
as memstress_setup_ept_mappings() used to take in a pointer to vmx_pages
and pass it into tdp_identity_map_1g() (to get the EPT root GPA). This
is no longer the case, as tdp_identity_map_1g() gets the EPT root
through stage2 MMU.

Signed-off-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Link: https://patch.msgid.link/20260113171456.2097312-1-yosry.ahmed@linux.dev
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/lib/x86/memstress.c