diff options
| author | Like Xu <likexu@tencent.com> | 2026-06-25 17:01:55 +0800 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-08-05 16:42:23 -0700 |
| commit | 66ee8f1556575c8f9ae76932dd3aca65b4b60e59 (patch) | |
| tree | 3a2ce6f2a627c7b2b738beb69289dcd3d84acf21 /tools/testing | |
| parent | bc44a9ce73cdb1abfbca0608eb2a71d68f94714e (diff) | |
| download | linux-66ee8f1556575c8f9ae76932dd3aca65b4b60e59.tar.gz linux-66ee8f1556575c8f9ae76932dd3aca65b4b60e59.zip | |
KVM: x86/pmu: Clean up vPMU comments and stray blank lines
Tidy up the x86 vPMU emulation code and its selftests by fixing comments
that no longer reflect the code along with assorted spelling and grammar
mistakes, and by dropping redundant blank lines reported by checkpatch.
No functional change intended.
Signed-off-by: Like Xu <likexu@tencent.com>
Link: https://patch.msgid.link/20260625090155.6326-1-likexu@tencent.com
[sean: keep quotes around "hit", shove sequences fix into separate patch]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing')
| -rw-r--r-- | tools/testing/selftests/kvm/x86/pmu_counters_test.c | 6 | ||||
| -rw-r--r-- | tools/testing/selftests/kvm/x86/pmu_event_filter_test.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/testing/selftests/kvm/x86/pmu_counters_test.c b/tools/testing/selftests/kvm/x86/pmu_counters_test.c index dc6afac3aa91..03672ca6b3dd 100644 --- a/tools/testing/selftests/kvm/x86/pmu_counters_test.c +++ b/tools/testing/selftests/kvm/x86/pmu_counters_test.c @@ -146,9 +146,9 @@ static u8 guest_get_pmu_version(void) /* * If an architectural event is supported and guaranteed to generate at least - * one "hit, assert that its count is non-zero. If an event isn't supported or - * the test can't guarantee the associated action will occur, then all bets are - * off regarding the count, i.e. no checks can be done. + * one "hit", assert that its count is non-zero. If an event isn't supported + * or the test can't guarantee the associated action will occur, then all bets + * are off regarding the count, i.e. no checks can be done. * * Sanity check that in all cases, the event doesn't count when it's disabled, * and that KVM correctly emulates the write of an arbitrary value. diff --git a/tools/testing/selftests/kvm/x86/pmu_event_filter_test.c b/tools/testing/selftests/kvm/x86/pmu_event_filter_test.c index 84e4c6ca67a3..2d401ff09112 100644 --- a/tools/testing/selftests/kvm/x86/pmu_event_filter_test.c +++ b/tools/testing/selftests/kvm/x86/pmu_event_filter_test.c @@ -62,7 +62,7 @@ struct { /* * If we encounter a #GP during the guest PMU sanity check, then the guest - * PMU is not functional. Inform the hypervisor via GUEST_SYNC(0). + * PMU is not functional. Inform the hypervisor via GUEST_SYNC(-EFAULT). */ static void guest_gp_handler(struct ex_regs *regs) { @@ -73,7 +73,7 @@ static void guest_gp_handler(struct ex_regs *regs) * Check that we can write a new value to the given MSR and read it back. * The caller should provide a non-empty set of bits that are safe to flip. * - * Return on success. GUEST_SYNC(0) on error. + * Return on success, GUEST_SYNC(-EIO) on error. */ static void check_msr(u32 msr, u64 bits_to_flip) { |
