Received: by 10.223.176.5 with SMTP id f5csp3273047wra; Mon, 29 Jan 2018 11:07:19 -0800 (PST) X-Google-Smtp-Source: AH8x227hN7MrSiWJSLomzKZVxT+RLtPsJ3SvKMDWxA3g0rcmzfhJNy0ZYNP6o/nDIGAkzair2vWN X-Received: by 10.98.36.77 with SMTP id r74mr28138999pfj.31.1517252839194; Mon, 29 Jan 2018 11:07:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517252839; cv=none; d=google.com; s=arc-20160816; b=zVIOT2uDZqVhuVmznyEkb6iYbRk/GScTObSbd9kzjGCEM+6XMosXtw6l63wQnSmh/4 oitGElHBGkpVFcwql1x3YWWdZbxaB/NxxB5xaADE9hTXF2MCWl3YqA7JiogaOGF+ToHh or1zzTtzEcMzDUrT03lp9hg7niW4BryLt3yjZwxTBmN+U55WsB7qA+6rAVmxHczeawrW kXgPu9pK2UztAULGK/gRJe4NeO4qGOt0voFW1tjZLqNvCCZZwSU8xOzDI3CVmkAZs+Jn f6Ura4D/mmgwHxE+e8pZXibSQYizny8YL/dLKXc0E9SRGVA3z4bAVf7OSq2XJWJAQXDi HnqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=DvoWhFXWvhv6OOFbsI67U48lQpOb97O7HCxHhVbl6pU=; b=FML6r5MfYk9pCT32UnNW1KN8wa56Xf7mTGNf1Dqgi3/hVngm/1NeDnB54fPQf/rH0y qmjeDZziENt+Xe10/awT7VruqneD/b7B3go1dIAIDKexesTCx+c41o5xMppPSyvz3V17 7wvy4633m+auc73NSYIcEyUb5LOGc0gAZ7BGzx40GLmEXW6CCgZFpyhkZ9tRiLUp7Th7 SsR6TJQmlYnbTzIgH2zLbcg+HIxWfzbSm59a2izH5zJBuGl9fM/N+YKgazCD4xA/dERa Er9qrk37ZmSkas7Jtb16ooWGfb0TnEikldGXczGyiEc2vNgA/WLg3v4ZF6nQDFvmOY7v eVxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=V8M3HQvb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f29si12463744pfk.117.2018.01.29.11.07.04; Mon, 29 Jan 2018 11:07:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=V8M3HQvb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751522AbeA2TFX (ORCPT + 99 others); Mon, 29 Jan 2018 14:05:23 -0500 Received: from mail-cys01nam02on0054.outbound.protection.outlook.com ([104.47.37.54]:53568 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750959AbeA2TFV (ORCPT ); Mon, 29 Jan 2018 14:05:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DvoWhFXWvhv6OOFbsI67U48lQpOb97O7HCxHhVbl6pU=; b=V8M3HQvb9GzUnL8Wc6JBWyjptSByb29jSr7oUxFkgBJGNEKDA0axw6j+2SsM8iMbEfSFoGCp/iJ3Vf9snVVLd+PcaBRJV4vG+wdLSOUhpIrQBkqY3sas+gF1A/X6dDzbT6GgKjS+jM2DcXX7IayXZ7cVdQiV+4AZCKH19C+PeMc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [10.236.109.62] (165.204.78.1) by CY4PR12MB1205.namprd12.prod.outlook.com (10.168.164.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 19:05:19 +0000 Subject: Re: [PATCH 1/5] iommu/amd - Add debugfs support To: Borislav Petkov Cc: iommu@lists.linux-foundation.org, joro@8bytes.org, linux-kernel@vger.kernel.org References: <151701071164.16448.3611271062222336838.stgit@taos> <151701073560.16448.7715293076458740364.stgit@taos> <20180127000045.gatkndpu64no3o3j@pd.tnic> From: Gary R Hook Message-ID: Date: Mon, 29 Jan 2018 13:05:15 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180127000045.gatkndpu64no3o3j@pd.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR1701CA0009.namprd17.prod.outlook.com (10.172.58.19) To CY4PR12MB1205.namprd12.prod.outlook.com (10.168.164.149) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5e705652-596a-44aa-695a-08d5674b3ddd X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:CY4PR12MB1205; X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1205;3:tRf3LNpfpL2htygrcNDEZewyRlL1sjdQ+wcI6nJnwsh+jKJHK+lRX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CvNGk1GWDiNYeSSDtgXcQG6g0d0eTRzm3XAygwqIIu0g3V3mPsjqVU+ijXUNxMcc5aegcL0CC6FTifhc2ft3yYpTrAze4WfhdtqoWimevA8DMNRFzmH/0GEoQQEfILWDZT4r2zoh7wCOaKn9Zli5B7zYtBL5l8tp+jaLxziANTXHvCFdD25wdp3WGm2xxEw3FfrDZJgLiYZh4p6JnT18eZnPwH38CKFQqiVVq3PMeBej+j94/CTT/ZTwFmVdX0yNN2nCELV4v9LyE0wcIcCPAsnO9Zdseg5X3vPqui+ZS;4:Mj8OZ4SXL8tqN07M2QuC2T0mrgo3xm6D11i/SQjK6gPURuRKhpap97SoGjVJUOhFhg6F6oLKepHkZrEi6Uj8VUXv9UnrHrfejuSOrKSsq0MR/YtRk/quViNBeW4W1s5Kwp+buBXNa3swICHf4SuFwXkDfQ25aZOJwNI9JWUoCWxuf7Dfidyf5Ceww+vW0syTqSO8YAipatZz49g+MwZ2easo9UP0rRYxodxC026j6TTz0UreIT2y0U708gPcm73yiSNw2AUXGlsqPYaH5rD8lA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(3231101)(944501161)(93006095)(93001095)(3002001)(6055026)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:CY4PR12MB1205;BCL:0;PCL:0;RULEID:;SRVR:CY4PR12MB1205; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(396003)(39860400002)(366004)(376002)(39380400002)(346002)(199004)(189003)(2906002)(65826007)(229853002)(5660300001)(64126003)(305945005)(16526019)(4326008)(7736002)(6486002)(186003)(105586002)(31686004)(68736007)(90366009)(72206003)(478600001)(8936002)(81166006)(81156014)(8676002)(3846002)(50466002)(6116002)(77096007)(83506002)(67846002)(6246003)(52146003)(23676004)(86362001)(52116002)(230700001)(31696002)(2486003)(36756003)(2950100002)(53936002)(97736004)(106356001)(65806001)(53546011)(386003)(6666003)(26005)(16576012)(59450400001)(25786009)(76176011)(58126008)(6916009)(66066001)(65956001)(316002)(47776003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1205;H:[10.236.109.62];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMjA1OzIzOk1BNzBvNXFTbzVHNTRvZmVwVG55SUlmcFkr?= =?utf-8?B?aVFYZ2NmcGRNUzZtR3NRcHIzL0JiMkU0Ung3Z040L1M0eXo2UEtKOTVPTjEw?= =?utf-8?B?N2FqMTJSZnJhSzVmelFPK0o0Y2JGQWFiVWx1RzBoQTFaU0ovL2x6WTYyMWw0?= =?utf-8?B?QytoaUpBTkg5YXBLaWFnTVNDOWtnMS9DNi9oYTRHMU5OM24xMWp0M01JRzFz?= =?utf-8?B?RmRZcGh3L2oreUllc2VwcHdJVGNPYllNdzJWVXZUdDFQNzFYajhvUjlYaE1S?= =?utf-8?B?WStOR0t6WkZ1OSsyRTJiSElON2lTKzdxZWt5OFdydU12SmdMQzZKV2dGVTBI?= =?utf-8?B?UnF5elBRRmJDRjFycE9MYXVrbk5IZ3J3cTQ0TC85MFlXQUNzbEdsSW1yNHVx?= =?utf-8?B?eGZwUk0wV2FFc3Y5T3ZoaGIwSytpbjVVVWF4c0hKSGdXeWdkUFhvaExzQWJT?= =?utf-8?B?SjVXQUd6Vk40dU9wQnIxWHlHbmQrMGtiQkhieEpoWXczNGtYcFlkN1Zlc2to?= =?utf-8?B?YmZIbmVIWXBEU3IxdGZZdDVQR0VxQTZLWkszM3d3Q2piNTVSVThrQ2ZYZjYx?= =?utf-8?B?MElKUC8xRzEzODMrMTNDNXpI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KUy+7+X0ONuh6zP+C1NuBZWdREBAkb0xVoF+EevedykSnw7AhJzO7Al8=;24:EPz+gj5rMHEI6uAYjptMAcMYfgUA5tsGv4Yql9mdWwn/Z+MV6CAk3z4T4pF4Kbh1rE6LY3dhEuQ/dAPmfKmDkJuVXHIJK6gG/97OiPvymH0=;7:tJi/O/vwW1Y24CGwFDKrwb33spoXqFZA881s9zyg0WaDl+JW5UJ4g1LHt2iaAq79Nij9kOj2BCUMvCYZkGAIY8I1jKISahSaLPjhmMmxNQtT4GbLP/cxxWWm4tzp+TaVq9gC3M3zRbEHkZyMjn1/LK9KXVg+zfAQPxvrDS4NzWp9dJ+k215ysD0+qyjJ1QwJjNUaF4iclpTztXQMPDjJHxEo3lOeP8r/mf4ZOvlWyIFKzvHVRE28VL0tGER6AsBt SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1205;20:l/0Jn6IhDJn83Zzsf9nlPSen8LsCd9QNI8VB48lYnTHoCwaVqZdrH0ysOEyA3M86B6ir2w9fe/4KZUrumO7ofHWCLdVO0ZYT1G3VpciFl8NPyofoiEeevz1UF0PZ4Ti9lTd3Ney/vjwQ0BdsxNmTPUUGy78GLbXAJJYhIdPh68Kg1f6nYQpF1135DpSQ9CABo5eSATGYSfd6lsiJdZSCQWSzCjPY59TqRjuHWL6jIgbt7TeA+Y+BCuJsRIKlwJQ5 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 19:05:19.5453 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5e705652-596a-44aa-695a-08d5674b3ddd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1205 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/26/2018 06:00 PM, Borislav Petkov wrote: > On Fri, Jan 26, 2018 at 05:52:15PM -0600, Gary R Hook wrote: >> --- a/drivers/iommu/Kconfig >> +++ b/drivers/iommu/Kconfig >> @@ -135,6 +135,15 @@ config AMD_IOMMU_V2 >> hardware. Select this option if you want to use devices that support >> the PCI PRI and PASID interface. >> >> +config AMD_IOMMU_DEBUG >> + bool "Expose AMD IOMMU internals in DebugFS" >> + depends on AMD_IOMMU && DEBUG_FS >> + default n >> + help >> + With this option you can enable access to AMD IOMMU registers and >> + data structures through debugfs. Select this to see information >> + about the internal state of the device. >> + >> # Intel IOMMU support >> config DMAR_TABLE >> bool >> diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile >> index 1fb695854809..d9e9ed5f6cfc 100644 >> --- a/drivers/iommu/Makefile >> +++ b/drivers/iommu/Makefile >> @@ -9,7 +9,7 @@ obj-$(CONFIG_IOMMU_IO_PGTABLE_LPAE) += io-pgtable-arm.o >> obj-$(CONFIG_IOMMU_IOVA) += iova.o >> obj-$(CONFIG_OF_IOMMU) += of_iommu.o >> obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o >> -obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o >> +obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o amd_iommu_debugfs.o > > That looks like it needs to be: > > obj-$(CONFIG_AMD_IOMMU_DEBUG) += amd_iommu_debugfs.o Of course. Thanks, Boris. I'll get that in v2.