From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suravee Suthikulpanit Subject: Re: [PATCH V4 0/6] perf/amd/iommu: Enable multi-IOMMU support Date: Thu, 18 Feb 2016 09:30:36 +0700 Message-ID: <56C52CCC.5030303@amd.com> References: <1455182127-17551-1-git-send-email-Suravee.Suthikulpanit@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1455182127-17551-1-git-send-email-Suravee.Suthikulpanit-5C7GfCeVMHo@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org, bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org, peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, acme-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Cc: andihartmann-KuiJ5kEpwI6ELgA04lAiVw@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: iommu@lists.linux-foundation.org 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 > > 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 IOMMUs. > > In addition, this series should also fix current AMD IOMMU PMU driver > initialization issue in some existing KV and CZ platform, where it fails > to write to IOMMU perf counter as reported by Andreas Hartmann here > (http://comments.gmane.org/gmane.linux.kernel.pci/49147). > > Git branch containing this patch series is available here: > > https://github.com/ssuthiku/linux.git perf-iommu-v4 > > Changes from V3 (https://lkml.org/lkml/2016/2/9/845) > * Rebase the code to tip/master per Boris suggestion > * Most changes are in patch 5/6: > * Fix several spelling and styling issues per Boris review comment > * Remove unnecessary pr_debug in the perf amd iommu driver (per Boris) > * Rename several function to make it less confusing (per Boris) > * Properly handle errors when fails to set registers/counters > on multiple IOMMUs. (per Boris) > > Changes from V2 ( https://lkml.org/lkml/2016/1/1/141) > * Ported to 4.5.0-rc2 > * Add reviewed by Joerg for patch 1 and 2 > * Remove EXPORT_SYMBOL from patch 3 (per Joerg suggestion) > * Merge patch 4/6 and 6/6 from V2 into 5/5 in V3 and add > more description in the commit message 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 variable since they are the same thing > > 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: Introduce get_iommu_bnk_cnt_evt_idx > perf/amd/iommu: Enable support for multiple IOMMUs > perf/amd/iommu: Declar pr_fmt and remove unnecessary pr_debug > > arch/x86/events/amd/iommu.c | 197 ++++++++++++++++++++++------------ > arch/x86/events/amd/iommu.h | 40 ------- > arch/x86/include/asm/perf/amd/iommu.h | 42 ++++++++ > drivers/iommu/amd_iommu_init.c | 136 +++++++++++++++++++---- > drivers/iommu/amd_iommu_proto.h | 7 -- > 5 files changed, 286 insertions(+), 136 deletions(-) > delete mode 100644 arch/x86/events/amd/iommu.h > create mode 100644 arch/x86/include/asm/perf/amd/iommu.h > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424832AbcBRCbA (ORCPT ); Wed, 17 Feb 2016 21:31:00 -0500 Received: from mail-bn1bon0099.outbound.protection.outlook.com ([157.56.111.99]:17536 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1424603AbcBRCa6 (ORCPT ); Wed, 17 Feb 2016 21:30:58 -0500 Authentication-Results: lists.linux-foundation.org; dkim=none (message not signed) header.d=none;lists.linux-foundation.org; dmarc=none action=none header.from=amd.com; From: Suravee Suthikulpanit Subject: Re: [PATCH V4 0/6] perf/amd/iommu: Enable multi-IOMMU support To: , , , , References: <1455182127-17551-1-git-send-email-Suravee.Suthikulpanit@amd.com> CC: , , Message-ID: <56C52CCC.5030303@amd.com> Date: Thu, 18 Feb 2016 09:30:36 +0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1455182127-17551-1-git-send-email-Suravee.Suthikulpanit@amd.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [58.10.104.205] X-ClientProxiedBy: SINPR01CA0021.apcprd01.prod.exchangelabs.com (10.141.109.21) To BLUPR12MB0434.namprd12.prod.outlook.com (25.162.92.14) X-MS-Office365-Filtering-Correlation-Id: 15c167d5-1c6a-4a7b-fcb2-08d3380b8766 X-Microsoft-Exchange-Diagnostics: 1;BLUPR12MB0434;2:NyLynUzjs1EggOssW9jhuEA3OVT1XyW+BxuX76PcHOaCk63v6WnsPVeZxcPH+98XrX/RPs6wYJTaQ2KUK7EA43NyvY4lNyFa8gqkWGUTQrv2GhY0c+pyxSrYbJcRcy5DZZVYTZbW5QyMuSrX/LHPgV45oH8FN1NI2yHRQWGLQvxNKcU1kHg3N8P3gydBImg3;3:cilIZjKPkIqnUPbQC32PYMZwSRreT4KKi/XIKTgM/Ek/KVt2LiExM79vcFPyGAfCVtAtgnGTRj9jz5sYEcPdh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gfHxpNUXw9Gv4+vrKdNLsciL9nmf29p6FAGhfNz7fF/8aO06rhQDnAs1NLHXNJWl07TXjNUM6FqzOWynQQ5fn7hWL9yi22lQ+sf+KoZc/wuEbfgb7yuPpZtmlQKGWgMnr9zzb1in3F52LiiQjJIgzrUdYzi8ubUgzdlciycVxRitXAS7bUDgRbPGK/LLNCzPuAMQNb0QTcVpZ0zE3zNoYKLV+cWoEB8r5b4hVkcUHuMSmAs9+/WtekNC43e4AnaJ/s7XWPAv3HquTuEb/Km2NxEGEgmOm/yfjHkYjFCa21nRO44EzaWWQ/5gXiagsFqSPBWg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:BLUPR12MB0434;BCL:0;PCL:0;RULEID:;SRVR:BLUPR12MB0434; X-Forefront-PRVS: 085634EFF4 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(164054003)(479174004)(53754006)(24454002)(76176999)(4326007)(77096005)(66066001)(4001350100001)(33656002)(5001960100002)(65956001)(5004730100002)(19580405001)(80316001)(15975445007)(189998001)(19580395003)(65806001)(87976001)(5001770100001)(2906002)(65816999)(122386002)(47776003)(50986999)(83506001)(54356999)(86362001)(87266999)(6116002)(3846002)(42186005)(36756003)(230700001)(586003)(92566002)(2950100001)(40100003)(1096002)(59896002)(5008740100001)(2201001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR12MB0434;H:Suravees-MacBook-Pro.local;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BLUPR12MB0434;23:W6ZGdvn9LutnHDQuqUaOchMEka/ctD2BEA3Z9?= =?Windows-1252?Q?wnUl8CnLcNZBtAeDppZ+CJc7gSBJKc7oSr7jhee00T7nX6NCSVygcNQc?= =?Windows-1252?Q?C4yb2dU7orraIsFTfEJr46cVAyHDTnhwOaD9GpmJfPQwgYEy7EFN5DjJ?= =?Windows-1252?Q?+3lUzWaSI5wOp9onp+NXcAV88/kMpqBvejyhAzdGSIFgRl6KdYtC5w6u?= =?Windows-1252?Q?55W5Y/7/xEIIFNnnefgIl9yh9FDR3Sf0/GH5PZRaAudAAepnIZmodwpv?= =?Windows-1252?Q?m89Jd2QeivaqQ4kV0omj/E+oHp3BSdZCrzpDj9Wzu2Z/QlLVp7YTH0A4?= =?Windows-1252?Q?D9HRQuMSuA2iQV+fm+PG+ObcRz+cBqWLdGUVtgpq/zRv3ANiEQzHXjZ+?= =?Windows-1252?Q?std6yHEpwu4CrYO2H2/HtCGLnHEZV62VApfUyTXSJvZoSaE5XY7IhXvk?= =?Windows-1252?Q?BHOx52lOxPeVJDOo4S/UBOUxfT6dQoDxKAaEXR8PtnNzYTx6ExSGdcf/?= =?Windows-1252?Q?E5b88SnUJyipB2UqD8bHzgeKBoPKUsUX5HjnUbXX37xyOrL5cPMZVsSj?= =?Windows-1252?Q?8mUb5qZvqXWRM/ao8i7lwvr6Eii8Fh6T/Rme+meBRt0fHJHhWjCIZUNt?= =?Windows-1252?Q?5CtN8Ostqzuv0iPX6RkwA/Rl37qNXiO8Ne8/zMHBIOCi4S0bOuuktDr6?= =?Windows-1252?Q?uXr7zEsjbABf7uhs9vk76KhAB9IK8CNyjc1WP6MjwsM7x9T0dv2fB/j3?= =?Windows-1252?Q?WTPrMgkr3QOIyU4sIN9s/FXnaaIUdTrKs2k6rbCy/Wqz189Jsdh2tLlq?= =?Windows-1252?Q?vJrMxrILPRqeGqPR5mL0GjHEsVdi5S/utcVaAH1zwKuFosMgGrpdTFCl?= =?Windows-1252?Q?QFYzitDmb8xbzcMXCqqSInhxtbmFKkJyMXAo7ryCmMzzdQjXaRB+tVL6?= =?Windows-1252?Q?rcHPsCDXwmAqFFEd+UH3XdTCMdCmB08d1Um+MObk5qpBTBXXJ+ILA6FY?= =?Windows-1252?Q?XF7p+rB2vKtpZKYWmhGfVLOD12t5qHh9ctFfjagZDNgcmf/Pjt0Wtp/Y?= =?Windows-1252?Q?1gK2McdQbUaYQ+GKVg2KIP8gYUafzgdATSfJt10KbblT6Luq7asHorXj?= =?Windows-1252?Q?QKiWtinqcFTVgujviTbW7yGT6mxFhZLQzCAU06sKFQa8M2nRTcZ0neCU?= =?Windows-1252?Q?RVUFMthOLO+fCgS8HybK5eVDDD48htwETrxgcCf7oamm564hiGwj4SYY?= =?Windows-1252?Q?G6oZiuq3JdmSa+rd9H1GWJxzmUOeJmhscENm2QXhA8iIzbHY+Eio+yiQ?= =?Windows-1252?Q?5TV?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR12MB0434;5:LD4VeF+LAiqEZEdMatdgJ9JFq46fTSccZ94GAUpRR3Lh5wO7jVj/CJiXKoZftQRQ2z7085tyDs2kHd8hGSdKX6wlAzRWoi8xYf009SoLOtkYsIsokn21kLCeWxIpC3csBLKh2XmZU8v5HyTGPzeL1Q==;24:evR+4ExHQbLmuN//G858KQl3ejhgD35fnRVHkMFX1W2+ce0X+gRaq2DG16VXzleioCWPMSUQoe+NBUotBb49v9hnnE4cQm02gGsmY/1Dmi8=;20:NyEOk2RVgtI9zcfU0qiVX554sNl26iJOJtCZRfRYD2nEHu+xYsLczKM9sPsShKs3SGlPzsEgBb4jmaby3UjK32LDr0pWJTbkGf8lych5Jj//ZyNsPhFq57y3Cf4i+1UahZxj/21kAkDW0hw63RUZJD/kiCdYD4ukNJyWrqLSk4nMZ6IPVXGEPy4HHXRcB79Zra2PwMJUHwOLqXs86eTAnBQRV70KHfrLkqSHFfxx3BazhkNegzL2KOfQ+SkLtG4N SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2016 02:30:52.7934 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0434 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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 IOMMUs. > > In addition, this series should also fix current AMD IOMMU PMU driver > initialization issue in some existing KV and CZ platform, where it fails > to write to IOMMU perf counter as reported by Andreas Hartmann here > (http://comments.gmane.org/gmane.linux.kernel.pci/49147). > > Git branch containing this patch series is available here: > > https://github.com/ssuthiku/linux.git perf-iommu-v4 > > Changes from V3 (https://lkml.org/lkml/2016/2/9/845) > * Rebase the code to tip/master per Boris suggestion > * Most changes are in patch 5/6: > * Fix several spelling and styling issues per Boris review comment > * Remove unnecessary pr_debug in the perf amd iommu driver (per Boris) > * Rename several function to make it less confusing (per Boris) > * Properly handle errors when fails to set registers/counters > on multiple IOMMUs. (per Boris) > > Changes from V2 ( https://lkml.org/lkml/2016/1/1/141) > * Ported to 4.5.0-rc2 > * Add reviewed by Joerg for patch 1 and 2 > * Remove EXPORT_SYMBOL from patch 3 (per Joerg suggestion) > * Merge patch 4/6 and 6/6 from V2 into 5/5 in V3 and add > more description in the commit message 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 variable since they are the same thing > > 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: Introduce get_iommu_bnk_cnt_evt_idx > perf/amd/iommu: Enable support for multiple IOMMUs > perf/amd/iommu: Declar pr_fmt and remove unnecessary pr_debug > > arch/x86/events/amd/iommu.c | 197 ++++++++++++++++++++++------------ > arch/x86/events/amd/iommu.h | 40 ------- > arch/x86/include/asm/perf/amd/iommu.h | 42 ++++++++ > drivers/iommu/amd_iommu_init.c | 136 +++++++++++++++++++---- > drivers/iommu/amd_iommu_proto.h | 7 -- > 5 files changed, 286 insertions(+), 136 deletions(-) > delete mode 100644 arch/x86/events/amd/iommu.h > create mode 100644 arch/x86/include/asm/perf/amd/iommu.h >