linux/tools/testing/selftests/kvm
Axel Rasmussen 94f3f2b31a KVM: selftests: create alias mappings when using shared memory
When a memory region is added with a src_type specifying that it should
use some kind of shared memory, also create an alias mapping to the same
underlying physical pages.

And, add an API so tests can get access to these alias addresses.
Basically, for a guest physical address, let us look up the analogous
host *alias* address.

In a future commit, we'll modify the demand paging test to take
advantage of this to exercise UFFD minor faults. The idea is, we
pre-fault the underlying pages *via the alias*. When the *guest*
faults, it gets a "minor" fault (PTEs don't exist yet, but a page is
already in the page cache). Then, the userfaultfd theads can handle the
fault: they could potentially modify the underlying memory *via the
alias* if they wanted to, and then they install the PTEs and let the
guest carry on via a UFFDIO_CONTINUE ioctl.

Reviewed-by: Ben Gardon <bgardon@google.com>
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Message-Id: <20210519200339.829146-9-axelrasmussen@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-05-27 07:45:56 -04:00
..
aarch64 KVM: selftests: vgic_init kvm selftests fixup 2021-04-07 15:50:50 +01:00
include KVM: selftests: create alias mappings when using shared memory 2021-05-27 07:45:56 -04:00
lib KVM: selftests: create alias mappings when using shared memory 2021-05-27 07:45:56 -04:00
s390x KVM: selftests: sync_regs test for diag318 2020-12-10 13:36:05 +01:00
x86_64 KVM: selftests: Print a message if /dev/kvm is missing 2021-05-27 07:45:55 -04:00
.gitignore KVM: selftests: add a memslot-related performance benchmark 2021-05-27 07:45:54 -04:00
config selftests: kvm: Adding config fragments 2019-08-09 16:52:38 +02:00
demand_paging_test.c KVM: selftests: allow different backing source types 2021-05-27 07:45:56 -04:00
dirty_log_perf_test.c KVM: selftests: Disable dirty logging with vCPUs running 2021-02-04 05:27:20 -05:00
dirty_log_test.c KVM: selftests: Always run vCPU thread with blocked SIG_IPI 2021-04-21 12:20:02 -04:00
hardware_disable_test.c KVM: selftests: Fix hang in hardware_disable_test 2021-05-27 07:45:55 -04:00
kvm_create_max_vcpus.c KVM: selftests: Convert some printf's to pr_info's 2020-03-16 17:57:07 +01:00
kvm_page_table_test.c KVM: selftests: Add a test for kvm page table code 2021-04-20 04:18:53 -04:00
Makefile KVM: selftests: add a memslot-related performance benchmark 2021-05-27 07:45:54 -04:00
memslot_modification_stress_test.c KVM: selftests: Fix 32-bit truncation of vm_get_max_gfn() 2021-05-27 07:45:54 -04:00
memslot_perf_test.c KVM: selftests: add a memslot-related performance benchmark 2021-05-27 07:45:54 -04:00
set_memory_region_test.c KVM: selftests: Speed up set_memory_region_test 2021-04-26 12:21:27 -04:00
settings selftests: kvm: Raise the default timeout to 120 seconds 2021-02-09 08:17:08 -05:00
steal_time.c KVM: selftests: Rework timespec functions and usage 2020-03-18 14:08:56 +01:00