[PATCH v2 0/5] KVM: s390: Implement KVM_PRE_FAULT_MEMORY

Claudio Imbrenda posted 5 patches 3 days, 6 hours ago
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(-)
[PATCH v2 0/5] KVM: s390: Implement KVM_PRE_FAULT_MEMORY
Posted by Claudio Imbrenda 3 days, 6 hours ago
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.

CCing x86 people due to changes in the documentation and the selftests

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(-)

-- 
2.54.0