Re: [PATCH v3 09/16] KVM: selftests: Stop passing VMX metadata to TDP mapping functions

From: Yosry Ahmed

Date: Mon Dec 15 2025 - 13:39:08 EST


On Thu, Nov 27, 2025 at 01:34:33AM +0000, Yosry Ahmed wrote:
> @@ -87,11 +86,11 @@ void memstress_setup_nested(struct kvm_vm *vm, int nr_vcpus, struct kvm_vcpu *vc
>
> vm_enable_ept(vm);
> for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++) {
> - vmx = vcpu_alloc_vmx(vm, &vmx_gva);
> + vcpu_alloc_vmx(vm, &vmx_gva);
>
> /* The EPTs are shared across vCPUs, setup the mappings once */
> if (vcpu_id == 0)
> - memstress_setup_ept_mappings(vmx, vm);
> + memstress_setup_ept_mappings(vm);

I think at this point we can actually move
memstress_setup_ept_mappings() before the loop similar to
vm_enable_ept().

I can send a patch on top or a new version, let me know if you prefer
that I do either, or fix it up while applying.