@@ -59,6 +59,7 @@ static struct pt_cap_desc {
59
59
PT_CAP (mtc , 0 , CPUID_EBX , BIT (3 )),
60
60
PT_CAP (ptwrite , 0 , CPUID_EBX , BIT (4 )),
61
61
PT_CAP (power_event_trace , 0 , CPUID_EBX , BIT (5 )),
62
+ PT_CAP (event_trace , 0 , CPUID_EBX , BIT (7 )),
62
63
PT_CAP (topa_output , 0 , CPUID_ECX , BIT (0 )),
63
64
PT_CAP (topa_multiple_entries , 0 , CPUID_ECX , BIT (1 )),
64
65
PT_CAP (single_range_output , 0 , CPUID_ECX , BIT (2 )),
@@ -110,6 +111,7 @@ PMU_FORMAT_ATTR(tsc, "config:10" );
110
111
PMU_FORMAT_ATTR (noretcomp , "config:11" );
111
112
PMU_FORMAT_ATTR (ptw , "config:12" );
112
113
PMU_FORMAT_ATTR (branch , "config:13" );
114
+ PMU_FORMAT_ATTR (event , "config:31" );
113
115
PMU_FORMAT_ATTR (mtc_period , "config:14-17" );
114
116
PMU_FORMAT_ATTR (cyc_thresh , "config:19-22" );
115
117
PMU_FORMAT_ATTR (psb_period , "config:24-27" );
@@ -118,6 +120,7 @@ static struct attribute *pt_formats_attr[] = {
118
120
& format_attr_pt .attr ,
119
121
& format_attr_cyc .attr ,
120
122
& format_attr_pwr_evt .attr ,
123
+ & format_attr_event .attr ,
121
124
& format_attr_fup_on_ptw .attr ,
122
125
& format_attr_mtc .attr ,
123
126
& format_attr_tsc .attr ,
@@ -298,6 +301,7 @@ static int __init pt_pmu_hw_init(void)
298
301
RTIT_CTL_CYC_PSB | \
299
302
RTIT_CTL_MTC | \
300
303
RTIT_CTL_PWR_EVT_EN | \
304
+ RTIT_CTL_EVENT_EN | \
301
305
RTIT_CTL_FUP_ON_PTW | \
302
306
RTIT_CTL_PTW_EN)
303
307
@@ -352,6 +356,10 @@ static bool pt_event_valid(struct perf_event *event)
352
356
!intel_pt_validate_hw_cap (PT_CAP_power_event_trace ))
353
357
return false;
354
358
359
+ if (config & RTIT_CTL_EVENT_EN &&
360
+ !intel_pt_validate_hw_cap (PT_CAP_event_trace ))
361
+ return false;
362
+
355
363
if (config & RTIT_CTL_PTW ) {
356
364
if (!intel_pt_validate_hw_cap (PT_CAP_ptwrite ))
357
365
return false;
0 commit comments