Skip to content

Commit 210b09f

Browse files
Dapeng Misean-jc
authored andcommitted
KVM: selftests: Add timing_info bit support in vmx_pmu_caps_test
A new bit PERF_CAPABILITIES[17] called "PEBS_TIMING_INFO" bit is added to indicated if PEBS supports to record timing information in a new "Retried Latency" field. Since KVM requires user can only set host consistent PEBS capabilities, otherwise the PERF_CAPABILITIES setting would fail, add pebs_timing_info into the "immutable_caps" to block host inconsistent PEBS configuration and cause errors. Opportunistically drop the anythread_deprecated bit. It isn't and likely never was a PERF_CAPABILITIES flag, the test's definition snuck in when the union was copy+pasted from the kernel's definition. Signed-off-by: Dapeng Mi <[email protected]> Tested-by: Yi Lai <[email protected]> [sean: call out anythread_deprecated change] Tested-by: Dapeng Mi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent aebc62b commit 210b09f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/testing/selftests/kvm/x86/vmx_pmu_caps_test.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static union perf_capabilities {
2929
u64 pebs_baseline:1;
3030
u64 perf_metrics:1;
3131
u64 pebs_output_pt_available:1;
32-
u64 anythread_deprecated:1;
32+
u64 pebs_timing_info:1;
3333
};
3434
u64 capabilities;
3535
} host_cap;
@@ -44,6 +44,7 @@ static const union perf_capabilities immutable_caps = {
4444
.pebs_arch_reg = 1,
4545
.pebs_format = -1,
4646
.pebs_baseline = 1,
47+
.pebs_timing_info = 1,
4748
};
4849

4950
static const union perf_capabilities format_caps = {

0 commit comments

Comments
 (0)