From 5975ec7b44887ad54417218251e669cca14bde80 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Wed, 25 Jan 2023 19:16:45 +0100 Subject: Debug copy_to_user occasionally failing in kvm-step --- test/kvm-step.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/kvm-step.c b/test/kvm-step.c index b8b6bcd..9fefb5e 100644 --- a/test/kvm-step.c +++ b/test/kvm-step.c @@ -19,11 +19,11 @@ #define SECONDARY_CORE 3 static int child; +static struct cpc_event event; uint64_t monitor(struct kvm *kvm, bool baseline) { - struct cpc_event event; uint8_t counts[64]; int ret; @@ -44,6 +44,8 @@ monitor(struct kvm *kvm, bool baseline) event.step.retinst); print_counts(counts); printf("\n"); + print_counts_raw(counts); + printf("\n"); ret = ioctl(kvm_dev, KVM_CPC_ACK_EVENT, &event.id); if (ret) err(1, "ioctl KVM_CPC_ACK_EVENT"); @@ -54,6 +56,7 @@ monitor(struct kvm *kvm, bool baseline) void kill_child(void) { + printf("Killing vm..\n"); kill(child, SIGKILL); } @@ -64,7 +67,6 @@ main(int argc, const char **argv) struct guest guest; struct kvm kvm; uint8_t baseline[L1_SETS]; - struct cpc_event event; uint64_t eventcnt; uint32_t arg; int ret; -- cgit v1.2.3-71-gd317