On 1/23/2013 1:06 AM, Joerg Roedel wrote:
On Tue, Jan 22, 2013 at 05:19:10PM -0600, Suthikulpanit, Suravee wrote:
From: Suravee Suthikulpanit suravee.suthikulpa...@amd.com
@@ -1171,6 +1195,8 @@ static int iommu_init_pci(struct amd_iommu *iommu)
for (i = 0; i 0x83; i
On 4/2/2013 10:29 AM, Borislav Petkov wrote:
On Tue, Apr 02, 2013 at 05:03:04PM +0200, Joerg Roedel wrote:
On Tue, Apr 02, 2013 at 04:40:37PM +0200, Borislav Petkov wrote:
While you guys are at it, can someone fix this too pls (ASUS board with
a PD on it).
[0.220342] [Firmware Bug]:
On 4/18/2013 1:35 PM, Joerg Roedel wrote:
On Thu, Apr 18, 2013 at 11:59:58AM -0500, Suthikulpanit, Suravee wrote:
One last concern I have for this patch is the case when we re-enable
the interrupt, then another interrupt happens while we processing
the log and set the bit. If the interrupt
the IOMMUv2 hardware implementation,
and has been corrected since version 2.02 of the specification
(available through AMD NDA).
Signed-off-by: Jay Cornwall jay.cornw...@amd.com
Reviewed-by: Suravee Suthikulpanit suravee.suthikulpa...@amd.com
Applied, thanks.
Does this mean that PASIDs are only 16 bits
On 3/4/2014 10:53 AM, Suravee Suthikulpanit wrote:
On 3/4/2014 8:12 AM, Joerg Roedel wrote:
On Wed, Feb 26, 2014 at 03:49:31PM -0600,
suravee.suthikulpa...@amd.com wrote:
From: Jay Cornwall jay.cornw...@amd.com
This patch corrects the PASID format in the INVALIDATE_IOTLB_PAGES
command, which
Joerg,
Do you have any concerns about the V2 of this patch?
Thanks,
Suravee
On 3/5/2014 6:54 PM, suravee.suthikulpa...@amd.com wrote:
From: Suravee Suthikulpanit suravee.suthikulpa...@amd.com
In reality, the spec can only support 16-bit PASID since
INVALIDATE_IOTLB_PAGES
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
This patch adds new IOMMU performance event based on
the information in table 74 of the AMD I/O Virtualization Technology
(IOMMU) Specification (Document Id: 4882, Rev 2.62, Feb 2015)
Link: http://support.amd.com/Te
by always assign
devid zero to be handled by the first IOMMU.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
drivers/iommu/amd_iommu_init.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/amd_iommu_init.c b/d
Hi Joerg,
On 12/14/2015 09:08 AM, Joerg Roedel wrote:
On Fri, Dec 11, 2015 at 04:54:38PM -0600, Suravee Suthikulpanit wrote:
Current driver makes assumption that device with devid zero is always
included in the range of devices to be managed by IOMMU. However,
certain FW does not include devid
ts PCI bus based device.
Suravee Suthikulpanit (3):
iommu/amd: Modify ivhd_header structure to support type 11h and 40h
iommu/amd: Use the most comprehensive IVHD type that the driver can
support
iommu/amd: Introduces ivrs_acpihid kernel parameter
Wan Zongshun (3):
iommu/amd: Add n
Hi Jorge,
On 12/28/15 09:43, Joerg Roedel wrote:
On Tue, Dec 22, 2015 at 01:19:14PM -0600, Suthikulpanit, Suravee wrote:
This patch introduces amd_iommu_get_num_iommus(). Initially, this is
intended to be used by Perf AMD IOMMU driver.
Signed-off-by: Suravee Suthikulpanit <suravee.suthiku
This patch consolidates "arch/x86/kernel/cpu/perf_event_amd_iommu.h" and
"drivers/iommu/amd_iommu_proto.h", which contain duplicate function
declarations, into "include/linux/perf/perf_event_amd_iommu.h"
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@
the same way (i.e with the same events).
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/kernel/cpu/perf_event_amd_iommu.c | 80 +--
drivers/iommu/amd_iommu_init.c | 87 ++
include/linu
Introduce a helper function to calculate bit-index for assigning
performance counter assignment.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/kernel/cpu/perf_event_amd_iommu.c | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
. So, this patch modifies these function to iterate all IOMMU
to check the max banks and counters reported by the hardware.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/kernel/cpu/perf_event_amd_iommu.c | 17 +++--
drivers/iommu/amd_iommu_
IOMMU PMU driver
initialization issue in some existing CZ platform.
Changes from V1 (https://lkml.org/lkml/2015/12/22/535):
* Update patch3 and 6 to use amd_iommus_present instead of introducing
amd_iommu_cnt static variable since they are the same thing
Suravee Suthikulpanit (6):
perf/amd
This patch introduces amd_iommu_get_num_iommus(). Initially, this is
intended to be used by Perf AMD IOMMU driver.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
drivers/iommu/amd_iommu_init.c| 8 +++-
include/linux/perf/perf_event_amd_iommu.h | 2
-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/kernel/cpu/perf_event_amd_iommu.c | 26 ++
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_amd_iommu.c
b/arch/x86/kernel/cpu/perf_event_amd_iommu.c
IOMMU PMU driver
initialization issue in some existing CZ platform.
Suravee Suthikulpanit (6):
perf/amd/iommu: Consolidate and move perf_event_amd_iommu header
perf/amd/iommu: Modify functions to query max banks and counters
iommu/amd: Introduce amd_iommu_get_num_iommus()
perf/amd/iommu
the same way (i.e with the same events).
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/kernel/cpu/perf_event_amd_iommu.c | 80 +--
drivers/iommu/amd_iommu_init.c | 87 ++
include/linu
. So, this patch modifies these function to iterate all IOMMU
to check the max banks and counters reported by the hardware.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/kernel/cpu/perf_event_amd_iommu.c | 17 +++--
drivers/iommu/amd_iommu_
Introduce a helper function to calculate bit-index for assigning
performance counter assignment.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/kernel/cpu/perf_event_amd_iommu.c | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/kernel/cpu/perf_event_amd_iommu.c | 26 ++
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_amd_iommu.c
b/arch/x86/kernel/cpu/perf_event_amd_iommu.c
This patch introduces amd_iommu_get_num_iommus(). Initially, this is
intended to be used by Perf AMD IOMMU driver.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
drivers/iommu/amd_iommu_init.c| 16
include/linux/perf/perf_event_amd_i
This patch consolidates "arch/x86/kernel/cpu/perf_event_amd_iommu.h" and
"drivers/iommu/amd_iommu_proto.h", which contain duplicate function
declarations, into "include/linux/perf/perf_event_amd_iommu.h"
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@
Hi Boris,
On 02/09/2016 06:08 PM, Borislav Petkov wrote:
You probably want to redo those against latest tip/master:
http://git.kernel.org/tip/5b26547dd7faa84e1293baa144a0f3e74ed7d4c7
-- Regards/Gruss, Boris.
Sure, I'll re-base this. By the way, do you have any other comments
regarding the
Hi,
On 2/11/16 01:51, Borislav Petkov wrote:
So, I thought it might be alright to put the perf_event_amd_iommu.h
>here.
>
>Having the information in the file arch/x86/events/amd/iommu.h seems
>strange for having to specify ../../arch/x86/events/amd/iommu.h in the
>IOMMU driver.
>
>So, you think
Hi Boris,
Thank you very much for catching several styling issues. I should have
taken care of that earlier. I'll clean them up. Please see my other
comments below.
Thanks,
Suravee
On 02/11/2016 12:14 AM, Borislav Petkov wrote:
On Tue, Feb 09, 2016 at 04:53:55PM -0600, Suravee
counters among
multiple IOMMUs.
Note that this implementation makes an assumption that the counters
on all IOMMUs will be programmed the same way (i.e with the same events).
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
This patch declares pr_fmt for perf/amd_iommu, removes unnecessary
pr_debug, and clean up error messages.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 13 +
. So, this patch modifies these function to iterate all IOMMU
to check the max banks and counters reported by the hardware.
Reviewed-by: Joerg Roedel <jroe...@suse.de>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c
Introduce a helper function to calculate bit-index for assigning
performance counter assignment.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 19 ++-
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/ar
This patch introduces amd_iommu_get_num_iommus(). Initially, this is
intended to be used by Perf AMD IOMMU driver.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/include/asm/perf/amd/iommu.h | 2 ++
drivers/iommu/amd_iommu_init.c| 7 ++-
2
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
First, this patch move arch/x86/events/amd/iommu.h to
arch/x86/include/asm/perf/amd/iommu.h so that we easily include
it in both perf-amd-iommu and amd-iommu drivers.
Then, we consolidate declarion of AMD IOMMU performance counte
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
This patch series modifies the existing perf_event_amd_iommu driver
to support systems with multiple IOMMUs. It introduces new AMD IOMMU APIs,
which are used by the AMD IOMMU Perf driver to access performance
counters in multiple
Hi Joerg,
On 01/07/2016 06:15 AM, Joerg Roedel wrote:
On Fri, Jan 01, 2016 at 12:13:37PM -0600, Suravee Suthikulpanit wrote:
+int amd_iommu_get_num_iommus(void)
+{
+ return amd_iommus_present;
+}
+EXPORT_SYMBOL(amd_iommu_get_num_iommus);
Is this export needed? The perf code can't
This patch introduces amd_iommu_get_num_iommus(). Initially, this is
intended to be used by Perf AMD IOMMU driver.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
drivers/iommu/amd_iommu_init.c| 7 ++-
include/linux/perf/perf_event_amd_iommu.h | 2
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
This patch series modifies the existing perf_event_amd_iommu driver
to support systems with multiple IOMMUs. It introduces new AMD IOMMU APIs,
which will are used by the AMD IOMMU Perf driver to access performance
counters in mu
This patch consolidates "arch/x86/kernel/cpu/perf_event_amd_iommu.h" and
"drivers/iommu/amd_iommu_proto.h", which contain duplicate function
declarations, into "include/linux/perf/perf_event_amd_iommu.h"
Reviewed-by: Joerg Roedel <jroe...@suse.de>
On 02/23/2016 12:24 PM, Alex Williamson wrote:
On Tue, 23 Feb 2016 12:12:42 +0700
Suravee Suthikulpanit <suravee.suthikulpa...@amd.com> wrote:
Hi
On 02/22/2016 09:07 PM, Peter Zijlstra wrote:
On Mon, Feb 22, 2016 at 03:00:31PM +0700, Suravee Suthikulpanit wrote:
So I really don'
This patch introduces amd_iommu_get_num_iommus(). This is intended for
Perf AMD IOMMU driver.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/include/asm/perf/amd/iommu.h | 2 ++
drivers/iommu/amd_iommu_init.c| 7 ++-
2 files changed, 8 inse
;
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 23 ---
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/arch/x86/events/amd/iommu.c b/arch/x86/events/amd/iommu.c
index 629bc70..9da0d16 100644
--- a/a
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 82 +
1 file changed, 38 insertions(+), 44 deletions(-)
diff --git a/arch/x86/events/amd/iommu.c b/arch/x86/events/amd/iommu.c
index d5e4d39..35
and in code comment.
* Patch 5: modify the logic to update counts to get rid off
un-necessary local64_cmpxchg().
Changes from V1 (https://lkml.org/lkml/2015/12/22/535):
* Update patch3 and 6 to use amd_iommus_present instead of introducing
amd_iommu_cnt static v
Suravee Suthikulpanit (10
|set]_counter(), and modifies them to allow
callers to specify IOMMU index.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 45 +++
arch/x86/include/asm/perf/amd/iommu.h | 8 +++--
drivers/iommu/amd_iommu_
This patch cleans up the coding style of this function.
This should not affect the logic and functionality.
Cc: Borislav Petkov <b...@alien8.de>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 18 --
1 fil
This patch declare pr_fmt for perf/amd_iommu and remove unnecessary
pr_debug.
Cc: Borislav Petkov <b...@alien8.de>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
This patch cleans up:
* Various bitwise operations in perf_iommu_enable_event
* Make use macros BIT(x)
This should not affect logic and functionality.
Cc: Borislav Petkov <b...@alien8.de>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events
Hi
On 02/22/2016 09:07 PM, Peter Zijlstra wrote:
On Mon, Feb 22, 2016 at 03:00:31PM +0700, Suravee Suthikulpanit wrote:
So I really don't have time to review new muck while I'm hunting perf
core fail, but Boris made me look at this.
This is crazy, if you have multiple IOMMUs then create
Hi All,
I am wondering if there are any other concerns for this patch series.
Thanks,
Suravee
On 2/11/16 16:15, Suravee Suthikulpanit wrote:
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
This patch series modifies the existing perf_event_amd_iommu driver
to support s
Hi,
On 02/18/2016 06:11 PM, Borislav Petkov wrote:
On Thu, Feb 11, 2016 at 04:15:23PM +0700, Suravee Suthikulpanit wrote:
Currently, amd_iommu_pc_get_max_[banks|counters]() require devid,
which should not be the case.
Why?
Commit message could use an explanation.
Also, these don't
Hi Peter,
On 02/18/2016 08:18 PM, Peter Zijlstra wrote:
On Thu, Feb 11, 2016 at 04:15:26PM +0700, Suravee Suthikulpanit wrote:
static void perf_iommu_read(struct perf_event *event)
{
+ int i;
u64 delta = 0ULL;
struct hw_perf_event *hwc = >hw;
+ str
Hi,
On 03/12/2016 08:22 PM, Peter Zijlstra wrote:
On Tue, Feb 23, 2016 at 08:12:36AM -0600, Suravee Suthikulpanit wrote:
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
First, this patch move arch/x86/events/amd/iommu.h to
arch/x86/include/asm/perf/amd/iommu.h so that we
Hi Peter/Boris/Joerg,
On 3/14/16 23:39, Peter Zijlstra wrote:
On Mon, Mar 14, 2016 at 03:19:45PM +0100, Borislav Petkov wrote:
On Mon, Mar 14, 2016 at 08:37:02PM +0700, Suravee Suthikulpanit wrote:
Basically, we are trying to match the current Perf hierarchy for AMD IOMMU
(arch/x86/events/amd
On 03/18/2016 04:29 PM, Borislav Petkov wrote:
On Fri, Mar 18, 2016 at 04:09:33PM +0700, Suravee Suthikulpanit wrote:
But the whole point is that since we are moving it to consolidate these
duplicated declarations, I think we should just put it in the most common
place. The include/linux/amd
Hi,
On 3/14/16 16:58, Peter Zijlstra wrote:
On Mon, Mar 14, 2016 at 12:26:00PM +0700, Suravee Suthikulpanit wrote:
Hi,
On 03/12/2016 08:22 PM, Peter Zijlstra wrote:
On Tue, Feb 23, 2016 at 08:12:36AM -0600, Suravee Suthikulpanit wrote:
From: Suravee Suthikulpanit <suravee.suthiku
Hi Boris,
On 03/18/2016 04:04 PM, Borislav Petkov wrote:
On Fri, Mar 18, 2016 at 02:07:25PM +0700, Suravee Suthikulpanit wrote:
Actually the exposed APIs (in both files) are from the AMD IOMMU driver,
which is not necessary x86-specific. They mostly use struct pci_dev, which
is also arch
Hi
On 03/15/2016 05:53 PM, Peter Zijlstra wrote:
On Tue, Mar 15, 2016 at 11:40:17AM +0100, Borislav Petkov wrote:
On Tue, Mar 15, 2016 at 07:39:31AM +0700, Suravee Suthikulpanit wrote:
What if I just merge the newly introduced arch/x86/include/perf/amd/iommu.h
into the include/linux/amd
Hi Joerg,
On 2/25/16 21:54, Joerg Roedel wrote:
Hi Suravee,
On Tue, Feb 23, 2016 at 08:12:34AM -0600, Suravee Suthikulpanit wrote:
This is a two-part patch series:
Part1: 1-4 :
Introduce a workaround for the current AMD IOMMU perf initialization issue
in some existing KV and CZ platforms
Boris,
On 1/23/17 02:55, Borislav Petkov wrote:
@@ -421,46 +427,46 @@ static __init void amd_iommu_pc_exit(void)
};
static __init int
-_init_perf_amd_iommu(struct perf_amd_iommu *perf_iommu, char *name)
+init_one_perf_amd_iommu(struct perf_amd_iommu *perf_iommu, unsigned int idx)
{
Peter,
On 1/25/17 16:46, Peter Zijlstra wrote:
On Mon, Jan 16, 2017 at 01:23:36AM -0600, Suravee Suthikulpanit wrote:
+ pi = container_of(event->pmu, struct perf_amd_iommu, pmu);
+ hwc->idx = pi->idx;
+ hwc->config = event->attr.conf
Boris,
On 1/25/17 16:55, Borislav Petkov wrote:
On Wed, Jan 25, 2017 at 10:46:53AM +0100, Peter Zijlstra wrote:
Which is absolutely insane.
Right,
IMO, the simplest thing to do for your purposes is to embed a struct
amd_iommu pointer into struct perf_amd_iommu at init time so that you
don't
Peter,
On 1/23/17 19:33, Peter Zijlstra wrote:
On Mon, Jan 16, 2017 at 01:23:30AM -0600, Suravee Suthikulpanit wrote:
static void perf_iommu_read(struct perf_event *event)
{
- u64 count = 0ULL;
- u64 prev_raw_count = 0ULL;
- u64 delta = 0ULL;
+ u64 count, prev
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
This patch series modifies the existing IOMMU and Perf drivers to support
systems with multiple IOMMUs by allocating an amd_iommu PMU per IOMMU instance.
This allows users to specify performance events and filters separately fo
Fix coding style and make use of GENMASK_ULL macro.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Joerg Roedel <j...@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 16
Declare pr_fmt for perf/amd_iommu and remove unnecessary pr_debug.
Also check return value when _init_events_attrs fails.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
a
, and will use a proper IOMMU index.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Joerg Roedel <j...@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 17 +++---
del <j...@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.h | 2 ++
drivers/iommu/amd_iommu.c | 6 +++---
drivers/iommu/amd_iommu_init.c | 11 +--
drivers/iommu/amd_iommu_proto.h | 1 +
drivers/iommu
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Introduce static amd_iommu_attr_groups to simplify the
sysfs attributes initialization code.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Signed-off-by: Suravee Suthikulpanit &
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Clean up register initialization and make use of BIT_ULL(x)
where appropriate. This should not affect logic and functionality.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Sign
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
The current amd_iommu_pc_get_set_reg_val() cannot support multiple IOMMUs.
So, modify it to allow callers to specify IOMMU. This prepares the driver
for supporting multi-IOMMU in subsequent patch.
Cc: Peter Zijlstr
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
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 prog
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
This patch series modifies the existing IOMMU and Perf drivers to support
systems with multiple IOMMUs by allocating an amd_iommu PMU per IOMMU instance.
This allows users to specify performance events and filters separately fo
Declare pr_fmt for perf/amd_iommu and remove unnecessary pr_debug.
Also check return value when _init_events_attrs fails.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
a
del <j...@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.h | 2 ++
drivers/iommu/amd_iommu.c | 6 +++---
drivers/iommu/amd_iommu_init.c | 11 +--
drivers/iommu/amd_iommu_proto.h | 1 +
drivers/iommu
, and will use a proper IOMMU index.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Joerg Roedel <j...@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 17 +++---
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Clean up register initializaton and make use of BIT_ULL(x)
where appropriate. This should not affect logic and functionality.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Sign
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Current AMD IOMMU Perf PMU inappropriately uses hardware struct
inside the union inside the struct hw_perf_event, mainly the use of
extra_reg.
Instead, introduce amd_iommu-specific struct with required
parameters to be programme
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Introduce static amd_iommu_attr_groups to simplify the
sysfs attributes initialization code.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Signed-off-by: Suravee Suthikulpanit &
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
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 prog
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
The current amd_iommu_pc_get_set_reg_val() cannot support multiple IOMMUs.
So, modify it to allow callers to specify IOMMU. This prepares the driver
for supporting multi-IOMMU in subsequent patch.
Cc: Peter Zijlstr
Fix coding style and make use of GENMASK_ULL macro.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Joerg Roedel <j...@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 16
On 2/24/17 01:11, Peter Zijlstra wrote:
However, I have looked into reworking to not use the extra_regs, and I see
that the union in struct hw_perf_event currently contains various PMU-specific
structures (hardware, software, tracepoint, intel_cqm, itrace, amd_power,
and breakpoint).
For
Peter,
On 2/14/17 19:31, Peter Zijlstra wrote:
On Tue, Feb 07, 2017 at 08:57:52AM +0700, Suravee Suthikulpanit wrote:
But instead it looks like you get the counter form:
#define _GET_CNTR(ev) ((u8)(ev->hw.extra_reg.reg))
Which is absolutely insane.
So, the IOMMU count
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 <suravee.suthikulpa...@amd.com>
[..]
+ perf_iommu->max_banks= amd_iommu_pc_get_max_banks(idx);
+ perf_iommu->
, and will use a proper IOMMU index.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Joerg Roedel <j...@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 17 +++---
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
The current amd_iommu_pc_get_set_reg_val() cannot support multiple IOMMUs.
So, modify it to allow callers to specify IOMMU. This prepares the driver
for supporting multi-IOMMU in subsequent patch.
Cc: Peter Zijlstr
del <j...@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.h | 2 ++
drivers/iommu/amd_iommu.c | 6 +++---
drivers/iommu/amd_iommu_init.c | 11 +--
drivers/iommu/amd_iommu_proto.h | 1 +
drivers/iommu
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Clean up register initializaton and make use of BIT_ULL(x)
where appropriate. This should not affect logic and functionality.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Sign
Fix coding style and make use of GENMASK_ULL macro.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Joerg Roedel <j...@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.c | 16
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Clean up coding style and fix a bug in the 64-bit register read
logic since it overwrites the upper 32-bit when reading the lower 32-bit.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
d
Declare pr_fmt for perf/amd_iommu and remove unnecessary pr_debug.
Also check return value when _init_events_attrs fails.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
a
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
This patch series modifies the existing IOMMU and Perf drivers to support
systems with multiple IOMMUs by allocating an amd_iommu PMU per IOMMU instance.
This allows users to specify performance events and filters separately fo
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
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 prog
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Introduce static amd_iommu_attr_groups to simplify the
sysfs attributes initialization code.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Signed-off-by: Suravee Suthikulpanit &
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
In, perf_iommu_start(), we need to check the return value from
amd_iommu_set_reg(). In case of failure, we should not enable the PMU.
Also, in perf_iommu_read(), we need to check the return value from
amd_iommu_get_reg() before
bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
arch/x86/events/amd/iommu.h | 2 ++
drivers/iommu/amd_iommu.c | 6 +++---
drivers/iommu/amd_iommu_init.c | 11 +--
drivers/iommu/amd_iommu_proto.h | 1 +
drivers/iommu/amd_iommu_types.h
Declare pr_fmt for perf/amd_iommu and remove unnecessary pr_debug.
Also check return value when _init_events_attrs fails.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8.de>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
---
a
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
* Clean up various bitwise operations in perf_iommu_enable_event
* Make use macros BIT(x)
This should not affect logic and functionality.
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Borislav Petkov <b...@alien8
From: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
This patch series modifies the existing IOMMU and Perf drivers to support
systems with multiple IOMMUs by allocating an amd_iommu PMU per IOMMU instance.
This allows users to specify performance events and filters separately fo
1 - 100 of 310 matches
Mail list logo