selftests: KVM: Add test for KVM_{GET,SET}_CLOCK
authorOliver Upton <oupton@google.com>
Thu, 16 Sep 2021 18:15:48 +0000 (18:15 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 Oct 2021 18:43:45 +0000 (14:43 -0400)
commit61fb1c54853dda9a95b785f36220fa8ff39bac20
tree5b5b5316965de4df3a9f489aa3b043d32845d66c
parent500065393400fc88d20c6d655717c00efc07dc52
selftests: KVM: Add test for KVM_{GET,SET}_CLOCK

Add a selftest for the new KVM clock UAPI that was introduced. Ensure
that the KVM clock is consistent between userspace and the guest, and
that the difference in realtime will only ever cause the KVM clock to
advance forward.

Cc: Andrew Jones <drjones@redhat.com>
Signed-off-by: Oliver Upton <oupton@google.com>
Message-Id: <20210916181555.973085-3-oupton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/x86_64/kvm_clock_test.c [new file with mode: 0644]