x86/events/amd/iommu: Enable support for multiple IOMMUs
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Wed, 22 Mar 2017 07:02:42 +0000 (02:02 -0500)
committerIngo Molnar <mingo@kernel.org>
Thu, 30 Mar 2017 07:55:36 +0000 (09:55 +0200)
commit25df39f2cfd06a4b49ad592c5b7cba0cbf24e27f
treea4bac85ab0e07df334838e0770487e8296a92d97
parentcf25f904ef75aa7c25097eb4981bbc634bf5ff9e
x86/events/amd/iommu: Enable support for multiple IOMMUs

Add support for multiple IOMMUs to perf by exposing an AMD IOMMU PMU for
each IOMMU found in the system via:

  /bus/event_source/devices/amd_iommu_x

where x is the IOMMU index. This allows users to specify different
events to be programmed into the performance counters of each IOMMU.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
[ Improve readability, shorten names. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Jörg Rödel <joro@8bytes.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: iommu@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/1490166162-10002-11-git-send-email-Suravee.Suthikulpanit@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/amd/iommu.c