public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/3] KVM: allow mapping of compound tail pages for IO or PFNMAP mapping
@ 2024-01-03  8:43 Yan Zhao
  2024-01-03  8:44 ` [RFC PATCH v2 1/3] " Yan Zhao
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Yan Zhao @ 2024-01-03  8:43 UTC (permalink / raw)
  To: kvm, linux-kernel, linux-kselftest
  Cc: pbonzini, seanjc, shuah, stevensd, Yan Zhao

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/20230719083332.4584-1-yan.y.zhao@intel.com/
[2] https://lore.kernel.org/all/20230911021637.1941096-1-stevensd@google.com/

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
-- 
2.17.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-02-20  9:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03  8:43 [RFC PATCH v2 0/3] KVM: allow mapping of compound tail pages for IO or PFNMAP mapping Yan Zhao
2024-01-03  8:44 ` [RFC PATCH v2 1/3] " Yan Zhao
2024-02-13  3:17   ` Sean Christopherson
2024-02-20  8:52     ` Yan Zhao
2024-01-03  8:44 ` [RFC PATCH v2 2/3] KVM: selftests: add selftest driver for KVM to test memory slots for MMIO BARs Yan Zhao
2024-01-04  8:16   ` Yuan Yao
2024-01-05  9:46     ` Yan Zhao
2024-01-10  6:27       ` Yuan Yao
2024-01-12  0:21         ` Yan Zhao
2024-01-12  5:34           ` Yuan Yao
2024-01-03  8:45 ` [RFC PATCH v2 3/3] KVM: selftests: Add set_memory_region_io to test memslots " Yan Zhao
2024-01-05  6:25   ` Yuan Yao
2024-01-05 10:00     ` Yan Zhao
2024-02-13  3:07 ` [RFC PATCH v2 0/3] KVM: allow mapping of compound tail pages for IO or PFNMAP mapping Sean Christopherson
2024-02-20  8:20   ` Yan Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox