From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (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 C635D40863F for ; Wed, 12 Aug 2026 21:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786570338; cv=none; b=ZFe3s6AV3PFCCqlUPwR18UfttkrYEiGWRgBjDYN4NrE9AT94Lp+ohHzyJMnRX0DnqJrbRPLhHJkjqb/DFtjAhd8Dkyxk2/1gWr5zW2fFCqqr4QRFRy+n7N43UJh5tiOtmnk/gz6cU69zn8wQe32Fc95D7T8MASdCELAoMsD1ido= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786570338; c=relaxed/simple; bh=ylcaWb4pIEbR23ZdlLhwm8VMl+24KioGkoOEx84Mtfk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=PO/CPJ/WQglvUL+L0yZvyDXwdxISFxM4VbGS5W01eoC+mItnH35QAjbIlCvx5QxYA6AFG0Bas93+5QkrR2CpWUAxnjMBIoG72TePhJAipucWQKwQ3ypml97sYgKx3kckJVKkn6Bwzv10/so3A+dducQfzgaohyM4pYQey9ryse0= 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=GZoR5hdv; arc=none smtp.client-ip=209.85.216.70 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="GZoR5hdv" Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-38e1118e4abso160219a91.0 for ; Wed, 12 Aug 2026 14:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1786570335; x=1787175135; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:reply-to:from:to:cc:subject:date:message-id :reply-to:content-type; bh=X7o1gTaJ70kPDKsVaJGjUbRIL4z0HeVAXl6OlfOxtPw=; b=GZoR5hdvCRDZLZ3Ec5zH+27HI6y1A2+t/LZfksGSsirVq3dga+KZxzClF0Hf60DNTp gW5qBRPmKVs4+7cwjZCmBC6UgHTgMg71d0rKoOiXepu8ljt2agPQycZtBRTjVapxIXVp 4gA8/HsIX9hlJCblRdL6FUhPiclLnbwRQMeXBoUteSxiIi7U6C3AfWNlTfkTsvQLJxDX AM+r1uQ9LAhYV2KL5DqDCVBV+pNMI3F0ltb8FJKwceZW+JOqMp447bGf45tT1eXIXxb/ yUDonLQdUEO1iyX1xVPUF80ZMnVb14Ckw9pTaaPhZW0qLXiI15yXkoyh2wjU025J5zEi MNNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786570335; x=1787175135; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:reply-to:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=X7o1gTaJ70kPDKsVaJGjUbRIL4z0HeVAXl6OlfOxtPw=; b=oGGpd/wiwMsaUpg7/tqtE4JRpvu+dXT0xB925LysRT30tFoSZ3YZMFcsXnz54p2eNV w6WzH2Nfhvs5AMcbU5pv92NEZGLNUOhP2ItUxmwM/Dji5UNcNyc0SubFrTp3nKveaBzU g6YAN/wQR6CgeLutuDvQv3tORMfp7dxk5K1+3qcl0Jymw/1H0D9uJAxM9JwNAvTchgEX khCGopSOiMbLBQu7dgC151ypi8Po5JYn5b7VRdK9Are6WpF77NeDFM2CUJ89MeFGpas4 zxRYDyLS/9qGib+zh7pMYhQQZxx6BN/1alR3gGgBuRpQlR7nVhu5DEXXBANkX9aC03jE Lw0A== X-Forwarded-Encrypted: i=1; AHgh+RroRHaBynsjptnr39ArgLu8CHEhl89S4X5QEVV3wXHFTg5du6/PGGTkTlxGajVHBW5yjhhkVT/Bb95XH/U=@vger.kernel.org X-Gm-Message-State: AOJu0Yz/uCFo9fCyoWyomxkCw+2H+2rNI71yFiUvzITAhTfOhaKRItJD uvQtKa8/uJWpCHhCNu9cZ7tfzRvrAA67/u1xIsQSNSNeawcEp8mn3XHK5rjGNmrKp+/qUcKvq7S xI/t0Nw== X-Received: from pjhk3.prod.google.com ([2002:a17:90a:4c83:b0:381:5fcd:c992]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3947:b0:393:1cf4:d972 with SMTP id 98e67ed59e1d1-3931dfd3b39mr1565661a91.3.1786570334949; Wed, 12 Aug 2026 14:32:14 -0700 (PDT) Reply-To: Sean Christopherson Date: Wed, 12 Aug 2026 14:32:01 -0700 In-Reply-To: <20260812213206.1564354-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260812213206.1564354-1-seanjc@google.com> X-Mailer: git-send-email 2.55.0.691.gc56d675ccc-goog Message-ID: <20260812213206.1564354-7-seanjc@google.com> Subject: [GIT PULL] KVM: x86: MMU changes for 7.3 From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson Content-Type: text/plain; charset="UTF-8" Two fixes for bugs in the lockless aging code, plus a related hardening in the same code. The following changes since commit a204badd8432f93b7e862e7dac6db0fe3d65f370: Merge branch 'kvm-chainsaw' into HEAD (2026-06-25 11:32:09 +0200) are available in the Git repository at: https://github.com/kvm-x86/linux.git tags/kvm-x86-mmu-7.3 for you to fetch changes up to fb25ee778aae357da2c1a8dc1d240b6061482454: KVM: x86/mmu: Use CMPXCHG when clearing Accessed bit in the shadow MMU (2026-07-29 05:44:24 -0700) ---------------------------------------------------------------- KVM x86 MMU changes for 7.3 - Fix a bug where KVM would walk a newly created rmap without holding the rmap lock (or mmu_lock) during aging. - Fix a bug where aging TDP MMU SPTEs could clobber FROZEN SPTEs. ---------------------------------------------------------------- Phil Rosenthal (1): KVM: x86/mmu: Consume the locked rmap value in the lockless rmap walk Sean Christopherson (2): KVM: x86/mmu: Use CMPXCHG when clearing Accessed bit in TDP MMU KVM: x86/mmu: Use CMPXCHG when clearing Accessed bit in the shadow MMU arch/x86/kvm/mmu/mmu.c | 58 +++++++++++++++++++++++++-------------------- arch/x86/kvm/mmu/tdp_iter.h | 7 ++++++ arch/x86/kvm/mmu/tdp_mmu.c | 20 +++++++--------- 3 files changed, 48 insertions(+), 37 deletions(-)