Skip to content

RFC KVM: allow mapping of compound tail pages for IO or PFNMAP mapping

Yan Zhao kvm linux-kselftest lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest3 patches 11 repliesIn review
  2. v11 patch 2 repliesSuperseded

Changes in v2 from the cover letter

added patch 2 and 3 to do selftest for patch 1 (Sean).

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3KVM: allow mapping of compound tail pages for IO or PFNMAP mappingvirt/kvm/kvm_main.c+1 -12 replies
2/3KVM: selftests: add selftest driver for KVM to test memory slots for MMIO BARslib/Kconfig.debug lib/Makefile lib/test_kvm_mock_device.c +1 more+312 -05 replies
3/3KVM: selftests: Add set_memory_region_io to test memslots for MMIO BARstools/testing/selftests/kvm/Makefile tools/testing/selftests/kvm/set_memory_region_io.c+189 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/3] KVM: allow mapping of compound tail pages for IO or PFNMAP mapping

This is a v2 for previous series [1] to allow mapping for compound tail pages for IO or PFNMAP mapping.

Compared to v1, this version provides selftest to check functionality in KVM to map memslots for MMIO BARs (VMAs with flag VM_IO | VM_PFNMAP), as requested by Sean in [1].

The selftest can also be used to test series "allow mapping non-refcounted pages" [2].

Tag RFC is added because a test driver is introduced in patch 2, which is new to KVM selftest, and test "set_memory_region_io" in patch 3 depends on that the test driver is compiled and loaded in kernel. Besides, patch 3 calls vm_set_user_memory_region() directly without modifying vm_mem_add().
So, this series is sent to ensure the main direction is right.

Thanks
Yan

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

v2:
added patch 2 and 3 to do selftest for patch 1 (Sean).

Yan Zhao (3):
KVM: allow mapping of compound tail pages for IO or PFNMAP mapping
KVM: selftests: add selftest driver for KVM to test memory slots for
MMIO BARs
KVM: selftests: Add set_memory_region_io to test memslots for MMIO
BARs

 lib/Kconfig.debug                             |  14 +
 lib/Makefile                                  |   1 +
 lib/test_kvm_mock_device.c                    | 281 ++++++++++++++++++
 lib/test_kvm_mock_device_uapi.h               |  16 +
 tools/testing/selftests/kvm/Makefile          |   1 +
 .../selftests/kvm/set_memory_region_io.c      | 188 ++++++++++++
 virt/kvm/kvm_main.c                           |   2 +-
 7 files changed, 502 insertions(+), 1 deletion(-)
 create mode 100644 lib/test_kvm_mock_device.c
 create mode 100644 lib/test_kvm_mock_device_uapi.h
 create mode 100644 tools/testing/selftests/kvm/set_memory_region_io.c

base-commit: 8ed26ab8d59111c2f7b86d200d1eb97d2a458fd1

Signature · 1 line
2.17.1