]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: s390: Add alignment checks for hugepages
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Thu, 2 Apr 2026 15:01:31 +0000 (17:01 +0200)
committerClaudio Imbrenda <imbrenda@linux.ibm.com>
Tue, 7 Apr 2026 15:07:19 +0000 (17:07 +0200)
commit4204067f99820eda590ab99ae068463b4f930a33
tree137050f58ef136fab226d970e00459fb491ab995
parent6da4b1a4359b3ed5e7ee5e9a9751a9e483906409
KVM: s390: Add alignment checks for hugepages

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.

Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
arch/s390/kvm/faultin.c
arch/s390/kvm/gmap.c
arch/s390/kvm/gmap.h