mbox series

[0/5] kvm: selftest: add dirty logging test

Message ID 20180820075400.18847-1-peterx@redhat.com (mailing list archive)
Headers show
Series kvm: selftest: add dirty logging test | expand

Message

Peter Xu Aug. 20, 2018, 7:53 a.m. UTC
Add a simple test for existing dirty logging facility.

Patch 2 tried to generalize the port IO magic a bit in misc tests but
still not be that ideal.  Let's see how people think about it.

Please have a look, thanks.

Peter Xu (5):
  tools: introduce test_and_clear_bit
  kvm: selftest: unify the guest port macros
  kvm: selftest: include the tools headers
  kvm: selftest: introduce _vm_create_default()
  kvm: selftest: add dirty logging test

 tools/include/linux/bitmap.h                  |  17 ++
 tools/testing/selftests/kvm/Makefile          |   5 +-
 .../selftests/kvm/cr4_cpuid_sync_test.c       |  30 +-
 tools/testing/selftests/kvm/dirty_logging.c   | 261 ++++++++++++++++++
 .../testing/selftests/kvm/include/kvm_util.h  |  44 +++
 .../testing/selftests/kvm/include/test_util.h |   2 -
 tools/testing/selftests/kvm/lib/kvm_util.c    |  58 ++++
 tools/testing/selftests/kvm/lib/x86.c         |  13 +-
 tools/testing/selftests/kvm/state_test.c      |  30 +-
 tools/testing/selftests/kvm/sync_regs_test.c  |  19 +-
 .../selftests/kvm/vmx_tsc_adjust_test.c       |  41 +--
 11 files changed, 420 insertions(+), 100 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/dirty_logging.c

Comments

Paolo Bonzini Aug. 20, 2018, 9:49 a.m. UTC | #1
On 20/08/2018 09:53, Peter Xu wrote:
> Add a simple test for existing dirty logging facility.
> 
> Patch 2 tried to generalize the port IO magic a bit in misc tests but
> still not be that ideal.  Let's see how people think about it.

Yeah, the API is still a bit in flux and it's expected that new tests
need some adjustment; but at this point I think the needs are clear for
guest->host communication, so I think patch 2 is good!

Paolo
Peter Xu Aug. 20, 2018, 10:31 a.m. UTC | #2
On Mon, Aug 20, 2018 at 11:49:17AM +0200, Paolo Bonzini wrote:
> On 20/08/2018 09:53, Peter Xu wrote:
> > Add a simple test for existing dirty logging facility.
> > 
> > Patch 2 tried to generalize the port IO magic a bit in misc tests but
> > still not be that ideal.  Let's see how people think about it.
> 
> Yeah, the API is still a bit in flux and it's expected that new tests
> need some adjustment; but at this point I think the needs are clear for
> guest->host communication, so I think patch 2 is good!

Ok then I'll keep that one then.  Thanks for the fast review!

Regards,