lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240103084327.19955-1-yan.y.zhao@intel.com>
Date: Wed,  3 Jan 2024 16:43:27 +0800
From: Yan Zhao <yan.y.zhao@...el.com>
To: kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org
Cc: pbonzini@...hat.com,
	seanjc@...gle.com,
	shuah@...nel.org,
	stevensd@...omium.org,
	Yan Zhao <yan.y.zhao@...el.com>
Subject: [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/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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ