From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) (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 B7A5B44E675 for ; Fri, 24 Jul 2026 19:52:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784922742; cv=none; b=NYp7faZxMJONKlLiYEEbbzCFTdqUQZaRsrjxdELykAv0bTjVaTM9P1inBfdWKepY4uGQRw/qfPYE1Kam0o0+9xpt0BbOmNRH93hQYEc4AtuGjOD7IOjAMLiajx01WBfsBWF5NVr0WhAM8fK5hhbz+z48+FcM+CCB4fqfbr8Jpho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784922742; c=relaxed/simple; bh=A7EEfHCXDQhZbZc+7PwL7H/hPx0GPYjU++n5dKG0w1g=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=sQnUDhkfw7MPDniTspW/zCeKKBKNa3Mo43YkP16uIavZVVIINTVaoG21Os4oVaSqDjVBvxYFm8dLyPWulom4ZKKJsSe0s9zWH3/lBGRhlCZFcR4VSNQ8Y45FMlR714I4V2mxO30ViagMIWdL8Pqf792p5Ack1rXZuD8gV8Xmv/w= 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=QLKArikg; arc=none smtp.client-ip=209.85.215.198 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="QLKArikg" Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-ca6bd8a190cso1023686a12.0 for ; Fri, 24 Jul 2026 12:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784922741; x=1785527541; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=UIrEUXeMwkKPn3AMJe5EPVmRwSj/wiphCk2WS28J/Pk=; b=QLKArikgRCDtGcVe/3QMi03hm6MkTBR/N6R4UWh52oICYYEgNWMM+hZcmpsSNGW2ut sxAwHZkqk3/XwI7u8WIds9o8DC0NLJnUnmtNpCNTTLXk5oGnc8USQwTS2bTeo5lUBZ12 KIzbrf6Zc4vXShnFVBk2R8Ft2I+jLWhw8fgdFJmsA1mCgMyVz2uKGC4I6jkE8Ulv4EgJ Oe6htBCpLVl64lzwtGlaejF4Z+0NSD+BFtJGfwicxhaxUOndAUiKynLLzpMUQSpxhor4 LjYpErM9akRao87gXRqrfoc37UjuRZfRubAaz1nDQKCHSZYNRv6iYgs8fhSZh7qNGFVF 6Bcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784922741; x=1785527541; h=content-type: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:content-type; bh=UIrEUXeMwkKPn3AMJe5EPVmRwSj/wiphCk2WS28J/Pk=; b=cQuUP05Glah4ZHeheDlVB9x6MElABYrmvWQRoMHZ1XYEUftZt3T2/4Kn6OAGbFo+0J +rJyWzk98c74DHP9CJflJKo39298EjXQQr69Z4wwgrP6cfi7ZSPPPGxmAmXG0ZDh8Em5 U04w15iaPww6An3FyVtXnH/BycD9UTkXF7Texdh54QKVm9J+7QHbJvFFI0CkisBZDMEz sy8KKPyqe60LROZ5tQoHAnNG+OUxK7aksufbR6b3dO6fA2WWpD1F/ev1Tb/9ZboeMbRA PCJ3vpRdcIDXARWeFYg66FOE0BeQgX7jW8/4GGYv2UEn6/npFcx3/XBJ+4M/lvtwRtoE 6aHA== X-Forwarded-Encrypted: i=1; AHgh+RrWwIgiQwH8KRmUMJbVqkFA5OCUlKLRrm3IX39BQi7FxsO5m9luN7pQGWG58owVNZiLwexMDbZc50XJW9k=@vger.kernel.org X-Gm-Message-State: AOJu0Yxi9VueTYcX38Rh7tP047tbDg1HSLzuKduEcUGv49vZPP9yWuS/ PXr+WawNul9Uw+qDNAMGdHY8Dyigm9y/MoN75GLr+booQ/AV1zZsLzxMstMPFROjARdyjTyO7iE 6H1MhLg== X-Received: from pgvf24.prod.google.com ([2002:a65:6298:0:b0:cbb:9724:6775]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:e0a2:b0:3bf:e2dc:bc85 with SMTP id adf61e73a8af0-3c44b1ca809mr9783772637.40.1784922740833; Fri, 24 Jul 2026 12:52:20 -0700 (PDT) Date: Fri, 24 Jul 2026 12:52:20 -0700 In-Reply-To: <20260714160411.302386-1-alexandru.elisei@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260714160411.302386-1-alexandru.elisei@arm.com> Message-ID: Subject: Re: [PATCH v2] KVM: Ignore MMU notifiers for guest_memfd-only memslots From: Sean Christopherson To: Alexandru Elisei Cc: pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org, oupton@kernel.org, suzuki.poulose@arm.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, david.hildenbrand@arm.com, mark.rutland@arm.com, ackerleytng@google.com Content-Type: text/plain; charset="us-ascii" On Tue, Jul 14, 2026, Alexandru Elisei wrote: > + * TODO: Skip gmem-only memslots on mmu_notifier events entirely, once > + * gfn_to_pfn_cache is also wired up to directly pull from guest_memfd. So it turns out we need to solve a very related problem[*], thanks to commit b9220d32799a ("KVM: x86/xen: allow shared_info to be mapped by fixed HVA"), which as it says, allows populating gfn_to_pfn_cache directly with an HVA, i.e. without a memslot. My not-yet-tested solution for that mess is to give gfn_to_pfn_cache its own invalidation sequence, at which point there shouldn't be a need to process gmem-only memslots just for gfn_to_pfn_cache, because it will already be equipped to handle memslot-less invalidation. Given how simple this change *should* be, I'm going to put this patch on the backburner for now, and then assuming my proposed change actually works, I'll grab your original change (or more likely, re-post it as the last patch in the series weans gfn_to_pfn_cache off mmu_invalidate_seq). It'll probably take me a few weeks to circle back to this, as I finally crawled out from underneath a pile of urgent and am just now getting back into review mode, but this is fairly high on my todo list, so with luck we might still squeeze this into 7.3. [*] https://lore.kernel.org/all/aj2hi-NcqUUCaoQF@google.com