Skip to content

Conversation

@Asphaltt
Copy link
Contributor

@Asphaltt Asphaltt commented Oct 1, 2025

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:

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' -.

@Asphaltt Asphaltt marked this pull request as ready for review October 1, 2025 09:33
@Asphaltt Asphaltt force-pushed the feat/kvm-cpu-args branch 2 times, most recently from ca97144 to bf660fd Compare October 1, 2025 09:52
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 <leon.hwang@linux.dev>
Copy link
Owner

@danobi danobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@danobi danobi merged commit 9b6098a into danobi:master Oct 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants