diff options
| -rw-r--r-- | arch/x86/events/intel/bts.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c index 141e07b06216..24ffa1e88cf9 100644 --- a/arch/x86/events/intel/bts.c +++ b/arch/x86/events/intel/bts.c | |||
| @@ -582,6 +582,24 @@ static __init int bts_init(void) | |||
| 582 | if (!boot_cpu_has(X86_FEATURE_DTES64) || !x86_pmu.bts) | 582 | if (!boot_cpu_has(X86_FEATURE_DTES64) || !x86_pmu.bts) |
| 583 | return -ENODEV; | 583 | return -ENODEV; |
| 584 | 584 | ||
| 585 | if (boot_cpu_has(X86_FEATURE_PTI)) { | ||
| 586 | /* | ||
| 587 | * BTS hardware writes through a virtual memory map we must | ||
| 588 | * either use the kernel physical map, or the user mapping of | ||
| 589 | * the AUX buffer. | ||
| 590 | * | ||
| 591 | * However, since this driver supports per-CPU and per-task inherit | ||
| 592 | * we cannot use the user mapping since it will not be availble | ||
| 593 | * if we're not running the owning process. | ||
| 594 | * | ||
| 595 | * With PTI we can't use the kernal map either, because its not | ||
| 596 | * there when we run userspace. | ||
| 597 | * | ||
| 598 | * For now, disable this driver when using PTI. | ||
| 599 | */ | ||
| 600 | return -ENODEV; | ||
| 601 | } | ||
| 602 | |||
| 585 | bts_pmu.capabilities = PERF_PMU_CAP_AUX_NO_SG | PERF_PMU_CAP_ITRACE | | 603 | bts_pmu.capabilities = PERF_PMU_CAP_AUX_NO_SG | PERF_PMU_CAP_ITRACE | |
| 586 | PERF_PMU_CAP_EXCLUSIVE; | 604 | PERF_PMU_CAP_EXCLUSIVE; |
| 587 | bts_pmu.task_ctx_nr = perf_sw_context; | 605 | bts_pmu.task_ctx_nr = perf_sw_context; |
