summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-01-25 19:16:45 +0100
committerLouis Burda <quent.burda@gmail.com>2023-01-25 19:17:14 +0100
commit5975ec7b44887ad54417218251e669cca14bde80 (patch)
tree3556527278a9c96bf6cce4b53f6763e321eb46bc /test
parent80df08a54cfe9d531e932374cad55cc052a8a73d (diff)
downloadcachepc-5975ec7b44887ad54417218251e669cca14bde80.tar.gz
cachepc-5975ec7b44887ad54417218251e669cca14bde80.zip
Debug copy_to_user occasionally failing in kvm-step
Diffstat (limited to 'test')
-rw-r--r--test/kvm-step.c6
1 files changed, 4 insertions, 2 deletions
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;