|
|
Log in / Subscribe / Register

KVM: s390: Add support for 2G hugepages

From:  Claudio Imbrenda <imbrenda-AT-linux.ibm.com>
To:  linux-kernel-AT-vger.kernel.org
Subject:  [PATCH v2 0/4] KVM: s390: Add support for 2G hugepages
Date:  Tue, 09 Jun 2026 17:09:26 +0200
Message-ID:  <20260609150930.665370-1-imbrenda@linux.ibm.com>
Cc:  kvm-AT-vger.kernel.org, linux-s390-AT-vger.kernel.org, borntraeger-AT-de.ibm.com, frankja-AT-linux.ibm.com, david-AT-kernel.org, seiden-AT-linux.ibm.com, nrb-AT-linux.ibm.com, schlameuss-AT-linux.ibm.com, gra-AT-linux.ibm.com
Archive-link:  Article

Add support for 2G hugepages.

In theory, since kernel 7.0, userspace could already use 2G hugepages
to back guest memory, but KVM would use 4k or 1M pages in gmap to
actually map the guest.

This series allows KVM on s390 to actually use 2G hugepages in gmap to
map guest memory that is backed by 2G hugepages in userspace.

Nested guests remain possible.

v1->v2:
* Fix possible race between clearing the GMAP_FLAG_ALLOW_HPAGE_2G flag
  and gmap_split_huge_pages().
* Add documentation for the KVM_CAP_S390_HPAGE_2G capability.


Claudio Imbrenda (4):
  KVM: s390: Add module parameter to fence 2G hugepages
  KVM: s390: Add capability to support 2G hugepages
  KVM: s390: Allow for 2G hugepages
  KVM: s390: Document the KVM_CAP_S390_HPAGE_2G capability

 Documentation/virt/kvm/api.rst | 15 ++++++++++++++
 arch/s390/kvm/gmap.c           | 24 ++++++++++++++++++++-
 arch/s390/kvm/kvm-s390.c       | 38 +++++++++++++++++++++++++++++++++-
 arch/s390/kvm/pv.c             |  5 ++++-
 include/uapi/linux/kvm.h       |  1 +
 5 files changed, 80 insertions(+), 3 deletions(-)

-- 
2.54.0




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds