From 8d018c17170a3b623f48de5282955b817a6284f3 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Mon, 6 Feb 2023 11:30:27 -0600 Subject: qemu-targetstep: Attempt to track guest process gfn when running in userspace Seems like single-stepping the guest with LAPIC influences the guest scheduler behaviour, since just a single step inside the target gfn (to determine if its running in userspace), is enough to for us to never reach the GUEST_STOP_TRACK event. FWICT the single-stepping is not frequent and does not take long enough to justify never reaching the stop event. --- test/qemu-eviction_guest.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 test/qemu-eviction_guest.c (limited to 'test/qemu-eviction_guest.c') diff --git a/test/qemu-eviction_guest.c b/test/qemu-eviction_guest.c deleted file mode 100644 index 086fee5..0000000 --- a/test/qemu-eviction_guest.c +++ /dev/null @@ -1,45 +0,0 @@ -#include "cachepc/uapi.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -int -main(int argc, const char **argv) -{ - void *buf; - - buf = NULL; - if (posix_memalign(&buf, L1_LINESIZE * L1_SETS, L1_LINESIZE * L1_SETS)) - err(1, "memalign"); - memset(buf, 0, L1_LINESIZE * L1_SETS); - - setpriority(PRIO_PROCESS, 0, -20); - - while (1) { - printf("LOOP\n"); - CPC_DO_VMMCALL(KVM_HC_CPC_VMMCALL_SIGNAL, - CPC_GUEST_START_TRACK, 0); - *(uint8_t *)(buf + L1_LINESIZE * 9) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 10) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 11) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 12) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 13) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 14) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 15) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 9) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 10) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 11) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 12) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 13) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 14) = 1; - *(uint8_t *)(buf + L1_LINESIZE * 15) = 1; - CPC_DO_VMMCALL(KVM_HC_CPC_VMMCALL_SIGNAL, - CPC_GUEST_STOP_TRACK, 0); - } -} -- cgit v1.2.3-71-gd317