diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-01-27 16:33:27 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-01-27 16:34:43 +0100 |
| commit | bb2c0277010fa5fc3010dca79685d527bd87d9fb (patch) | |
| tree | dd719f969a6d9f1377fa85dc7325b53d9622a863 /test/qemu-pagestep.c | |
| parent | 1f418a1c4480cef90b8596ae17bdca9cc7ca1b88 (diff) | |
| download | cachepc-bb2c0277010fa5fc3010dca79685d527bd87d9fb.tar.gz cachepc-bb2c0277010fa5fc3010dca79685d527bd87d9fb.zip | |
Add CPC_TRACK_STEPS and make apic reset more robust
Diffstat (limited to 'test/qemu-pagestep.c')
| -rw-r--r-- | test/qemu-pagestep.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/qemu-pagestep.c b/test/qemu-pagestep.c index 4e54161..412fefb 100644 --- a/test/qemu-pagestep.c +++ b/test/qemu-pagestep.c @@ -25,13 +25,14 @@ monitor(void) if (ret && errno == EAGAIN) return; if (ret) err(1, "KVM_CPC_POLL_EVENT"); - if (event.type != CPC_EVENT_TRACK_PAGE) - errx(1, "unexpected event type %i", event.type); - - printf("Event: rip:%016llx prev:%08llx next:%08llx ret:%llu\n", - vm_get_rip(), event.page.inst_gfn_prev, - event.page.inst_gfn, event.page.retinst); - printf("\n"); + if (event.type == CPC_EVENT_TRACK_PAGE) { + printf("Event: rip:%016llx prev:%08llx next:%08llx ret:%llu\n", + vm_get_rip(), event.page.inst_gfn_prev, + event.page.inst_gfn, event.page.retinst); + printf("\n"); + } else { + printf("Unexpected event type %i\n", event.type); + } ret = ioctl(kvm_dev, KVM_CPC_ACK_EVENT, &event.id); if (ret) err(1, "KVM_CPC_ACK_EVENT"); |
