-/* $OpenBSD: vmm.c,v 1.284 2021/05/18 00:05:20 dv Exp $ */
+/* $OpenBSD: vmm.c,v 1.285 2021/06/07 13:55:54 dv Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
#include <sys/rwlock.h>
#include <sys/pledge.h>
#include <sys/memrange.h>
+#include <sys/tracepoint.h>
#include <uvm/uvm_extern.h>
invvpid(IA32_VMX_INVVPID_SINGLE_CTX_GLB, &vid);
}
+ TRACEPOINT(vmm, guest_enter, vcpu, vrp);
+
/* Start / resume the VCPU */
#ifdef VMM_DEBUG
KERNEL_ASSERT_LOCKED();
}
}
+ TRACEPOINT(vmm, guest_exit, vcpu, vrp, exit_reason);
+
if (ret || exitinfo != VMX_EXIT_INFO_COMPLETE ||
exit_reason != VMX_EXIT_EXTINT) {
KERNEL_LOCK();
vcpu->vc_event = 0;
}
+ TRACEPOINT(vmm, guest_enter, vcpu, vrp);
+
/* Start / resume the VCPU */
#ifdef VMM_DEBUG
KERNEL_ASSERT_LOCKED();
vcpu->vc_gueststate.vg_exit_reason = exit_reason;
}
+ TRACEPOINT(vmm, guest_exit, vcpu, vrp, exit_reason);
+
/* If we exited successfully ... */
if (ret == 0) {
vcpu->vc_gueststate.vg_rflags = vmcb->v_rflags;
-/* $OpenBSD: dt_prov_static.c,v 1.7 2021/01/06 07:51:40 claudio Exp $ */
+/* $OpenBSD: dt_prov_static.c,v 1.8 2021/06/07 13:55:54 dv Exp $ */
/*
* Copyright (c) 2019 Martin Pieuchot <mpi@openbsd.org>
DT_STATIC_PROBE3(vfs, bufcache_take, "long", "int", "int64_t");
DT_STATIC_PROBE4(vfs, cleaner, "long", "int", "long", "long");
+/*
+ * VMM
+ */
+DT_STATIC_PROBE2(vmm, guest_enter, "void *", "void *");
+DT_STATIC_PROBE3(vmm, guest_exit, "void *", "void *", "uint64_t");
+
/*
* List of all static probes
*/
&_DT_STATIC_P(vfs, bufcache_rel),
&_DT_STATIC_P(vfs, bufcache_take),
&_DT_STATIC_P(vfs, cleaner),
+ /* VMM */
+ &_DT_STATIC_P(vmm, guest_enter),
+ &_DT_STATIC_P(vmm, guest_exit),
};
int