Re: [PATCH v9 8/8] perf/amd/iommu: Enable support for multiple IOMMUs

2017-02-15 Thread Borislav Petkov
On Wed, Feb 15, 2017 at 02:13:29PM +0700, Suravee Suthikulpanit wrote: > > So you can define a static struct pmu in the driver and do struct > > assignment directly instead of writing them one-by-one. > > I believe this is the same suggestion you have made in V8. Here's what I mean: --- diff --g

Re: [PATCH v9 8/8] perf/amd/iommu: Enable support for multiple IOMMUs

2017-02-14 Thread Suravee Suthikulpanit
Boris, On 2/9/17 02:33, Borislav Petkov wrote: On Tue, Feb 07, 2017 at 02:40:36AM -0600, Suravee Suthikulpanit wrote: From: Suravee Suthikulpanit [..] + perf_iommu->max_banks= amd_iommu_pc_get_max_banks(idx); + perf_iommu->max_counters = amd_iommu_pc_get_max_counters(idx);

Re: [PATCH v9 8/8] perf/amd/iommu: Enable support for multiple IOMMUs

2017-02-08 Thread Borislav Petkov
On Tue, Feb 07, 2017 at 02:40:36AM -0600, Suravee Suthikulpanit wrote: > From: Suravee Suthikulpanit > > Add multi-IOMMU support for 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 allow

[PATCH v9 8/8] perf/amd/iommu: Enable support for multiple IOMMUs

2017-02-07 Thread Suravee Suthikulpanit
From: Suravee Suthikulpanit Add multi-IOMMU support for 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 onto performance counters of each