[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180504114023.GF10191@C02W217FHV2R.local>
Date: Fri, 4 May 2018 13:40:23 +0200
From: Christoffer Dall <christoffer.dall@....com>
To: Punit Agrawal <punit.agrawal@....com>
Cc: Suzuki K Poulose <Suzuki.Poulose@....com>,
kvmarm@...ts.cs.columbia.edu, linux-arm-kernel@...ts.infradead.org,
marc.zyngier@....com, linux-kernel@...r.kernel.org,
Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>
Subject: Re: [PATCH v2 2/4] KVM: arm/arm64: Introduce helpers to manupulate
page table entries
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@....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
Powered by blists - more mailing lists