lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 Jan 2024 05:58:45 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Andrew Jones <ajones@...tanamicro.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Kan Liang <kan.liang@...ux.intel.com>, Dapeng Mi <dapeng1.mi@...ux.intel.com>, 
	Jim Mattson <jmattson@...gle.com>, Jinrong Liang <cloudliang@...cent.com>, 
	Aaron Lewis <aaronlewis@...gle.com>, Like Xu <likexu@...cent.com>
Subject: Re: [PATCH v10 15/29] KVM: selftests: Add pmu.h and lib/pmu.c for
 common PMU assets

On Wed, Jan 10, 2024, Andrew Jones wrote:
> On Tue, Jan 09, 2024 at 03:02:35PM -0800, Sean Christopherson wrote:
> > From: Jinrong Liang <cloudliang@...cent.com>
> > 
> > Add a PMU library for x86 selftests to help eliminate open-coded event
> > encodings, and to reduce the amount of copy+paste between PMU selftests.
> > 
> > Use the new common macro definitions in the existing PMU event filter test.
> > 
> > Cc: Aaron Lewis <aaronlewis@...gle.com>
> > Suggested-by: Sean Christopherson <seanjc@...gle.com>
> > Signed-off-by: Jinrong Liang <cloudliang@...cent.com>
> > Co-developed-by: Sean Christopherson <seanjc@...gle.com>
> > Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> > ---
> >  tools/testing/selftests/kvm/Makefile          |   1 +
> >  tools/testing/selftests/kvm/include/pmu.h     |  97 ++++++++++++
> >  tools/testing/selftests/kvm/lib/pmu.c         |  31 ++++
> 
> Shouldn't these new files be
> 
> tools/testing/selftests/kvm/include/x86_64/pmu.h
> tools/testing/selftests/kvm/lib/x86_64/pmu.c

/facepalm

I'm glad at least one of us is paying attention.  If no one objects to not sending
yet another version, I'll squash the below when applying.

--
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index ab96fc80bfbd..ce58098d80fd 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -23,7 +23,6 @@ LIBKVM += lib/guest_modes.c
 LIBKVM += lib/io.c
 LIBKVM += lib/kvm_util.c
 LIBKVM += lib/memstress.c
-LIBKVM += lib/pmu.c
 LIBKVM += lib/guest_sprintf.c
 LIBKVM += lib/rbtree.c
 LIBKVM += lib/sparsebit.c
@@ -37,6 +36,7 @@ LIBKVM_x86_64 += lib/x86_64/apic.c
 LIBKVM_x86_64 += lib/x86_64/handlers.S
 LIBKVM_x86_64 += lib/x86_64/hyperv.c
 LIBKVM_x86_64 += lib/x86_64/memstress.c
+LIBKVM_x86_64 += lib/x86_64/pmu.c
 LIBKVM_x86_64 += lib/x86_64/processor.c
 LIBKVM_x86_64 += lib/x86_64/svm.c
 LIBKVM_x86_64 += lib/x86_64/ucall.c
diff --git a/tools/testing/selftests/kvm/include/pmu.h b/tools/testing/selftests/kvm/include/x86_64/pmu.h
similarity index 100%
rename from tools/testing/selftests/kvm/include/pmu.h
rename to tools/testing/selftests/kvm/include/x86_64/pmu.h
diff --git a/tools/testing/selftests/kvm/lib/pmu.c b/tools/testing/selftests/kvm/lib/x86_64/pmu.c
similarity index 100%
rename from tools/testing/selftests/kvm/lib/pmu.c
rename to tools/testing/selftests/kvm/lib/x86_64/pmu.c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ