提交 65faca5c 编写于 作者: A Adrian Hunter 提交者: Arnaldo Carvalho de Melo

perf intel-pt: Allow for a guest kernel address filter

Handling TIP.PGD for an address filter for a guest kernel is the same as a
host kernel, but user space decoding, and hence address filters, are not
supported.
Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
Acked-by: NAndi Kleen <ak@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20210218095801.19576-9-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 6e86bfdc
......@@ -792,8 +792,14 @@ static int __intel_pt_pgd_ip(uint64_t ip, void *data)
u8 cpumode;
u64 offset;
if (ip >= ptq->pt->kernel_start)
if (ptq->state->to_nr) {
if (intel_pt_guest_kernel_ip(ip))
return intel_pt_match_pgd_ip(ptq->pt, ip, ip, NULL);
/* No support for decoding guest user space */
return -EINVAL;
} else if (ip >= ptq->pt->kernel_start) {
return intel_pt_match_pgd_ip(ptq->pt, ip, ip, NULL);
}
cpumode = PERF_RECORD_MISC_USER;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册