linux/tools/testing/selftests/kvm
Peter Xu 3b4cd0ff54 kvm: selftest: add dirty logging test
Test KVM dirty logging functionality.

The test creates a standalone memory slot to test tracking the dirty
pages since we can't really write to the default memory slot which still
contains the guest ELF image.

We have two threads running during the test:

(1) the vcpu thread continuously dirties random guest pages by writting
    a iteration number to the first 8 bytes of the page

(2) the host thread continuously fetches dirty logs for the testing
    memory region and verify each single bit of the dirty bitmap by
    checking against the values written onto the page

Note that since the guest cannot calls the general userspace APIs like
random(), it depends on the host to provide random numbers for the
page indexes to dirty.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-22 16:48:39 +02:00
..
include kvm: selftest: add dirty logging test 2018-08-22 16:48:39 +02:00
lib kvm: selftest: add dirty logging test 2018-08-22 16:48:39 +02:00
.gitignore kvm: selftests: add basic test for state save and restore 2018-08-06 17:32:04 +02:00
cr4_cpuid_sync_test.c kvm: selftest: pass in extra memory when create vm 2018-08-22 16:48:38 +02:00
dirty_log_test.c kvm: selftest: add dirty logging test 2018-08-22 16:48:39 +02:00
Makefile kvm: selftest: add dirty logging test 2018-08-22 16:48:39 +02:00
set_sregs_test.c kvm: selftest: pass in extra memory when create vm 2018-08-22 16:48:38 +02:00
state_test.c kvm: selftest: pass in extra memory when create vm 2018-08-22 16:48:38 +02:00
sync_regs_test.c kvm: selftest: pass in extra memory when create vm 2018-08-22 16:48:38 +02:00
vmx_tsc_adjust_test.c kvm: selftest: pass in extra memory when create vm 2018-08-22 16:48:38 +02:00