kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
From: Ricardo Koller <ricarkol@google.com>
To: Shaoqin Huang <shahuang@redhat.com>
Cc: pbonzini@redhat.com, maz@kernel.org, oupton@google.com,
	yuzenghui@huawei.com, dmatlack@google.com, kvm@vger.kernel.org,
	kvmarm@lists.linux.dev, qperret@google.com,
	catalin.marinas@arm.com, andrew.jones@linux.dev,
	seanjc@google.com, alexandru.elisei@arm.com,
	suzuki.poulose@arm.com, eric.auger@redhat.com, gshan@redhat.com,
	reijiw@google.com, rananta@google.com, bgardon@google.com,
	ricarkol@gmail.com
Subject: Re: [PATCH v4 03/12] KVM: arm64: Add helper for creating unlinked stage2 subtrees
Date: Wed, 1 Mar 2023 12:10:42 -0800	[thread overview]
Message-ID: <Y/+xQjqzXStIiBmO@google.com> (raw)
In-Reply-To: <e62b4495-3e99-d3da-8fc3-e40246ccb498@redhat.com>

On Mon, Feb 20, 2023 at 02:35:46PM +0800, Shaoqin Huang wrote:
> Hi Ricardo,
> 
> On 2/18/23 11:23, Ricardo Koller wrote:
> > Add a stage2 helper, kvm_pgtable_stage2_create_unlinked(), for
> > creating unlinked tables (which is the opposite of
> > kvm_pgtable_stage2_free_unlinked()).  Creating an unlinked table is
> > useful for splitting PMD and PUD blocks into subtrees of PAGE_SIZE
> > PTEs.  For example, a PUD can be split into PAGE_SIZE PTEs by first
> > creating a fully populated tree, and then use it to replace the PUD in
> > a single step.  This will be used in a subsequent commit for eager
> > huge-page splitting (a dirty-logging optimization).
> > 
> > No functional change intended. This new function will be used in a
> > subsequent commit.
> > 
> > Signed-off-by: Ricardo Koller <ricarkol@google.com>
> > ---
> >   arch/arm64/include/asm/kvm_pgtable.h | 28 +++++++++++++++++
> >   arch/arm64/kvm/hyp/pgtable.c         | 46 ++++++++++++++++++++++++++++
> >   2 files changed, 74 insertions(+)
> > 
> > diff --git a/arch/arm64/include/asm/kvm_pgtable.h b/arch/arm64/include/asm/kvm_pgtable.h
> > index dcd3aafd3e6c..b8cde914cca9 100644
> > --- a/arch/arm64/include/asm/kvm_pgtable.h
> > +++ b/arch/arm64/include/asm/kvm_pgtable.h
> > @@ -460,6 +460,34 @@ void kvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt);
> >    */
> >   void kvm_pgtable_stage2_free_unlinked(struct kvm_pgtable_mm_ops *mm_ops, void *pgtable, u32 level);
> > +/**
> > + * kvm_pgtable_stage2_create_unlinked() - Create an unlinked stage-2 paging structure.
> > + * @pgt:	Page-table structure initialised by kvm_pgtable_stage2_init*().
> > + * @phys:	Physical address of the memory to map.
> > + * @level:	Starting level of the stage-2 paging structure to be created.
> > + * @prot:	Permissions and attributes for the mapping.
> > + * @mc:		Cache of pre-allocated and zeroed memory from which to allocate
> > + *		page-table pages.
> > + * @force_pte:  Force mappings to PAGE_SIZE granularity.
> > + *
> > + * Create an unlinked page-table tree under @new. If @force_pte is
> The @new parameter has been deleted, you should update the comments too.
> 
> Thanks,
> Shaoqin
>

Right. Sending a v5 in a bit.

Thanks,
Ricardo

  reply	other threads:[~2023-03-01 20:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-18  3:23 [PATCH v4 00/12] Implement Eager Page Splitting for ARM Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 01/12] KVM: arm64: Add KVM_PGTABLE_WALK ctx->flags for skipping BBM and CMO Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 02/12] KVM: arm64: Rename free_unlinked to free_removed Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 03/12] KVM: arm64: Add helper for creating unlinked stage2 subtrees Ricardo Koller
2023-02-20  6:35   ` Shaoqin Huang
2023-03-01 20:10     ` Ricardo Koller [this message]
2023-02-20  6:45   ` Shaoqin Huang
2023-02-18  3:23 ` [PATCH v4 04/12] KVM: arm64: Add kvm_pgtable_stage2_split() Ricardo Koller
2023-02-18  3:28   ` Ricardo Koller
2023-02-20  7:08     ` Shaoqin Huang
2023-03-01 20:09       ` Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 05/12] KVM: arm64: Refactor kvm_arch_commit_memory_region() Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 06/12] KVM: arm64: Add kvm_uninit_stage2_mmu() Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 07/12] KVM: arm64: Export kvm_are_all_memslots_empty() Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 08/12] KVM: arm64: Add KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 09/12] KVM: arm64: Split huge pages when dirty logging is enabled Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 10/12] KVM: arm64: Open-code kvm_mmu_write_protect_pt_masked() Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 11/12] KVM: arm64: Split huge pages during KVM_CLEAR_DIRTY_LOG Ricardo Koller
2023-02-18  3:23 ` [PATCH v4 12/12] KVM: arm64: Use local TLBI on permission relaxation Ricardo Koller

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=Y/+xQjqzXStIiBmO@google.com \
    --to=ricarkol@google.com \
    --cc=alexandru.elisei@arm.com \
    --cc=andrew.jones@linux.dev \
    --cc=bgardon@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=dmatlack@google.com \
    --cc=eric.auger@redhat.com \
    --cc=gshan@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oupton@google.com \
    --cc=pbonzini@redhat.com \
    --cc=qperret@google.com \
    --cc=rananta@google.com \
    --cc=reijiw@google.com \
    --cc=ricarkol@gmail.com \
    --cc=seanjc@google.com \
    --cc=shahuang@redhat.com \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.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).