kvm_pmu_set_...r_value_user(9)
π kvm_pmu_set_counter_value_user β the Kernel API Manual tea π
okay so bestie, this one lives in the Kernel API Manual and it's called kvm_pmu_set_counter_value_user β and yes the name is a whole mouthful, iykyk. It's a void function, which means it doesn't hand anything back, it just does the thing. Main character energy fr fr.
Its whole vibe? Setting a PMU counter value from user. That's it, that's the plot. π
β¨ SYNOPSIS β¨
void kvm_pmu_set_counter_value_user (struct kvm_vcpu *vcpu , u64
select_idx , u64 val );
literally the entire signature, no cap. three args, one void, zero drama. π¦
πΈ ARGUMENTS πΈ
vcpuβ the vcpu pointer π like, the actual virtual CPU you're talking about. this is the main character of the argument list ngl.select_idxβ the counter index π’ which counter we're messing with, bestie, pick one.valβ the counter value β the number that's gonna get set. the payload. the whole point.
π SEE ALSO π
okay so this is where it gets iconic β the whole PMU friend group shows up. this is the group chat, and everyone's here:
- Kernel file
./arch/arm64/kvm/pmu-emul.cπ (yes, that's where the magic lives) kvm_pmc_is_64bit(9)kvm_pmu_get_counter_value(9)kvm_pmu_set_counter_value(9)kvm_pmu_release_perf_event(9)kvm_pmu_stop_counter(9)kvm_pmu_vcpu_init(9)kvm_pmu_vcpu_destroy(9)kvm_pmu_flush_hwstate(9)kvm_pmu_sync_hwstate(9)kvm_pmu_software_increment(9)kvm_pmu_handle_pmcr(9)kvm_pmu_create_perf_event(9)kvm_pmu_set_counter_event_type(9)kvm_arm_pmu_get_max_counters(9)kvm_arm_set_default_pmu(9)kvm_vcpu_read_pmcr(9)
likeβ¦ the entire roster. ate and left no crumbs. π₯
ngl bestie, if you're reading a page with (9) after every single name, you're in kernel-doc territory β that's the section number, it's giving "yes I read the source, and also the docs." π
and that's the whole page!! π«Ά this lil beauty comes from ./arch/arm64/kvm and it's dated October 2026, so jot that down β mwah, love u, go set some counters. πππΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms