[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e19db1f0-d6ab-de0d-c5a5-f574b0cb9814@amd.com>
Date: Fri, 24 Feb 2017 01:20:58 +0700
From: Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>
To: Peter Zijlstra <peterz@...radead.org>
CC: <linux-kernel@...r.kernel.org>, <iommu@...ts.linux-foundation.org>,
<joro@...tes.org>, <bp@...en8.de>, <mingo@...hat.com>
Subject: Re: [PATCH v8 9/9] perf/amd/iommu: Enable support for multiple IOMMUs
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 amd_iommu PMU, we need additional registers for holding amd_iommu-specific
>> parameters. So, it seems that we can just introduce amd_iommu-specific struct
>> instead of re-using the existing structure for hardware events.
>>
>> I'm planning to add the following structure in the same union:
>>
>> union {
>> ......
>> struct { /* amd_iommu */
>> u8 iommu_csource;
>> u8 iommu_bank;
>> u8 iommu_cntr;
>> u16 iommu_devid;
>> u16 iommu_devid_msk;
>> u16 iommu_domid;
>> u16 iommu_domid_msk;
>> u32 iommu_pasid;
>> u32 iommu_pasid_msk;
>> };
>> };
>>
>> Please let me know what you think, of if I am still missing your points.
> Yes, adding a struct to that union is fine and clarifies things. And
> just because I'm weird like that, there's a u8 hole after iommu_cntr.
Ok, I'll update this in V10 that I'll be sending out this week.
Thanks,
Suravee
Powered by blists - more mailing lists