From 0d4f62bcc065026390dd1f19b0bb462d07dcf9ff Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Fri, 3 Feb 2023 12:08:28 -0600 Subject: Simplify target gfn stepping by tracking a single page --- cachepc/cachepc.h | 10 ---------- cachepc/kvm.c | 3 ++- linux | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/cachepc/cachepc.h b/cachepc/cachepc.h index 5b4308f..f44b169 100644 --- a/cachepc/cachepc.h +++ b/cachepc/cachepc.h @@ -60,16 +60,6 @@ struct cpc_track_steps { uint64_t target_gfn; bool stepping; bool use_filter; - - /* simplified page tracking without singlestep resolve, since we - * only care about when we reach the target page, not accuracy.. - * in contrast to page_track, we keep two pages tracked at all times - * this helps prevent it looking like a A is tracked after B - * when in reality we just untracked A too early on a A -> B boundary */ - bool prev_avail; - uint64_t prev_gfn; - bool cur_avail; - uint64_t cur_gfn; }; static_assert(sizeof(struct cpc_cl) == L1_LINESIZE, "Bad cacheline struct"); diff --git a/cachepc/kvm.c b/cachepc/kvm.c index 9c17498..11a18d2 100644 --- a/cachepc/kvm.c +++ b/cachepc/kvm.c @@ -525,7 +525,8 @@ cpc_track_mode_ioctl(void __user *arg_user) cpc_singlestep_reset = true; cpc_track_steps.stepping = true; } else { - cpc_track_all(vcpu, KVM_PAGE_TRACK_EXEC); + cpc_track_single(vcpu, cpc_track_steps.target_gfn, + KVM_PAGE_TRACK_EXEC); cpc_track_steps.stepping = false; } break; diff --git a/linux b/linux index 7259833..6342cef 160000 --- a/linux +++ b/linux @@ -1 +1 @@ -Subproject commit 725983359162c9cb3a273fe375fe79bfadf80d2c +Subproject commit 6342cefc67f3b4dff3d3b0ac031e2d9513596d80 -- cgit v1.2.3-71-gd317