Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7913432rdb; Thu, 4 Jan 2024 11:34:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IER97YBTqQBja8vrh8JRCl7a8uQI35WJPLYJkQiqtvGaNBG+t3aoMG02B19RLW+IQkSg2MM X-Received: by 2002:a50:9984:0:b0:554:bc9e:4c60 with SMTP id m4-20020a509984000000b00554bc9e4c60mr776280edb.52.1704396898419; Thu, 04 Jan 2024 11:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704396898; cv=none; d=google.com; s=arc-20160816; b=VYSivnAO8dWYrk1B1XQVJ9qRqcl3wWoqA7JZ2x8yg8+SS1rRjt1buTSO0druyeF63B hA7B1EKtt1jR87tk8MKtIn+fc8dP1n5J8swy8epPlFzy+DPBe1OsaRYUaPLu+hkWviyS iJMyRLY5iB8WZQl93FJani/M7jkezxB2EHloeDG7l42ifwSvGKraHCglPuv/WpFmmX8g MyripG0x+ue3DOJzCYNWoxPQTXYtxDLctkrL5ueu0SmYTXRrlMrs61LmN9vqn8XJpnz3 ND+qEWtp+N65xP12J6bCNwxC4EBHBL7Po4rUMqHTVJMTnu4kzkC0Ikl+qLi+LDedRPsL 0pTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :reply-to:dkim-signature; bh=qZ35PN1q0iHckVfOzQt0Lv822iNpMobObRVnp2fKDjw=; fh=dogxdQWc7Q2U5Ekp9F18wEHwMgE3kRwQ/60KgTj3654=; b=lV0AbN44RXiKoKjWs6l3k4THynPshfdxXTgenzXs04z2/PDUE6aAluO42z5cF63AoS 1PJ4wcsvLYxigTdf6TRBWZ6nQQHT2kUrNPzqCRrFF0ylec5K39BAsJH0VokN/srlLIHA 9IqViIGUgJaEoTmvHwy6/iaXXS/0iQE64viqzSup5WVYwY3qwkv7sBBfxEAxB5QfaYiv Ch+gzEwpzOib617+eBmR53pIQTV6VGnLiq2hgunhec8rFufklVGHr3NtEd3iKTSPAFk3 XBL+3V1hFmSemzKKGJY7BPpm7ChSBYFOvHW0JJeYXtYTTcYMc433PtbPHeOnP0ivHRlT x6Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="YfF/ayWH"; spf=pass (google.com: domain of linux-kernel+bounces-17166-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17166-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i17-20020a05640242d100b005537f13832fsi38170edc.587.2024.01.04.11.34.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 11:34:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17166-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="YfF/ayWH"; spf=pass (google.com: domain of linux-kernel+bounces-17166-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17166-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EC3411F25880 for ; Thu, 4 Jan 2024 19:34:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 828172D78D; Thu, 4 Jan 2024 19:33:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="YfF/ayWH" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (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 8C2882D606 for ; Thu, 4 Jan 2024 19:33:17 +0000 (UTC) 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 Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-5c659339436so484009a12.2 for ; Thu, 04 Jan 2024 11:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704396797; x=1705001597; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=qZ35PN1q0iHckVfOzQt0Lv822iNpMobObRVnp2fKDjw=; b=YfF/ayWHN/NrlItWHhH0FTRZyhrRHiPytRG+758ReyXVHcRhBEPWX3YiYMRHaCwaKS lw7VNm6T2U4al//R1kJ0nCRqKnCet4sF/GIGmTN7fB5GYsRE6Ypfww8IMD/EPofjP37i ws2cq1zq1oJ6UGSJhR4mileBrNC4WmsSK8eC7Nbrrfn7VyYcPxlnLobEonxbiw3WH4g4 Q4PoLBhJYYGoO8Ik3Monqcis7InePQCe+xlw3EUyxK/ST6k8antfrqUVaIMSWcmG2cxI VuU14m8Uw7X3nhUMwAE7JqwOAbXYzCB6gY55O9ZXr03MA1+BrQZyUQQoMeZTVADdDhYF 0xJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704396797; x=1705001597; h=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; bh=qZ35PN1q0iHckVfOzQt0Lv822iNpMobObRVnp2fKDjw=; b=fOJr46B9otRFfmHaGM7tmuZwdwr+PEakfVvE63Lxi5JCkQWQc4yX/VEBzj+YRLP2OV 8RoannXy5ADKE0Oz2br0eVxLk2ad/xGHoSRmiMCw4lv7OsGsJRSXhWoOcNLHBF169qkR oCC17FT1hHNCLjxXP4t6gR45EJCwwAaEAGNRfQwW80owFBqkKGTv97o89ZN7qMMe9+1u IVsuj39ts0IR9FrILtxJYaIkKPEm0isCYHA6H0tC2zZ7vpoLmndSN2CMxH1sQWhYrEgz LNAvamQwGErC5FHUPX1OZWLio2cB9J5USQi/A/WEJUKS68rvodEA4hdfkts6dexuHEEH PI5g== X-Gm-Message-State: AOJu0Yx1enGAhHjvjkPYEkVp6D6CMzYRE3Qfu8dJUvRNdGBr3wXlVvE1 dOBfTvqjmDOHOhupU7xIVzM19wJTTnecJ1hzdg== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6a02:692:b0:5ce:d4a7:b8f2 with SMTP id ca18-20020a056a02069200b005ced4a7b8f2mr12821pgb.10.1704396796866; Thu, 04 Jan 2024 11:33:16 -0800 (PST) Reply-To: Sean Christopherson Date: Thu, 4 Jan 2024 11:33:00 -0800 In-Reply-To: <20240104193303.3175844-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: <20240104193303.3175844-1-seanjc@google.com> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog Message-ID: <20240104193303.3175844-6-seanjc@google.com> Subject: [GIT PULL] KVM: x86: MMU changes for 6.8 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 minor fixes from David, plus your series to clean up the "bool shared" mess. The following changes since commit e9e60c82fe391d04db55a91c733df4a017c28b2f: selftests/kvm: fix compilation on non-x86_64 platforms (2023-11-21 11:58:25 -0500) are available in the Git repository at: https://github.com/kvm-x86/linux.git tags/kvm-x86-mmu-6.8 for you to fetch changes up to e59f75de4e501e87de7743fec29dd247a6ae6cd3: KVM: x86/mmu: fix comment about mmu_unsync_pages_lock (2023-12-01 07:52:09 -0800) ---------------------------------------------------------------- KVM x86 MMU changes for 6.8: - Fix a relatively benign off-by-one error when splitting huge pages during CLEAR_DIRTY_LOG. - Fix a bug where KVM could incorrectly test-and-clear dirty bits in non-leaf TDP MMU SPTEs if a racing thread replaces a huge SPTE with a non-huge SPTE. - Relax the TDP MMU's lockdep assertions related to holding mmu_lock for read versus write so that KVM doesn't pass "bool shared" all over the place just to have precise assertions in paths that don't actually care about whether the caller is a reader or a writer. ---------------------------------------------------------------- David Matlack (2): KVM: x86/mmu: Fix off-by-1 when splitting huge pages during CLEAR KVM: x86/mmu: Check for leaf SPTE when clearing dirty bit in the TDP MMU Paolo Bonzini (4): KVM: x86/mmu: remove unnecessary "bool shared" argument from functions KVM: x86/mmu: remove unnecessary "bool shared" argument from iterators KVM: x86/mmu: always take tdp_mmu_pages_lock KVM: x86/mmu: fix comment about mmu_unsync_pages_lock Documentation/virt/kvm/locking.rst | 7 ++- arch/x86/include/asm/kvm_host.h | 11 +++-- arch/x86/kvm/mmu/mmu.c | 8 ++-- arch/x86/kvm/mmu/tdp_mmu.c | 95 +++++++++++++++++--------------------- arch/x86/kvm/mmu/tdp_mmu.h | 3 +- 5 files changed, 57 insertions(+), 67 deletions(-)