From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 022D6386C3F for ; Tue, 12 May 2026 21:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778622184; cv=none; b=V/++Dgn8lGfaYZzwaGTAhu4Xqup38HzL6oldEq1NfWsGNzWcaIkXZk/ngcdzUBbkL5j+E4frsd6q5OOmMWt93QYISsUQcEBfhCkZ/m9NFc1vZE7lKt5JZ3K9nCHLKPWTOno48x/inWoVwtm/i2inLm9X5J84Ntm8su8a/PjRbLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778622184; c=relaxed/simple; bh=ldiMr/jTgzTdGMeoBI2w86wn+gSPvhUxkb0okNLJePA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=QnqCn2L+Z39aY2SId3bB7jsUSxof8gLFFm0sbXiHpJU2DQF7Z6Wj8+FPOQYQuVdtZ4IpEjSJ6n/kq/f0vTRv+9N5ESIwRxeBw6VJREcKPf6E42JqW9KnEH3sEhvcCcZbzCN9rCLBd512USSLpvS+NFfH30no4W8J5k+LJIxH0Iw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=qEIYJzLg; arc=none smtp.client-ip=209.85.210.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qEIYJzLg" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-837c4eb3bdfso4068483b3a.2 for ; Tue, 12 May 2026 14:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778622182; x=1779226982; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=bj9D1BDvzoYZj1BL80BFHCMOi9+t7uJndAu3/Hrv+98=; b=qEIYJzLgSaP51g+DDtvzYZVvnO54ZZpdeCy99IYYqNI+ZQ3QnHIyD4NCqa6AJesRyj mZlwuP7/cb4w7L/Z9P7GqFHG6yV1+MYjWx76IBtqCFsoKtcOWgozoo7UbgJCU9j0oH+e n0fkHzTqXZOhT7y3VSEHMh0ib4peFa+5YpiDHnsC/1/XZdyaGE04rp6gWFpIaBSacjwg 7bHC+BXgiAA21hB4JpYsBRyQA2KleMWTE9E5HHYFWh0svBJCXCwbear3jCLEomeua3/F 10UevhwMEzedvW/STvwhl1mCt+N55Rq8X+9/wF6k3UbAe0CFXcTo2rf+l/CXSjr1eoPv rKjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778622182; x=1779226982; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bj9D1BDvzoYZj1BL80BFHCMOi9+t7uJndAu3/Hrv+98=; b=C/rcc9UelHhXsgKr+nKd0lnmZSuMk6D7B4+ZSRQou74s7Om2TtZCpocvTDMyd3BQSH fF1FhFSbBg73lKNC9q75t8cFQSAq9bMgpdHzBBOSW6z7B6loWxhfJ+1PXDuorM5OawiT 5OLyaWtQhq1aqWz+HsM4RffgFndq7o2r0bsDSr+lpRgdanB9aqFaj6BO5HqwAKXCQkw0 KeU0onMPCXwm54HBoXe7RGNUv5qRGcoPe7vwxaSYCYetT8Hj4Jv64o7HQWVSrDW6xClH KExkvGgMI820epytc1TzeUg1iLf5OyBpnUtHWss9TgVGNTLyo86+d/Tai+2407NKbxeW Nd3Q== X-Gm-Message-State: AOJu0YwFy1vV+eLfoH/nmk4ydRYg7S7RKo9fILZ40uyJnifRL3TVDCwj SulW0hHVmjb8c3PfL6DH9fnh3JDf+t1fQj/6YJFoqo/0noxSJf/89taMrZ0tr7dstDvu6P4z1Gy Xs9IcWw== X-Received: from pfxx23.prod.google.com ([2002:a05:6a00:117:b0:82f:c180:a882]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:1741:b0:82c:9f7e:518c with SMTP id d2e1a72fcca58-83f05bf569bmr64985b3a.25.1778622181819; Tue, 12 May 2026 14:43:01 -0700 (PDT) Date: Tue, 12 May 2026 14:43:01 -0700 In-Reply-To: <20260512203545.3031339-1-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260512203545.3031339-1-pbonzini@redhat.com> Message-ID: Subject: Re: [PATCH v2] KVM: x86: use again the flush argument of __link_shadow_page() From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Tue, May 12, 2026, Paolo Bonzini wrote: > Except in the case of parentless nested-TDP pages, mmu_page_zap_pte() > clears the SPTE but leaves the invalid_list empty. In this case, using > kvm_flush_remote_tlbs() as kvm_mmu_remote_flush_or_zap() does is overkill. > Avoid flushing the entirety of the remote TLBs unless the invalid_list > was populated: instead, use a more efficient gfn-targeting flush (if > available) and skip it altogether if the caller guarantees that a TLB > flush is not necessary. > > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Sean Christopherson