Received: by 10.223.176.5 with SMTP id f5csp1531021wra; Sun, 4 Feb 2018 06:16:30 -0800 (PST) X-Google-Smtp-Source: AH8x224S03gCWXM3S2bpKVe9JWIJkPicMWxAmocD/YOrBrLGTsLEuvkOd+xnlRvcIxfwJRgyIShA X-Received: by 10.101.87.195 with SMTP id q3mr35422102pgr.428.1517753790277; Sun, 04 Feb 2018 06:16:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517753790; cv=none; d=google.com; s=arc-20160816; b=jf3RpKo9npT7Ob9F5/LWHipldMPZNCuVG+/2p0qUtetYrbl4vTehUEH9KRM39SmxGT cUy9//fWwTtBLVHHj7JrOb+7NC/VobuRr6CoLWti/PX0fdzEVd89kVd+09Gb5r8MP48N NNeGiWJXYJ1a3Zu964/yVEnWOK3RVEdk9zMYbAQt4c5o7jfL+zZAbrLIW7AQxfl2q9Zb kETPb6Zw258bXWkUCjSE5RMQuuoPYqS9pUk3XIB+ZKzLkNDUHmrwVYoZiGKoac4d5X5L OL67/X4gg+P1w4aA+XjwuVeUzp+e/rMz4I7xVxDOT0it2Zy7tZfho/nHkHq8aHfWGIQ/ SLJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=sMES1/ZIRgSGHpZ5eg0YbKTIDz1dkQFs1kJjonikU4k=; b=KglonappyVfW5bWSeY8fISpc4vQrm44t4qp4ATXMIyiGTsnylH2agUFpNeR4OO8L1m tC3c7aTFv8lWAV8Bz7A7iqg1a7yanJRgfBJ/zC82dfjC2KSbdeQoeyGqZZzIPAkvvRM/ NKNCE8aS3JL73q/Nn8hVnn7CymV1QGM+zF20zTdbEqLVfIdh4ddzSZEvEnaK/6IQuCB2 +XbadnEsaiIT2OztrJmsMXOUTrbu88007kcQRLiXEW+WSbqmUzC1RofrRx4MhqNyDc3B +18C69J91ZPgu5MYPJ8taMK+VAaq4Te27Dh9XQkaSk6SJPgwWl4GFbY13exgjP+Jxfok Clug== ARC-Authentication-Results: i=1; mx.google.com; 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 i17si739130pfk.396.2018.02.04.06.16.05; Sun, 04 Feb 2018 06:16:30 -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; 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 S1751901AbeBDONd (ORCPT + 99 others); Sun, 4 Feb 2018 09:13:33 -0500 Received: from mga14.intel.com ([192.55.52.115]:52063 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750995AbeBDON1 (ORCPT ); Sun, 4 Feb 2018 09:13:27 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Feb 2018 06:13:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,458,1511856000"; d="scan'208";a="201238860" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by fmsmga006.fm.intel.com with ESMTP; 04 Feb 2018 06:13:22 -0800 Message-ID: <1517753602.7000.1508.camel@linux.intel.com> Subject: Re: [PATCH v7 0/5] Add Intel IOMMU debugfs support From: Andy Shevchenko To: Sohil Mehta , Joerg Roedel Cc: Alex Williamson , Ashok Raj , David Woodhouse , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Jacob Pan , Gayatri Kammela , Ravi V Shankar , Lu Baolu , Fenghua Yu Date: Sun, 04 Feb 2018 16:13:22 +0200 In-Reply-To: <1517619001-148586-1-git-send-email-sohil.mehta@intel.com> References: <1517619001-148586-1-git-send-email-sohil.mehta@intel.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-02-02 at 16:49 -0800, Sohil Mehta wrote: > Hi All, > > This series aims to add debugfs support for Intel IOMMU. It exposes > IOMMU > registers, internal context and dumps individual table entries to help > debug > Intel IOMMUs. > > The first patch does the ground work for the following patches by > reorganizing > some Intel IOMMU data structures. The following patches create a new > Kconfig > option - INTEL_IOMMU_DEBUG and add debugfs support for IOMMU context > internals, > register contents, PASID internals, and Interrupt remapping in that > order. The > information can be accessed in sysfs at > '/sys/kernel/debug/intel_iommu/'. > > Nice and clean in comparison to v1. Reviewed-by: Andy Shevchenko Joerg, note, that macro, which patch 2 defines privately, likely will make v4.16-rc1, thus patch 2 might need to be rebased. So, please, wait till v4.16-rc1 before applying this. > Regards, > Sohil > > Changes since v6: > - Split patch 1/5 and 2/5 differently > - Simplify and improve code formatting > - Use macro for register set definitions > - Fix compiler warning for readq > - Add Co-Developed-by tag to commit messages > > Changes since v5: > - Change the order of includes to an alphabetical order > - Change seq_printf and seq_puts formatting > > Changes since v4: > - Change to a SPDX license tag > - Fix seq_printf formatting and remove leading '\n's > > Changes since v3: > - Remove an unused function parameter from some of the functions > - Fix checkpatch.pl warnings > - Remove error reporting for debugfs_create_file functions > - Fix unnecessary reprogramming of the context entries > - Simplify and merge the show context and extended context patch into > one > - Remove redundant IOMMU null check under for_each_active_iommu > - Update the commit title to be consistent > > Changes since v2: > - Added a macro for seq file operations based on recommendation by > Andy > Shevchenko. The marco can be moved to seq_file.h at a future point > - Changed the debugfs file names to more relevant ones > - Added information for MTRR registers in the regset file > > Changes since v1: > - Fixed seq_printf formatting > - Handled the case when Interrupt remapping is not enabled > > Gayatri Kammela (4): > iommu/vt-d: Relocate struct/function declarations to its header > files > iommu/vt-d: Enable debugfs support to show context internals > iommu/vt-d: Add debugfs support to show register contents > iommu/vt-d: Add debugfs support to show Pasid table contents > > Sohil Mehta (1): > iommu/vt-d: Add debugfs support for Interrupt remapping > > drivers/iommu/Kconfig | 8 + > drivers/iommu/Makefile | 1 + > drivers/iommu/intel-iommu-debug.c | 338 > ++++++++++++++++++++++++++++++++++++++ > drivers/iommu/intel-iommu.c | 34 +--- > drivers/iommu/intel-svm.c | 8 - > include/linux/intel-iommu.h | 39 +++++ > include/linux/intel-svm.h | 10 +- > 7 files changed, 400 insertions(+), 38 deletions(-) > create mode 100644 drivers/iommu/intel-iommu-debug.c > -- Andy Shevchenko Intel Finland Oy