linux-stable/tools/testing
Peter Xu 84292e5659 KVM: selftests: Add dirty ring buffer test
Add the initial dirty ring buffer test.

The current test implements the userspace dirty ring collection, by
only reaping the dirty ring when the ring is full.

So it's still running synchronously like this:

            vcpu                             main thread

  1. vcpu dirties pages
  2. vcpu gets dirty ring full
     (userspace exit)

                                       3. main thread waits until full
                                          (so hardware buffers flushed)
                                       4. main thread collects
                                       5. main thread continues vcpu

  6. vcpu continues, goes back to 1

We can't directly collects dirty bits during vcpu execution because
otherwise we can't guarantee the hardware dirty bits were flushed when
we collect and we're very strict on the dirty bits so otherwise we can
fail the future verify procedure.  A follow up patch will make this
test to support async just like the existing dirty log test, by adding
a vcpu kick mechanism.

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20201001012237.6111-1-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-11-15 09:49:17 -05:00
..
fault-injection
ktest Updates for ktest 5.9 2020-08-10 19:16:26 -07:00
kunit kunit: tools: fix kunit_tool tests for parsing test plans 2020-10-26 13:25:40 -06:00
nvdimm device-dax: add dis-contiguous resource support 2020-10-13 18:38:28 -07:00
radix-tree ida: Free allocated bitmap in error path 2020-10-07 09:11:33 -04:00
scatterlist lib/scatterlist: Add support in dynamic allocation of SG table from pages 2020-10-05 20:45:45 -03:00
selftests KVM: selftests: Add dirty ring buffer test 2020-11-15 09:49:17 -05:00
vsock