Commit 9b6098a
[qemu] Add custom kvm cpu args support
When improve `bpf_get_branch_snapshot()` helper, it requires passing LBR
into the VM like `-cpu,host,pmu=on,lbr-fmt=0x5`.
Then, in the VM, confirm the LBR is supported:
```bash
root@(none):/# dmesg | grep -i lbr
[ 0.394406] Performance Events: Skylake events, 32-deep LBR, full-width counters, Intel PMU driver.
```
With this commit, the VM can be created by
`vmtest -k $(make -s image_name) --kvm-cpu-args 'host,pmu=on,lbr-fmt=0x5' -`.
Signed-off-by: Leon Hwang <[email protected]>1 parent 854a802 commit 9b6098a
3 files changed
+26
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
| |||
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
| |||
140 | 149 | | |
141 | 150 | | |
142 | 151 | | |
| 152 | + | |
143 | 153 | | |
144 | 154 | | |
145 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
261 | 265 | | |
262 | 266 | | |
263 | 267 | | |
| |||
365 | 369 | | |
366 | 370 | | |
367 | 371 | | |
368 | | - | |
| 372 | + | |
369 | 373 | | |
370 | 374 | | |
371 | 375 | | |
| |||
669 | 673 | | |
670 | 674 | | |
671 | 675 | | |
672 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
673 | 680 | | |
674 | 681 | | |
675 | 682 | | |
| |||
691 | 698 | | |
692 | 699 | | |
693 | 700 | | |
694 | | - | |
| 701 | + | |
695 | 702 | | |
696 | 703 | | |
697 | 704 | | |
| |||
0 commit comments