Skip to content

KVM: s390: Implement KVM_PRE_FAULT_MEMORY

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyIn review
  2. v25 patches 1 replySuperseded
  3. v14 patches 2 repliesSuperseded

Changes in v3 from the cover letter

* Fix typos
* Correctly indicate page size in gmap_handle_minor_crste_fault() also in case nothing needed to be done.
* Pick up and acked-by

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: s390: Track page size in struct guest_faultarch/s390/kvm/dat.h arch/s390/kvm/gmap.c+3 -00 replies
2/5KVM: s390: Implement KVM_PRE_FAULT_MEMORYarch/s390/kvm/Kconfig arch/s390/kvm/kvm-s390.c+46 -00 replies
3/5KVM: s390: Update KVM_PRE_FAULT_MEMORY API documentationDocumentation/virt/kvm/api.rst+3 -20 replies
4/5KVM: selftests: Fix pre_fault_memory_test to run on s390tools/testing/selftests/kvm/pre_fault_memory_test.c+1 -60 replies
5/5KVM: selftests: Enable pre_fault_memory_test for s390tools/testing/selftests/kvm/Makefile.kvm+1 -00 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSean ChristophersonSteffen Eiden
SeriesR-b
1/5
2/5
3/5
4/5A-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] KVM: s390: Implement KVM_PRE_FAULT_MEMORY

Implement KVM_PRE_FAULT_MEMORY on s390, and update documentation and selftests accordingly.

Faulted-in pages will be marked as accessed, unlike x86, otherwise they will trigger a minor fault when accessed. Avoiding such faults is one of the points of KVM_PRE_FAULT_MEMORY.

This series depends on some kvm/s390 functions that are slightly buggy at the moment. Those functions are being fixed in a separate series. Even without those fixes, this series is not buggy, it's just a bit inefficient in some corner cases.

CCing x86 people due to changes in the documentation and the selftests just for completeness, since the selftest has been acked already.

v2->v3:
* Fix typos
* Correctly indicate page size in gmap_handle_minor_crste_fault() also in case nothing needed to be done.
* Pick up and acked-by

v1->v2:
* Add the crste_region3 flag in struct guest_fault to keep track of the page size used to solve a fault.
* Rewrite the s390 version of kvm_arch_vcpu_pre_fault_memory() so it looks and behaves similarly to the x86 version. No more loops, better handling of hugepage mappings, and more correct error handling.
* Remove the assertion vcpu->run->exit_reason == KVM_EXIT_IO from the selftest, as it is redundant and x86-specific.

Claudio Imbrenda (5):
KVM: s390: Track page size in struct guest_fault
KVM: s390: Implement KVM_PRE_FAULT_MEMORY
KVM: s390: Update KVM_PRE_FAULT_MEMORY API documentation
KVM: selftests: Fix pre_fault_memory_test to run on s390
KVM: selftests: Enable pre_fault_memory_test for s390

 Documentation/virt/kvm/api.rst                |  5 ++-
 arch/s390/kvm/Kconfig                         |  1 +
 arch/s390/kvm/dat.h                           |  1 +
 arch/s390/kvm/gmap.c                          |  2 +
 arch/s390/kvm/kvm-s390.c                      | 45 +++++++++++++++++++
 tools/testing/selftests/kvm/Makefile.kvm      |  1 +
 .../selftests/kvm/pre_fault_memory_test.c     |  7 +--
 7 files changed, 54 insertions(+), 8 deletions(-)
Signature · 1 line
2.54.0