diff options
| author | Ackerley Tng <ackerleytng@google.com> | 2026-09-10 16:56:02 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-09-22 07:28:44 -0700 |
| commit | e8a40b9a604e560b99f4dc4fbb4971143c75807e (patch) | |
| tree | d4e74e93b5d7387c7aaf454837219e439e9e62d6 /tools/perf/scripts/python | |
| parent | 8b72eaa766b6b11a38faafa0b936d1952f1b7ba6 (diff) | |
KVM: selftests: Add helpers to pin pages with CONFIG_GUP_TEST
Add helper functions to allow KVM selftests to pin memory using
CONFIG_GUP_TEST. This is useful for creating test scenarios where some page
has an increased refcount, such as when testing guest_memfd in-place
conversion.
The helpers open /sys/kernel/debug/gup_test and invoke the
PIN_LONGTERM_TEST_START and PIN_LONGTERM_TEST_STOP ioctls. Since this
functionality depends on the kernel being built with CONFIG_GUP_TEST,
provide stub implementations that trigger a test failure if the
configuration is missing.
Signed-off-by: Ackerley Tng <ackerleytng@google.com>
Tested-by: Shivank Garg <shivankg@amd.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Yan Zhao <yan.y.zhao@intel.com>
Link: https://patch.msgid.link/20260910-gmem-inplace-conversion-v13-36-dd6fbf94f4e1@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
