mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoffer Dall <christoffer.dall@arm.com>
To: Punit Agrawal <punit.agrawal@arm.com>
Cc: Suzuki K Poulose <Suzuki.Poulose@arm.com>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org, marc.zyngier@arm.com,
	linux-kernel@vger.kernel.org,
	Russell King <linux@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH v2 2/4] KVM: arm/arm64: Introduce helpers to manupulate page table entries
Date: Fri, 4 May 2018 13:40:23 +0200	[thread overview]
Message-ID: <20180504114023.GF10191@C02W217FHV2R.local> (raw)
In-Reply-To: <871sevr0n8.fsf@e105922-lin.cambridge.arm.com>

On Tue, May 01, 2018 at 02:00:43PM +0100, Punit Agrawal wrote:
> Hi Suzuki,
> 
> Thanks for having a look.
> 
> Suzuki K Poulose <Suzuki.Poulose@arm.com> writes:
> 
> > On 01/05/18 11:26, Punit Agrawal wrote:
> >> Introduce helpers to abstract architectural handling of the conversion
> >> of pfn to page table entries and marking a PMD page table entry as a
> >> block entry.
> >>
> >> The helpers are introduced in preparation for supporting PUD hugepages
> >> at stage 2 - which are supported on arm64 but do not exist on arm.
> >
> > Punit,
> >
> > The change are fine by me. However, we usually do not define kvm_*
> > accessors for something which we know matches with the host variant.
> > i.e, PMD and PTE helpers, which are always present and we make use
> > of them directly. (see unmap_stage2_pmds for e.g)
> 
> In general, I agree - it makes sense to avoid duplication.
> 
> Having said that, the helpers here allow following a common pattern for
> handling the various page sizes - pte, pmd and pud - during stage 2
> fault handling (see patch 4).
> 
> As you've said you're OK with this change, I'd prefer to keep this patch
> but will drop it if any others reviewers are concerned about the
> duplication as well.

There are arguments for both keeping the kvm_ wrappers and not having
them.  I see no big harm or increase in complexity by keeping them
though.

Thanks,
-Christoffer

  reply	other threads:[~2018-05-04 11:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01 10:26 [PATCH v2 0/4] KVM: Support PUD hugepages at stage 2 Punit Agrawal
2018-05-01 10:26 ` [PATCH v2 1/4] KVM: arm/arm64: Share common code in user_mem_abort() Punit Agrawal
2018-05-04 11:38   ` Christoffer Dall
2018-05-04 16:22     ` Punit Agrawal
2018-05-01 10:26 ` [PATCH v2 2/4] KVM: arm/arm64: Introduce helpers to manupulate page table entries Punit Agrawal
2018-05-01 10:36   ` Suzuki K Poulose
2018-05-01 13:00     ` Punit Agrawal
2018-05-04 11:40       ` Christoffer Dall [this message]
2018-05-01 10:26 ` [PATCH v2 3/4] KVM: arm64: Support dirty page tracking for PUD hugepages Punit Agrawal
2018-05-01 10:26 ` [PATCH v2 4/4] KVM: arm64: Add support for PUD hugepages at stage 2 Punit Agrawal
2018-05-04 11:39   ` Christoffer Dall
2018-05-15 16:56   ` Catalin Marinas
2018-05-15 17:12     ` Punit Agrawal

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=20180504114023.GF10191@C02W217FHV2R.local \
    --to=christoffer.dall@arm.com \
    --cc=Suzuki.Poulose@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marc.zyngier@arm.com \
    --cc=punit.agrawal@arm.com \
    --cc=will.deacon@arm.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

all inboxes | Powered by JetHome®