25 #ifndef __PFMLIB_AMD64_H__
26 #define __PFMLIB_AMD64_H__
43 #define PMU_AMD64_MAX_COUNTERS 4
52 uint64_t sel_event_mask:8;
53 uint64_t sel_unit_mask:8;
62 uint64_t sel_cnt_mask:8;
63 uint64_t sel_event_mask2:4;
74 uint64_t ctr_count:48;
82 uint64_t ibsfetchmaxcnt:16;
83 uint64_t ibsfetchcnt:16;
84 uint64_t ibsfetchlat:16;
85 uint64_t ibsfetchen:1;
86 uint64_t ibsfetchval:1;
87 uint64_t ibsfetchcomp:1;
89 uint64_t ibsphyaddrvalid:1;
90 uint64_t ibsl1tlbpgsz:2;
91 uint64_t ibsl1tlbmiss:1;
92 uint64_t ibsl2tlbmiss:1;
101 uint64_t ibsopmaxcnt:16;
102 uint64_t reserved1:1;
105 uint64_t ibsopcntl:1;
106 uint64_t reserved2:44;
113 uint64_t ibscomptoretctr:16;
114 uint64_t ibstagtoretctr:16;
115 uint64_t ibsopbrnresync:1;
116 uint64_t ibsopmispreturn:1;
117 uint64_t ibsopreturn:1;
118 uint64_t ibsopbrntaken:1;
119 uint64_t ibsopbrnmisp:1;
120 uint64_t ibsopbrnret:1;
121 uint64_t reserved:26;
128 uint64_t nbibsreqsrc:3;
129 uint64_t reserved1:1;
130 uint64_t nbibsreqdstproc:1;
131 uint64_t nbibsreqcachehitst:1;
132 uint64_t reserved2:58;
141 uint64_t ibsdcl1tlbmiss:1;
142 uint64_t ibsdcl2tlbmiss:1;
143 uint64_t ibsdcl1tlbhit2m:1;
144 uint64_t ibsdcl1tlbhit1g:1;
145 uint64_t ibsdcl2tlbhit2m:1;
146 uint64_t ibsdcmiss:1;
147 uint64_t ibsdcmissacc:1;
148 uint64_t ibsdcldbnkcon:1;
149 uint64_t ibsdcstbnkcon:1;
150 uint64_t ibsdcsttoldfwd:1;
151 uint64_t ibsdcsttoldcan:1;
152 uint64_t ibsdcucmemacc:1;
153 uint64_t ibsdcwcmemacc:1;
154 uint64_t ibsdclockedop:1;
155 uint64_t ibsdcmabhit:1;
156 uint64_t ibsdclinaddrvalid:1;
157 uint64_t ibsdcphyaddrvalid:1;
158 uint64_t reserved1:13;
159 uint64_t ibsdcmisslat:16;
160 uint64_t reserved2:16;
173 #define PFM_AMD64_SEL_INV 0x1
174 #define PFM_AMD64_SEL_EDGE 0x2
175 #define PFM_AMD64_SEL_GUEST 0x4
176 #define PFM_AMD64_SEL_HOST 0x8
192 #define IBS_OPTIONS_RANDEN 1
193 #define IBS_OPTIONS_UOPS 1
205 #define PFMLIB_AMD64_USE_IBSFETCH 1
206 #define PFMLIB_AMD64_USE_IBSOP 2
218 uint64_t reserved[7];
222 #define PMD_IBSFETCHCTL 0
223 #define PMD_IBSFETCHLINAD 1
224 #define PMD_IBSFETCHPHYSAD 2
225 #define PMD_IBSOPCTL 0
226 #define PMD_IBSOPRIP 1
227 #define PMD_IBSOPDATA 2
228 #define PMD_IBSOPDATA2 3
229 #define PMD_IBSOPDATA3 4
230 #define PMD_IBSDCLINAD 5
231 #define PMD_IBSDCPHYSAD 6
#define PMU_AMD64_MAX_COUNTERS