Message ID | 20230618000856.1714902-6-mizhang@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2219667vqr; Sat, 17 Jun 2023 17:13:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tibP7v9pB/oA/wDmeWZwLCEytXzpBSC6R2jOZrXt9KaRggEfn7qMWnYnqt0Gqyv7ZBLQg X-Received: by 2002:a9d:620d:0:b0:6b4:55ae:a97e with SMTP id g13-20020a9d620d000000b006b455aea97emr3329794otj.36.1687047203142; Sat, 17 Jun 2023 17:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687047203; cv=none; d=google.com; s=arc-20160816; b=DmEie43cVqRSK/odJLRo2Vq0xaQ71gSqErd3IXAcQ89Regj306/CtCx38yszkFxkbm Uj2ASOfbrrKSeANyUcbKq2XPGEMvvhNHzWLS34EAXt1cZiy/Tl9ptc8g7VkT0zanHqXV NM066L7hxGEJd0lIejALjTkv3vvsRQXkMIjV2wtJW+lQyDFydmg2tBI0l8in7b+SNfmb Kv71n9HqGd4WNMEUhTO6YiSZ5nZL42Fb3gb6sKifct8xJyhN0kvgP+9wg4EXp5o6Ymp0 Ojijq8G8DdBt8/Z5hMQdi4WaQw4qUWPlboV57vXireaVvyZwxHJATKB80VrWA7haZ3w1 Olyg== 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=kxL2IQh8QsyzT6M8Esvdn0S5tsYGjEEcYbokMBIJOOA=; b=qDTqDldocuraoX2JpG6EPxi113jetwyQQ/MY2s6qHC1sLMVW8TXPtE9ETZMF3cSmkw ekCpd1mYQtg4jnqCBbW9ekCTaLRAtiaw6+eUYmwLjMYFJs68ulaf8AEdtbOQVEGg7U4V MyH8+Ak2Koup+qof8jJ2YoAQETxvog3gmGv/ms0k3I8l5eDWiI7g0y385165vl4Yg2HP 41GgRHjbFl8AQrbQZc+fXicqxfG1pjiRLjQuR4iwXckBK3mWhYECg6ancQOtmIccr/eK frtXgCp90NUBpAq6mqjolXBOXZ8TjrO7v00MUgPMta2jtoKtzL9Wwd0gy8isOEXkBEM9 xikg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="zAN4yl/y"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c30-20020a056a00009e00b00646df7a783bsi4147671pfj.118.2023.06.17.17.13.08; Sat, 17 Jun 2023 17:13:23 -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="zAN4yl/y"; 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 S234580AbjFRAJa (ORCPT <rfc822;duw91626@gmail.com> + 99 others); Sat, 17 Jun 2023 20:09:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229668AbjFRAJW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 17 Jun 2023 20:09:22 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E1521715 for <linux-kernel@vger.kernel.org>; Sat, 17 Jun 2023 17:09:21 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id 98e67ed59e1d1-25e89d51bf2so954846a91.0 for <linux-kernel@vger.kernel.org>; Sat, 17 Jun 2023 17:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687046960; x=1689638960; 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=kxL2IQh8QsyzT6M8Esvdn0S5tsYGjEEcYbokMBIJOOA=; b=zAN4yl/yAf39StZnUGptrfSOQsv6LlI7o2HkFCAMqcoRQjjCgZ3r19ALi5wJn9JDPy u6bIXwRmOwOC838v8rtUVWtWyBTAhG48OwwangQhrI26phyUC36Mvw7FPmof3d4i8thI HskS9RE2wxly89AwCkzpOj3R7prtSydMxkqZ+ZJoQqCLhsVvoRJvCeU+kw56/h1Tq95V 7xTx0H2mqfVUQNCwvin9J+4qUr0oZUX9SHG46zY+WPcusQv2dEzJTLeI1M/Uezu0MucY L0UArTP0fH+mSE7lERHIcQo2OODhzgmX1Azw0C2c/LZKL+qteyd4lSCgMSMmgLFAuRQz TPMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687046960; x=1689638960; 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=kxL2IQh8QsyzT6M8Esvdn0S5tsYGjEEcYbokMBIJOOA=; b=e8V4GWiODzNCxvtIYfHozOaCNaSunfr9yFN6YT+EIOu59SkObewqDsR7vc81lzxdue 4hnTnUW86mbYRB0PFAJgRrKqTUVGtJ9Js/Tzy7R77jkCB5t/CdMyKMWvN9kkkdACuYkU Woil14VVURJ2yig/c7UTGO0BL30ztjdGYQPUpD+rlvBGqyzRcs1jgEie7iFz3ljungxv BgDJvojlzH2VDVcTsvwIoT2MayuXYXAkTUSIMBeGLuVktEpaHAlmzkic+OYQS9X50yl5 /XFbBCcNsOvrNzbd27cOKfykGwSJJNc43mn1JYITIoOj4UlK1iEm27xQDfP9w/SF9HKd lt2A== X-Gm-Message-State: AC+VfDwvTpihndxAD6OIIpZIOopQNPKsggGblthVZI+yMNMM7Dt97JO5 29cumViPryLj1sXFAjlrLcZWrPKR0Sgv X-Received: from mizhang-super.c.googlers.com ([35.247.89.60]) (user=mizhang job=sendgmr) by 2002:a05:6a00:1a15:b0:654:8eb9:4607 with SMTP id g21-20020a056a001a1500b006548eb94607mr1818385pfv.4.1687046960661; Sat, 17 Jun 2023 17:09:20 -0700 (PDT) Reply-To: Mingwei Zhang <mizhang@google.com> Date: Sun, 18 Jun 2023 00:08:55 +0000 In-Reply-To: <20230618000856.1714902-1-mizhang@google.com> Mime-Version: 1.0 References: <20230618000856.1714902-1-mizhang@google.com> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog Message-ID: <20230618000856.1714902-6-mizhang@google.com> Subject: [PATCH 5/6] KVM: Documentation: Add the missing mmu_valid_gen into kvm_mmu_page From: Mingwei Zhang <mizhang@google.com> To: Sean Christopherson <seanjc@google.com>, Paolo Bonzini <pbonzini@redhat.com> Cc: kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Mingwei Zhang <mizhang@google.com>, Jim Mattson <jmattson@google.com>, David Matlack <dmatlack@google.com>, Ben Gardon <bgardon@google.com> 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=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768997207883005383?= X-GMAIL-MSGID: =?utf-8?q?1768997207883005383?= |
Series |
KVM: Documentation: Update document description for kvm_mmu_page and kvm_mmu_page_role
|
|
Commit Message
Mingwei Zhang
June 18, 2023, 12:08 a.m. UTC
Add mmu_valid_gen into kvm_mmu_page description. mmu_valid_gen is used in
shadow MMU for fast zapping. Update the doc to reflect that.
Signed-off-by: Mingwei Zhang <mizhang@google.com>
---
Documentation/virt/kvm/x86/mmu.rst | 4 ++++
1 file changed, 4 insertions(+)
Comments
On Sun, 2023-06-18 at 00:08 +0000, Mingwei Zhang wrote: > Add mmu_valid_gen into kvm_mmu_page description. mmu_valid_gen is used in > shadow MMU for fast zapping. Update the doc to reflect that. > > Signed-off-by: Mingwei Zhang <mizhang@google.com> > --- > Documentation/virt/kvm/x86/mmu.rst | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/virt/kvm/x86/mmu.rst b/Documentation/virt/kvm/x86/mmu.rst > index 3dce2426ad6d..0dbdb7fb8cc6 100644 > --- a/Documentation/virt/kvm/x86/mmu.rst > +++ b/Documentation/virt/kvm/x86/mmu.rst > @@ -208,6 +208,10 @@ Shadow pages contain the following information: > The page is not backed by a guest page table, but its first entry > points to one. This is set if NPT uses 5-level page tables (host > CR4.LA57=1) and is shadowing L1's 4-level NPT (L1 CR4.LA57=1). > + mmu_valid_gen: > + Used by comparing against kvm->arch.mmu_valid_gen to check whether the > + shadow page is obsolete thus a convenient variable for fast zapping. > + Note that TDP MMU does not use mmu_valid_gen. > gfn: > Either the guest page table containing the translations shadowed by this > page, or the base page frame for linear translations. See role.direct. Reviewed-by: Kai Huang <kai.huang@intel.com>
diff --git a/Documentation/virt/kvm/x86/mmu.rst b/Documentation/virt/kvm/x86/mmu.rst index 3dce2426ad6d..0dbdb7fb8cc6 100644 --- a/Documentation/virt/kvm/x86/mmu.rst +++ b/Documentation/virt/kvm/x86/mmu.rst @@ -208,6 +208,10 @@ Shadow pages contain the following information: The page is not backed by a guest page table, but its first entry points to one. This is set if NPT uses 5-level page tables (host CR4.LA57=1) and is shadowing L1's 4-level NPT (L1 CR4.LA57=1). + mmu_valid_gen: + Used by comparing against kvm->arch.mmu_valid_gen to check whether the + shadow page is obsolete thus a convenient variable for fast zapping. + Note that TDP MMU does not use mmu_valid_gen. gfn: Either the guest page table containing the translations shadowed by this page, or the base page frame for linear translations. See role.direct.