Sean Christopherson writes:
On Wed, Aug 28, 2024, Mingwei Zhang wrote:
> >> +static void test_core_counters(void)
> >> +{
> >> +uint8_t nr_counters = nr_core_counters();
> >> +bool core_ext = kvm_cpu_has(X86_FEATURE_PERF_CTR_EXT_CORE);
> >> +bool perf_mon_v2 = kvm_cpu_has(X86_FEATU
Hi Mingwei
Mingwei Zhang writes:
On Tue, Aug 13, 2024, Colton Lewis wrote:
Branch in main() depending on if the CPU is Intel or AMD. They are
subject to vastly different requirements because the AMD PMU lacks
many properties defined by the Intel PMU including the entire CPUID
0xa function
Hi Mingwei, thanks for reviewing!
Mingwei Zhang writes:
On Tue, Aug 13, 2024, Colton Lewis wrote:
This defined the CPUID calls to determine what extensions and
properties are available. AMD reference manual names listed below.
* PerfCtrExtCore (six core counters instead of four
Mingwei Zhang writes:
On Tue, Aug 13, 2024, Colton Lewis wrote:
Without the leading underscore, these variables are referencing a
variable in the calling scope. It only worked before by accident
because all calling scopes had a variable with the right name.
Signed-off-by: Colton Lewis
Sean Christopherson writes:
On Tue, Aug 13, 2024, Colton Lewis wrote:
Sean Christopherson writes:
> On Tue, Aug 13, 2024, Colton Lewis wrote:
> > (I was positive I had sent this already, but I couldn't find it on
the
> > mailing list to reply to and ask for re
Sean Christopherson writes:
On Tue, Aug 13, 2024, Colton Lewis wrote:
(I was positive I had sent this already, but I couldn't find it on the
mailing list to reply to and ask for reviews.)
You did[*], it's sitting in my todo folder. Two things.
1. Err on the side of ca
flags an overflow by the associated counter.
Signed-off-by: Colton Lewis
---
.../selftests/kvm/x86_64/pmu_counters_test.c | 53 +++
1 file changed, 53 insertions(+)
diff --git a/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c
b/tools/testing/selftests/kvm/x86_64
loop instruction being counted
differently. Presumably, when the counter reaches 0 and execution
continues to the next instruction, AMD counts this as a branch and
Intel doesn't.
Signed-off-by: Colton Lewis
---
.../selftests/kvm/x86_64/pmu_counters_test.c | 87 ---
1 file c
Run a basic test to ensure we can write an arbitrary value to the core
counters and read it back.
Signed-off-by: Colton Lewis
---
.../selftests/kvm/x86_64/pmu_counters_test.c | 41 +++
1 file changed, 41 insertions(+)
diff --git a/tools/testing/selftests/kvm/x86_64
notion of PMU versions as Intel does. Every
feature is a separate flag and they aren't the same features as Intel.
Set up a VM for testing core AMD counters and ensure proper CPUID
features are set.
Signed-off-by: Colton Lewis
---
.../selftests/kvm/x86_64/pmu_counters_test.c
: Colton Lewis
---
tools/testing/selftests/kvm/include/x86_64/processor.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h
b/tools/testing/selftests/kvm/include/x86_64/processor.h
index a0c1440017bb..9d87b5f8974f 100644
--- a/tools
Without the leading underscore, these variables are referencing a
variable in the calling scope. It only worked before by accident
because all calling scopes had a variable with the right name.
Signed-off-by: Colton Lewis
---
tools/testing/selftests/kvm/x86_64/pmu_counters_test.c | 6 +++---
1
ently and I am not
intruding by making my own submission.
[1] https://lore.kernel.org/kvm/20231121115457.76269-1-cloudli...@tencent.com/
Colton Lewis (6):
KVM: x86: selftests: Fix typos in macro variable use
KVM: x86: selftests: Define AMD PMU CPUID leaves
KVM: x86: selftests: Set up AMD
flags an overflow by the associated counter.
Signed-off-by: Colton Lewis
---
.../selftests/kvm/x86_64/pmu_counters_test.c | 53 +++
1 file changed, 53 insertions(+)
diff --git a/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c
b/tools/testing/selftests/kvm/x86_64
loop instruction being counted
differently. Presumably, when the counter reaches 0 and execution
continues to the next instruction, AMD counts this as a branch and
Intel doesn't.
Signed-off-by: Colton Lewis
---
.../selftests/kvm/x86_64/pmu_counters_test.c | 87 ---
1 file c
Run a basic test to ensure we can write an arbitrary value to the core
counters and read it back.
Signed-off-by: Colton Lewis
---
.../selftests/kvm/x86_64/pmu_counters_test.c | 41 +++
1 file changed, 41 insertions(+)
diff --git a/tools/testing/selftests/kvm/x86_64
notion of PMU versions as Intel does. Every
feature is a separate flag and they aren't the same features as Intel.
Set up a VM for testing core AMD counters and ensure proper CPUID
features are set.
Signed-off-by: Colton Lewis
---
.../selftests/kvm/x86_64/pmu_counters_test.c
: Colton Lewis
---
tools/testing/selftests/kvm/include/x86_64/processor.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h
b/tools/testing/selftests/kvm/include/x86_64/processor.h
index a0c1440017bb..9d87b5f8974f 100644
--- a/tools
Without the leading underscore, these variables are referencing a
variable in the calling scope. It only worked before by accident
because all calling scopes had a variable with the right name.
Signed-off-by: Colton Lewis
---
tools/testing/selftests/kvm/x86_64/pmu_counters_test.c | 6 +++---
1
...@tencent.com/
Colton Lewis (6):
KVM: x86: selftests: Fix typos in macro variable use
KVM: x86: selftests: Define AMD PMU CPUID leaves
KVM: x86: selftests: Set up AMD VM in pmu_counters_test
KVM: x86: selftests: Test read/write core counters
KVM: x86: selftests: Test core events
KVM: x86
20 matches
Mail list logo