Re: [PATCH v3 2/6] KVM: s390: Add alignment checks for hugepages

From: Christoph Schlameuss

Date: Fri Apr 10 2026 - 05:15:43 EST


On Thu Apr 2, 2026 at 5:01 PM CEST, Claudio Imbrenda wrote:
> When backing a guest page with a large page, check that the alignment
> of the guest page matches the alignment of the host physical page
> backing it within the large page.
>
> Also check that the memslot is large enough to fit the large page.
>
> Those checks are currently not needed, because memslots are guaranteed
> to be 1m-aligned, but this will change.
>
> Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>

Reviewed-by: Christoph Schlameuss <schlameuss@xxxxxxxxxxxxx>

> ---
> arch/s390/kvm/faultin.c | 2 +-
> arch/s390/kvm/gmap.c | 32 ++++++++++++++++++++++++++------
> arch/s390/kvm/gmap.h | 3 ++-
> 3 files changed, 29 insertions(+), 8 deletions(-)