From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.200 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796412132; b=BbGJyv0LLccjK15PXJV1YrsMVxLNyJZuH6GOt9HW8EpChDHurHZuEJxOrqzZcPqYqcgI kgcp4IFRqawbMQa5Cyk+XRyqs5Lg9jiNqB26chxd7/GbowtjWHdvVM+u+JtGLn4B7XK+g 2+rx6emw5UWFhLfen0BTTQHkp36lWsO4APx2PLdl9HeIcLQQ6BYyMQrzDIPapX66U+2ni ARZ5ft+oe4zLDjSLit60pN8GboXFclY3GY0OkOaCIXBRmGCi8vC/gaoX0+Xa3hbNc6jO3 oFxoDNDScR/zhJAg08FGwyY68QVk7QXprRJ5vI8TfXsB69sw70O3MxqFK4EaT34p4dQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796412132; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:Message-ID:Subject:From:To:Cc:Content-Type: Content-Transfer-Encoding; bh=C5SIrvVobkuPoTUcFmSRfDFQeuw3TyLoyHmdRe6zrgg=; b=OK8tHMCQNir0x+2WNIud216meZV5Fhli9DjFKBZWrR08pmHgWcuWHWZRtF1VlduDqGY1 Koon2bnzJ3OlOTZq+0TFpCb9U2bfc0O8KjNC/uMFylVznVIX6vRa+/M43VDbToqfugvw5 37GVjRQiv9DPlSf7LY3ywKJ+QMbGtw4S1YILtADoVD7l3/h69tlxjuVd2su6qfxKP9R2b KtzVLOi+nJacCv/HRPn/5BX+KfN8jVPH1zlVGDqFtW1nWNETiyk/WT3dCDIChVmpFmXhX lAtiJjkv5SoDjDZLFFlzMwjAVL9Ebu7RLRm2JrYzjWOzds1ewS64HMtQYVWsHNHlgAw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=pl5PnR+o; arc=none smtp.remote-ip=209.85.214.200 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9774606A32C for ; Fri, 4 Dec 2026 19:22:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E9774606A32C 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.a=rsa-sha256 header.s=20260707 header.b=pl5PnR+o Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2f18f603e67so9436455ad.1 for ; Fri, 04 Dec 2026 11:22:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796412131; x=1797016931; darn=vger.kernel.org; h=content-transfer-encoding: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=C5SIrvVobkuPoTUcFmSRfDFQeuw3TyLoyHmdRe6zrgg=; b=pl5PnR+omtpcZzE6RNBDGlIb4E04AptwcElLgp4jf2kqJzkM8mnJAj9d7abASsXLZs 8wMyVVzJjAEeUcSLlaG6Bq2LcDDRz/Bg30ZmOmDSVEq0JJ61+vflkWGWtkl3meYyR6sb VA9z92mHyghB2Afo8prpJknKlsbgFZppUVUgNNSqJqt5N/gvmv5yjm3NXyeCl6CxAcpU 2lIpvxhKsxkKvnT5oIOS7S3qSyOmEKx+WkEw3dR385JJfUI63ZyVRqU6N+pLWz//+dbJ CrSfihYR0jm9JrbOq3m067imzIesdeHvAwq9AHxdjU7KGoDp8WqgUavyVHwtgj6+00HM DOoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796412131; x=1797016931; h=content-transfer-encoding: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=C5SIrvVobkuPoTUcFmSRfDFQeuw3TyLoyHmdRe6zrgg=; b=yslfmefir89sOTte7TCchPogpJ+gAtpmN9ptvJn18jgHE/+zH1MCbyaM23SSMra0zm +xPjJHnpOWkjVqL/mB40yB+n3bAD7qvS01h+K5BZ8wB5Z1fAodeD8Vh2tUjBbEUcjBQQ KWJjfIyQNr+g3I2DOu77nsAXbwNAsIAjZ/un5znTbY+HoxBYcE7MIqMebyz3M4wZ2//4 oGUVQ8dogzSRgVcsYSWoTkQ22DS1MukmxKAUG+lT3fs5+semOxVLl3FLe5aU+cUWM1PP UGuWAcv9/UXUWFwhtJVLbcnnBk2F4FqVVKYnHiDLEJa68C3iRutfcOI+4D6NFt3BWeco GoAw== X-Forwarded-Encrypted: i=1; AL+hErH28Hq1qOUnjoFL3ZfmV89ONRrXIOPmoxGkph/O8p/9FYXCWS4IDTaSBcVKjCxndVe5Yr27hUVcWh4F4Mc=@vger.kernel.org X-Gm-Message-State: AB4q+uEVyzOmWgtp2R271NYitpDx5/np/p4hc/vZjsuArLkxu5tquShU d8PvWE7ApnRXiCHKrnitElvq9WlLyQ8/vxng/ijpXLC2ZdyCODzdKGhhx+HNJsl4PCFM4mS0GuW Yyub05w== X-Received: from plbja12.prod.google.com ([2002:a17:902:efcc:b0:2ef:f5cd:c465]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:cece:b0:2df:b510:cebb with SMTP id d9443c01a7336-2f1ba05959bmr23831915ad.6.1796412131035; Fri, 04 Dec 2026 11:22:11 -0800 (PST) Date: Fri, 4 Dec 2026 11:22:10 -0800 In-Reply-To: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261013231728.883001-1-yosry@kernel.org> Message-ID: Subject: Re: [PATCH 0/4] KVM: x86/mmu: Don't sync cached roots created for a different MMU context From: Sean Christopherson To: Yosry Ahmed Cc: Paolo Bonzini , Jim Mattson , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 03, 2026, Yosry Ahmed wrote: > On Tue, Oct 13, 2026 at 4:17=E2=80=AFPM Yosry Ahmed wr= ote: > > > > When invalidating an address, KVM walks and syncs cached roots using th= e > > current MMU context, but cached roots may have been created for a > > different context after a nested transition. With TDP disabled, this > > lets a guest trigger a BUG_ON() and crash the host (see patch 3 for > > details). > > > > Patch 1 downgrades the BUG_ON() to a WARN_ON_ONCE(), patch 2 is prep > > work, patch 3 is the fix, and patch 4 drops a TODO that isn't worth > > pursuing. > > > > Sashiko flagged the issue while reviewing the INVLPGA emulation patch i= n > > my nested SVM TLB series [1]. The host crash is easy to reproduce with= an > > AI-generated repro (with TDP disabled), and no longer triggers with thi= s > > series. > > > > [1] https://lore.kernel.org/kvm/sashiko-outbox-163479@kernel.org/ > > > > Yosry Ahmed (4): > > KVM: x86/mmu: WARN, don't BUG, when walking a cached root with a PAE > > MMU > > KVM: x86/mmu: Drop for_each_shadow_entry_using_root() > > KVM: x86/mmu: Don't sync cached roots created for a different MMU > > context > > KVM: nVMX: Drop the TODO to sync only the affected SPTEs for INVVPID >=20 > Do I need to send a new version for this? No, just give me a comment for patch 1 I can squash.