Drop the TODO in handle_invvpid() about syncing only the affected SPTEs when emulating single-address INVVPID with EPT disabled, instead of freeing all of L2's roots. Nested virtualization with EPT disabled is a niche configuration, and no one cares about the performance of INVVPID emulation in that setup. If someone does care, they'll find the overhead by profiling, whereas the TODO is more likely to send someone chasing an optimization that isn't worth the effort. Assisted-by: LLM Signed-off-by: Yosry Ahmed --- arch/x86/kvm/vmx/nested.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index 9b0bfa2f854cf..57458b8455a41 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -6159,8 +6159,6 @@ static int handle_invvpid(struct kvm_vcpu *vcpu) * * Note, this operates on root_mmu, not guest_mmu, as L1 and L2 share * an MMU when EPT is disabled. - * - * TODO: sync only the affected SPTEs for INVDIVIDUAL_ADDR. */ if (!enable_ept) kvm_mmu_free_guest_mode_roots(vcpu->kvm, &vcpu->arch.root_mmu); -- 2.56.0.385.gd3acb90ef8-goog