Re: [V2 PATCH 3/6] KVM: selftests: x86: Add IS_ALIGNED/IS_PAGE_ALIGNED helpers

From: Vishal Annapurve
Date: Tue Jan 17 2023 - 18:54:55 EST


On Tue, Jan 17, 2023 at 1:48 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
> ...
> I certainly don't object to adding IS_PAGE_ALIGNED(), but it's not needed for
> this series. Verifying that KVM doesn't allow an unaligned page conversion during
> KVM_HC_MAP_GPA_RANGE belongs in a separate test+series, as that doesn't have a
> strict dependency on UPM.
>
> TL;DR: this patch can be dropped, for now at least.
>

Makes sense.

> > #define HUGEPAGE_SHIFT(x) (PAGE_SHIFT + (((x) - 1) * 9))
> > #define HUGEPAGE_SIZE(x) (1UL << HUGEPAGE_SHIFT(x))
> > --
> > 2.39.0.rc0.267.gcb52ba06e7-goog
> >