Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16613068rwd; Mon, 26 Jun 2023 12:27:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7HySWLJsrZHHySf8vthMIayh4UiPiPPxekkRLTmmjTnrP2ettgEFwbhDFOEiuGOKk3htKJ X-Received: by 2002:aa7:ce01:0:b0:51b:c82a:e10a with SMTP id d1-20020aa7ce01000000b0051bc82ae10amr14884247edv.33.1687807669550; Mon, 26 Jun 2023 12:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687807669; cv=none; d=google.com; s=arc-20160816; b=tpti6HCLjpImlEKChF6s8YbwiipE6lNX3BVnhE6ccBGV62qfkfNmWqiAE4scxt4isC uxTAVSTCvNWrci1OL0db/UmWZXXZUyfBOceIF8SD3zhxz+/x7TI+DRL7jBs7tnY0DFSl k3ff8Y4QfRFKUYgqgiPqoNAZukmTHMVOMdrNWOUhuGN5150YJ9lXQ+voPzkXrYy/ag2m 6NZvz78XAsCk2dzKjQwLu21CN7AqEEZnwQd4gCWM21jiD+k67pshnWGq5TWPFD+LKEhv vXadhYWGmY1lWFB/nxDtegJcZFxcUvE4IXltBwi9hgttuS+7lUnSLGfyEbDH5oMapim0 P4Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:reply-to:dkim-signature; bh=DC1JUUoeIHOkdglYQmr1DfzfpGQE2uWlWtSL5MUhKa8=; fh=4e3puReJ7DjwMG6rJqHJp2nX/a/7QqKKhs1FjQcufg4=; b=XF+98XBJvnIB6ClCPb3VOgQqqqejhs09FzFPRzV3nAvDwVOERYfZU+zsalhoD2b8Cg +ixtWc3K8+N0pzBG0Kkxqt6ZUlRElz48DsAQwLFaDbsMTuP1RhHGsmeu0caZiRQWEX1M NaXqTGPw9636fUr84YiBKBOlmhmK0oZ7zJYQG/NC3cAbsEhmf+Vh0wjDXuTvG3uU2nk4 RUHO89TbivYazruj7RqfvkzhSnm6jqHt1fBIWXq1OjyLw7LOcWk42jSzVC5X6ujwF6Js qIQwzy540JDM1EiMgswWKHBvPROw/D6+h9gSBH9gik9juWvEEzuA/+6y9j7p3LQntr9W qDwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=xYtXcmWx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a056402114900b0051a2c8c1e4esi2937931edw.418.2023.06.26.12.27.22; Mon, 26 Jun 2023 12:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=xYtXcmWx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231739AbjFZSUy (ORCPT + 99 others); Mon, 26 Jun 2023 14:20:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231679AbjFZSUe (ORCPT ); Mon, 26 Jun 2023 14:20:34 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89BD510D7 for ; Mon, 26 Jun 2023 11:20:28 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-bd6df68105cso5081392276.2 for ; Mon, 26 Jun 2023 11:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687803627; x=1690395627; 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=DC1JUUoeIHOkdglYQmr1DfzfpGQE2uWlWtSL5MUhKa8=; b=xYtXcmWxk0P1fCDcWTRmRHQ213fqB4rQuiXjexvxKc69fWrbx+jG1hAwG0llCkpycZ vIxsx2SNm225hbYaBdJVqoTck9XSOJKHlXh8DXvyqKg1GDw5gd8l+hSpY9QBLAiV12RY rv75429GaSsLG1+mV89FXylyGQezn4c2bMvPj3UN87MBkxdRUBLLYdkdL6DAdn3RGg72 VAUFRTosn8/60fdz9qwFv3TJRj28bLsYQui4hfKh76McyD8vBN0+at6FZ+BkOw316Td+ oESmYoDPXCHZZNA1rzDVevcOJ+5+8ZFPleApgNlncNDFxrTYp6OUsyfuI65KKgKe+AdK ayrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687803627; x=1690395627; 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=DC1JUUoeIHOkdglYQmr1DfzfpGQE2uWlWtSL5MUhKa8=; b=jRPxCKFmkeKJ9T65hqU8oVDhCDo5RBP2DIdfzK0j+oAUnKYQn2IYw1Rd5fsuO2czeZ iO+lGRilTmHGR9GjOe7gVhnBg+dIM/FDyTrUcnKrMxBhVeyo9KDhbKNNCAfUXL3NU2FY 5luJzfWj7R2sSEzP33WwhzAd7o9/g9eYm6T+sfMqf3A0oxOuOFanC4PkLLRh4uZtlNGg zIQLe2IzCVi4j2h+LLwEVAzSnCHZJ3u4cdYY4YsnXPQNttatlKV2hDgftGmsZL04NDb2 Y5KBcZ2VpmtM4790j7Wrn1eVbBz1Xt8LjsSec1i10EkwJWgyRZX95oldW9Z7AXj9ERK4 Xdag== X-Gm-Message-State: AC+VfDw2Z4coUMeP7K/Iur1lg9M14ThdOcGg66rPEwLo+LYlHrRgBZsD ofNALnBH+FRELaoGc8rpVQ3dtC0ukfPu X-Received: from mizhang-super.c.googlers.com ([35.247.89.60]) (user=mizhang job=sendgmr) by 2002:a05:6902:18c4:b0:c1c:e037:136c with SMTP id ck4-20020a05690218c400b00c1ce037136cmr3172718ybb.0.1687803627815; Mon, 26 Jun 2023 11:20:27 -0700 (PDT) Reply-To: Mingwei Zhang Date: Mon, 26 Jun 2023 18:20:14 +0000 In-Reply-To: <20230626182016.4127366-1-mizhang@google.com> Mime-Version: 1.0 References: <20230626182016.4127366-1-mizhang@google.com> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog Message-ID: <20230626182016.4127366-5-mizhang@google.com> Subject: [PATCH v2 4/6] KVM: Documentation: Add the missing description for tdp_mmu_root_count into kvm_mmu_page From: Mingwei Zhang To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Mingwei Zhang , Kai Huang , Jim Mattson , David Matlack , Ben Gardon , Xu Yilun , Zhi Wang Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the description of tdp_mmu_root_count into kvm_mmu_page description. tdp_mmu_root_count is an atomic counter used only in TDP MMU. Its usage and meaning is slightly different with root_counter in shadow MMU. Update the doc. Signed-off-by: Mingwei Zhang --- Documentation/virt/kvm/x86/mmu.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/virt/kvm/x86/mmu.rst b/Documentation/virt/kvm/x86/mmu.rst index 5cd6cd5e8926..97d695207e11 100644 --- a/Documentation/virt/kvm/x86/mmu.rst +++ b/Documentation/virt/kvm/x86/mmu.rst @@ -231,6 +231,11 @@ Shadow pages contain the following information: A counter keeping track of how many hardware registers (guest cr3 or pdptrs) are now pointing at the page. While this counter is nonzero, the page cannot be destroyed. See role.invalid. + tdp_mmu_root_count: + An atomic reference counter in TDP MMU root page that allows for parallel + accesses. Accessing the page requires lifting the counter value. The + initial value is set to 2 indicating one reference from vCPU and one + from TDP MMU itself. Note this field is a union with root_count. parent_ptes: The reverse mapping for the pte/ptes pointing at this page's spt. If parent_ptes bit 0 is zero, only one spte points at this page and -- 2.41.0.162.gfafddb0af9-goog