From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
yan.y.zhao@intel.com, isaku.yamahata@intel.com,
binbin.wu@linux.intel.com, rick.p.edgecombe@intel.com
Subject: Re: [PATCH v6 08/18] KVM: x86/mmu: Support GFN direct bits
Date: Fri, 17 Jan 2025 17:03:20 -0800 [thread overview]
Message-ID: <Z4r92AG5zhYvYWvs@google.com> (raw)
In-Reply-To: <20241222193445.349800-9-pbonzini@redhat.com>
On Sun, Dec 22, 2024, Paolo Bonzini wrote:
> Since TDX only needs to shift the mapping like this for the shared bit,
> which is mapped as the normal TDP root, add a "gfn_direct_bits" field to
> the kvm_arch structure for each VM with a default value of 0. It will
> have the bit set at the position of the GPA shared bit in GFN through TD
> specific initialization code. Keep TDX specific concepts out of the MMU
> code by not naming it "shared".
...
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index cae88f023caf..95f2b0890a58 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -1542,6 +1542,8 @@ struct kvm_arch {
> */
> #define SPLIT_DESC_CACHE_MIN_NR_OBJECTS (SPTE_ENT_PER_PAGE + 1)
> struct kvm_mmu_memory_cache split_desc_cache;
> +
Not urgent, i.e. shouldn't hold up anything, but can someone add a comment here
to explain what "direct" means? I know all of the concepts and code in play,
and I still don't really know what "direct" means in this context. I doubt
others will fair much better :-)
> + gfn_t gfn_direct_bits;
> };
next prev parent reply other threads:[~2025-01-18 1:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-22 19:34 [PATCH v6 00/18] TDX MMU prep series part 1 Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 01/18] KVM: x86/mmu: Zap invalid roots with mmu_lock held for write at uninit Paolo Bonzini
2024-12-23 7:58 ` Yan Zhao
2024-12-22 19:34 ` [PATCH v6 02/18] KVM: Add member to struct kvm_gfn_range to indicate private/shared Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 03/18] KVM: x86: Add a VM type define for TDX Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 04/18] KVM: x86/mmu: Add an external pointer to struct kvm_mmu_page Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 05/18] KVM: x86/mmu: Add an is_mirror member for union kvm_mmu_page_role Paolo Bonzini
2024-12-23 11:23 ` Yan Zhao
2024-12-22 19:34 ` [PATCH v6 06/18] KVM: x86/mmu: Make kvm_tdp_mmu_alloc_root() return void Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 07/18] KVM: x86/tdp_mmu: Take struct kvm in iter loops Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 08/18] KVM: x86/mmu: Support GFN direct bits Paolo Bonzini
2025-01-18 1:03 ` Sean Christopherson [this message]
2024-12-22 19:34 ` [PATCH v6 09/18] KVM: x86/tdp_mmu: Extract root invalid check from tdx_mmu_next_root() Paolo Bonzini
2025-01-18 1:05 ` Sean Christopherson
2025-01-22 18:20 ` Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 10/18] KVM: x86/tdp_mmu: Introduce KVM MMU root types to specify page table type Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 11/18] KVM: x86/tdp_mmu: Take root in tdp_mmu_for_each_pte() Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 12/18] KVM: x86/tdp_mmu: Support mirror root for TDP MMU Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 13/18] KVM: x86/tdp_mmu: Propagate attr_filter to MMU notifier callbacks Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 14/18] KVM: x86/tdp_mmu: Propagate building mirror page tables Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 15/18] KVM: x86/tdp_mmu: Propagate tearing down " Paolo Bonzini
2025-01-18 1:09 ` Sean Christopherson
2024-12-22 19:34 ` [PATCH v6 16/18] KVM: x86/tdp_mmu: Take root types for kvm_tdp_mmu_invalidate_all_roots() Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 17/18] KVM: x86/tdp_mmu: Don't zap valid mirror roots in kvm_tdp_mmu_zap_all() Paolo Bonzini
2024-12-22 19:34 ` [PATCH v6 18/18] KVM: x86/mmu: Prevent aliased memslot GFNs Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z4r92AG5zhYvYWvs@google.com \
--to=seanjc@google.com \
--cc=binbin.wu@linux.intel.com \
--cc=isaku.yamahata@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=yan.y.zhao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).