kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Add printf and formatted asserts in the guest
@ 2023-06-07 22:45 Aaron Lewis
  2023-06-07 22:45 ` [PATCH v3 1/5] KVM: selftests: Add strnlen() to the string overrides Aaron Lewis
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Aaron Lewis @ 2023-06-07 22:45 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, jmattson, seanjc, Aaron Lewis

Extend the ucall framework to offer GUEST_PRINTF() and GUEST_ASSERT_FMT()
in selftests.  This will allow for better and easier guest debugging.

v2 -> v3
 - s/kvm_vsnprintf/guest_vsnprintf/ [Sean]
 - GUEST_ASSERT on error in guest_vsnprintf() [Sean]
 - Added "Fixes" tag to patch #3 [Sean]
 - Removed memset to zero ucall.buffer to save cycles [Sean]
 - Added REPORT_GUEST_PRINTF() for the host [Sean]
 - Removed ucall_fmt2() and squashed it into __GUEST_ASSERT_FMT [Sean]
 - Fixed stack overflow in guest_print_test Sean called out
 - Refactored test_limits() in guest_print_test to account for updates

v1 -> v2:
 - Added a proper selftest [Sean]
 - Added support for snprintf [Shaoqin]
 - Added ucall_nr_pages_required() [Sean]
 - Added ucall_fmt2() for GUEST_ASSERT_FMT()
 - Dropped the original version of printf.c [Sean]
 - Dropped patches 1-2 and 8 [Sean]

Aaron Lewis (5):
  KVM: selftests: Add strnlen() to the string overrides
  KVM: selftests: Add guest_snprintf() to KVM selftests
  KVM: selftests: Add additional pages to the guest to accommodate ucall
  KVM: selftests: Add string formatting options to ucall
  KVM: selftests: Add a selftest for guest prints and formatted asserts

 tools/testing/selftests/kvm/Makefile          |   3 +
 .../testing/selftests/kvm/guest_print_test.c  | 222 +++++++++++++
 .../testing/selftests/kvm/include/test_util.h |   3 +
 .../selftests/kvm/include/ucall_common.h      |  24 ++
 .../testing/selftests/kvm/lib/guest_sprintf.c | 307 ++++++++++++++++++
 tools/testing/selftests/kvm/lib/kvm_util.c    |   4 +
 .../selftests/kvm/lib/string_override.c       |   9 +
 .../testing/selftests/kvm/lib/ucall_common.c  |  22 ++
 8 files changed, 594 insertions(+)
 create mode 100644 tools/testing/selftests/kvm/guest_print_test.c
 create mode 100644 tools/testing/selftests/kvm/lib/guest_sprintf.c

-- 
2.41.0.rc0.172.g3f132b7071-goog


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-07-28  9:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-07 22:45 [PATCH v3 0/5] Add printf and formatted asserts in the guest Aaron Lewis
2023-06-07 22:45 ` [PATCH v3 1/5] KVM: selftests: Add strnlen() to the string overrides Aaron Lewis
2023-06-07 22:45 ` [PATCH v3 2/5] KVM: selftests: Add guest_snprintf() to KVM selftests Aaron Lewis
2023-06-07 22:45 ` [PATCH v3 3/5] KVM: selftests: Add additional pages to the guest to accommodate ucall Aaron Lewis
2023-06-07 22:45 ` [PATCH v3 4/5] KVM: selftests: Add string formatting options to ucall Aaron Lewis
2023-06-07 22:45 ` [PATCH v3 5/5] KVM: selftests: Add a selftest for guest prints and formatted asserts Aaron Lewis
2023-07-26 22:41 ` [PATCH v3 0/5] Add printf and formatted asserts in the guest Sean Christopherson
2023-07-27  3:11   ` JinrongLiang
2023-07-27 19:03     ` Sean Christopherson
2023-07-27 19:21       ` Sean Christopherson
2023-07-28  9:40         ` Jinrong Liang
2023-07-27 12:16   ` Aaron Lewis
2023-07-27 18:44     ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).