Commit 210b09fa authored by Dapeng Mi's avatar Dapeng Mi Committed by Sean Christopherson
Browse files

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: default avatarDapeng Mi <dapeng1.mi@linux.intel.com>
Tested-by: default avatarYi Lai <yi1.lai@intel.com>
[sean: call out anythread_deprecated change]
Tested-by: default avatarDapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20250919214648.1585683-2-seanjc@google.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent aebc62b3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ static union perf_capabilities {
		u64 pebs_baseline:1;
		u64	perf_metrics:1;
		u64	pebs_output_pt_available:1;
		u64	anythread_deprecated:1;
		u64	pebs_timing_info:1;
	};
	u64	capabilities;
} host_cap;
@@ -44,6 +44,7 @@ static const union perf_capabilities immutable_caps = {
	.pebs_arch_reg = 1,
	.pebs_format = -1,
	.pebs_baseline = 1,
	.pebs_timing_info = 1,
};

static const union perf_capabilities format_caps = {