sys/amd64/pt/pt.c
129
static struct pt_ctx *pt_pcpu_ctx;
sys/amd64/pt/pt.c
134
struct pt_ctx *ctx; /* active PT tracing context */
sys/amd64/pt/pt.c
170
pt_ctx_get_xstate_hdr(struct pt_ctx *ctx)
sys/amd64/pt/pt.c
178
pt_ctx_get_ext_area(struct pt_ctx *ctx)
sys/amd64/pt/pt.c
279
struct pt_ctx *ctx;
sys/amd64/pt/pt.c
303
pt_topa_prepare(struct pt_ctx *ctx, struct hwt_vm *vm)
sys/amd64/pt/pt.c
339
pt_configure_ranges(struct pt_ctx *ctx, struct pt_cpu_config *cfg)
sys/amd64/pt/pt.c
380
pt_init_ctx(struct pt_ctx *pt_ctx, struct hwt_vm *vm, int ctx_id)
sys/amd64/pt/pt.c
385
KASSERT(pt_ctx->buf.topa_hw == NULL,
sys/amd64/pt/pt.c
386
("%s: active ToPA buffer in context %p\n", __func__, pt_ctx));
sys/amd64/pt/pt.c
388
memset(pt_ctx, 0, sizeof(struct pt_ctx));
sys/amd64/pt/pt.c
389
mtx_init(&pt_ctx->buf.lock, "pttopa", NULL, MTX_SPIN);
sys/amd64/pt/pt.c
390
pt_ctx->save_area = malloc_aligned(pt_info.xsave_area_size, 64,
sys/amd64/pt/pt.c
392
if (pt_ctx->save_area == NULL)
sys/amd64/pt/pt.c
395
if (pt_topa_prepare(pt_ctx, vm) != 0) {
sys/amd64/pt/pt.c
396
free(pt_ctx->save_area, M_PT);
sys/amd64/pt/pt.c
400
pt_ctx->id = ctx_id;
sys/amd64/pt/pt.c
406
pt_deinit_ctx(struct pt_ctx *pt_ctx)
sys/amd64/pt/pt.c
409
if (pt_ctx->buf.topa_hw != NULL)
sys/amd64/pt/pt.c
410
free(pt_ctx->buf.topa_hw, M_PT);
sys/amd64/pt/pt.c
411
if (pt_ctx->save_area != NULL)
sys/amd64/pt/pt.c
412
free(pt_ctx->save_area, M_PT);
sys/amd64/pt/pt.c
413
memset(pt_ctx, 0, sizeof(*pt_ctx));
sys/amd64/pt/pt.c
428
struct pt_ctx *pt_ctx;
sys/amd64/pt/pt.c
437
pt_ctx = NULL;
sys/amd64/pt/pt.c
469
pt_ctx = &pt_pcpu_ctx[cpu_id];
sys/amd64/pt/pt.c
480
pt_ctx = (struct pt_ctx *)thr->private;
sys/amd64/pt/pt.c
484
if (pt_ctx == NULL)
sys/amd64/pt/pt.c
488
pt_ext = pt_ctx_get_ext_area(pt_ctx);
sys/amd64/pt/pt.c
489
hdr = pt_ctx_get_xstate_hdr(pt_ctx);
sys/amd64/pt/pt.c
494
if ((error = pt_configure_ranges(pt_ctx, cfg)) != 0)
sys/amd64/pt/pt.c
497
pt_ctx->hwt_ctx = ctx;
sys/amd64/pt/pt.c
499
pt_ext->rtit_output_base = (uint64_t)vtophys(pt_ctx->buf.topa_hw);
sys/amd64/pt/pt.c
505
pt_pcpu[cpu_id].ctx = pt_ctx;
sys/amd64/pt/pt.c
634
struct pt_ctx *pt_ctx;
sys/amd64/pt/pt.c
645
pt_ctx = (struct pt_ctx *)thr->private;
sys/amd64/pt/pt.c
646
pt_deinit_ctx(pt_ctx);
sys/amd64/pt/pt.c
676
buf = &((struct pt_ctx *)vm->thr->private)->buf;
sys/amd64/pt/pt.c
693
struct pt_ctx *pt_ctx;
sys/amd64/pt/pt.c
697
pt_ctx = malloc(sizeof(*pt_ctx), M_PT, M_NOWAIT | M_ZERO);
sys/amd64/pt/pt.c
698
if (pt_ctx == NULL)
sys/amd64/pt/pt.c
701
error = pt_init_ctx(pt_ctx, thr->vm, thr->thread_id);
sys/amd64/pt/pt.c
705
thr->private = pt_ctx;
sys/amd64/pt/pt.c
714
struct pt_ctx *ctx;
sys/amd64/pt/pt.c
716
ctx = (struct pt_ctx *)thr->private;
sys/amd64/pt/pt.c
765
struct pt_ctx *ctx = cpu->ctx;
sys/amd64/pt/pt.c
792
struct pt_ctx *ctx;
sys/amd64/pt/pt.c
866
pt_pcpu_ctx = mallocarray(mp_ncpus, sizeof(struct pt_ctx), M_PT,