Received: by 10.223.185.116 with SMTP id b49csp4207574wrg; Tue, 13 Feb 2018 14:52:38 -0800 (PST) X-Google-Smtp-Source: AH8x224MIKxdOs0tJJJnYCO3g/up2szHIkFyAI2xxFHxctkWcmy4YZJxzLkVPof07zh/9cz9L0Jh X-Received: by 10.99.114.86 with SMTP id c22mr2153571pgn.41.1518562358088; Tue, 13 Feb 2018 14:52:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518562358; cv=none; d=google.com; s=arc-20160816; b=aFZmJK5q58TD4acH9TYCX2Ncd4cFQkCDycEzbYOGBlCWGOKK4LN4iKgC2uYMAHfHp3 M7uNhdyqAcXOih1El1/IhO8FYa1qRNpvLByhi5qmp/gdMW81o7x2MZHpn6w3kmYjsLiW Q3QJlBe38qVGVNXbbdZjoD2tQEjFOA8AaJSWb0Ear4u+AunqwV4Aj2Yg8cC7WhZiEomB XtbH8EhHjNgCuLcyugOGX/x4LaujETD8VKzkuJIT4KxxE1dC5+QNdkXpzhEUilxdjR4b h9LWFAocAFzizjAFZyu64dERwZ9VW1T6fLyxZpi9UyDZfbvWRbZthX/kV719byaD6N1Y QuLg== 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:message-id:subject:cc:to:from :date:arc-authentication-results; bh=35hcok6JbzaVAFRgUfqld/8amzj6KY5xkQVJC1eVpGU=; b=iAhyyKqoq5IoCMUTD5jjOFz6rs/b+hCROESBgCkR+gk+k2FYe7WsKOymydeTDjCCrh M3B38AU4JosJVlWqIoQnzAd6/fOCit0qugmKmVdl8M5Z9firoxzQUzAtPJFp/CzZMHuc jCTJ68An5Vkj2cqvqMty59kNE0BSMYuruI++HlknBYZlEFIP0seUN2/fi567MRLTOShD suhpJSzoMRQxFYVVxMpju1hWBts5Lrk2aU8HKz+MB1+M8GFDEDekqLm6C79kBmjw4S41 /FnDVu59DNj1bfg/of8sunTOcX9dh+7rTkLGHrlA4BV+YEhIFlm+mEDgSfbvI4VPiOt3 yp8w== 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 m18si484833pgu.633.2018.02.13.14.52.22; Tue, 13 Feb 2018 14:52:38 -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 S966053AbeBMWvk (ORCPT + 99 others); Tue, 13 Feb 2018 17:51:40 -0500 Received: from mga01.intel.com ([192.55.52.88]:63880 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965942AbeBMWvj (ORCPT ); Tue, 13 Feb 2018 17:51:39 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2018 14:51:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,509,1511856000"; d="scan'208";a="17899061" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga008.jf.intel.com with ESMTP; 13 Feb 2018 14:51:38 -0800 Date: Tue, 13 Feb 2018 14:53:32 -0800 From: Jacob Pan To: "Raj, Ashok" Cc: Joerg Roedel , Sohil Mehta , Alex Williamson , David Woodhouse , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Gayatri Kammela , Ravi V Shankar , Andy Shevchenko , Lu Baolu , Fenghua Yu , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v7 0/5] Add Intel IOMMU debugfs support Message-ID: <20180213145332.35c73eda@jacob-builder> In-Reply-To: <20180213214002.GA27066@otc-nc-03> References: <1517619001-148586-1-git-send-email-sohil.mehta@intel.com> <20180213140303.42mbzfxpypljy37l@8bytes.org> <20180213214002.GA27066@otc-nc-03> Organization: OTC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Feb 2018 13:40:02 -0800 "Raj, Ashok" wrote: > Hi Joerg, > > On Tue, Feb 13, 2018 at 03:03:03PM +0100, Joerg Roedel wrote: > > On Fri, Feb 02, 2018 at 04:49:56PM -0800, Sohil Mehta wrote: > > > 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/'. > > > > This looks like it only presents data from the iommu-hardware > > (register state) or from in-memory data structures used by the > > hardware. Can't all this be read out from user-space with libpci > > and /dev/mem access? > > True, we can do the tools and keep it strictly user space, but find > it very convenient to keep the kernel code and debugfs together. When > there are bug-reports its rather easy for the user to collect some > data and report it, and all the data-structures we need are readily > available instead of finding a round-about way to capture the same > data from user-space. > > This version has only hw dumps for now, but we plan to add some other > things like walking 2nd level page-tables, or get some SVM specific > data from the driver in the future. > We did start out with /dev/mem but run into CONFIG_STRICT_DEVMEM requirement which is turned on by default. libpci is only limited to PCI config space access, right? > > > > Things are different for kernel-defined data structures, as they > > might change between releases and can be presented to user-space > > via debugfs is needed, but the data structures used by the hardware > > should be pretty stable. > > Cheers, > Ashok [Jacob Pan]