Skip to content

KVM: s390: Enable 4k granularity for memslots

Claudio Imbrenda kvm linux-s390 lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 17 repliesIn review
  2. v25 patches 0 repliesSuperseded

Changes in v3 from the cover letter

* Remove more 1M-alignment #ifdefs in the kvm selftests.
* Do not remove the common tests from loongarch, since loongarch does not include the common tests by default.
* Opportunistically fix a potential NULL pointer dereference when memslots for UCONTROL guests are attempted to be removed (does not actually happen in practice).

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6KVM: s390: Add some useful mask macrosarch/s390/kvm/dat.h arch/s390/kvm/gaccess.c+6 -12 replies
2/6KVM: s390: Add alignment checks for hugepagesarch/s390/kvm/faultin.c arch/s390/kvm/gmap.c arch/s390/kvm/gmap.h+29 -82 replies
3/6KVM: s390: Allow 4k granularity for memslotsarch/s390/kvm/kvm-s390.c+6 -142 replies
4/6KVM: selftests: Remove 1M alignment requirement for s390tools/testing/selftests/kvm/dirty_log_test.c tools/testing/selftests/kvm/include/kvm_util.h tools/testing/selftests/kvm/kvm_page_table_test.c +4 more+2 -342 replies
5/6KVM: s390: selftests: enable some common memory-related teststools/testing/selftests/kvm/Makefile.kvm+3 -66 replies
6/6KVM: s390: ucontrol: Fix memslot handlingarch/s390/kvm/kvm-s390.c+1 -13 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchChristian BorntraegerSteffen EidenChristoph Schlameuss
1/6R-b R-b
2/6R-b R-b
3/6R-b R-b R-b
4/6R-b R-b
5/6R-b R-b
6/6R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/6] KVM: s390: Enable 4k granularity for memslots

Currently the memslot granularity for s390 VMs is 1M. Both the s390 core architecture and virtio-mem only support a 1M granularity for guest memory.

Notwithstanding the official architectural limits, it can be beneficial to support memslots with 4k granularity. With the new gmap code, this is a quite simple change. This allows us to enable more existing selftests and makes KVM on s390 more future proof.

v2->v3
* Remove more 1M-alignment #ifdefs in the kvm selftests.
* Do not remove the common tests from loongarch, since loongarch does not include the common tests by default.
* Opportunistically fix a potential NULL pointer dereference when memslots for UCONTROL guests are attempted to be removed (does not actually happen in practice).

v1->v2
* Fixed the first patch (thanks Christian)

Claudio Imbrenda (6):
KVM: s390: Add some useful mask macros
KVM: s390: Add alignment checks for hugepages
KVM: s390: Allow 4k granularity for memslots
KVM: selftests: Remove 1M alignment requirement for s390
KVM: s390: selftests: enable some common memory-related tests
KVM: s390: ucontrol: Fix memslot handling

 arch/s390/kvm/dat.h                           |  5 +++
 arch/s390/kvm/faultin.c                       |  2 +-
 arch/s390/kvm/gaccess.c                       |  2 +-
 arch/s390/kvm/gmap.c                          | 32 +++++++++++++++----
 arch/s390/kvm/gmap.h                          |  3 +-
 arch/s390/kvm/kvm-s390.c                      | 22 ++++---------
 tools/testing/selftests/kvm/Makefile.kvm      |  9 ++----
 tools/testing/selftests/kvm/dirty_log_test.c  |  3 --
 .../testing/selftests/kvm/include/kvm_util.h  |  4 ---
 .../selftests/kvm/kvm_page_table_test.c       |  3 --
 tools/testing/selftests/kvm/lib/kvm_util.c    |  9 +-----
 tools/testing/selftests/kvm/lib/memstress.c   |  4 ---
 .../selftests/kvm/pre_fault_memory_test.c     |  4 ---
 .../selftests/kvm/set_memory_region_test.c    |  9 +-----
 14 files changed, 47 insertions(+), 64 deletions(-)
Signature · 1 line
2.53.0