Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp724891rdg; Thu, 12 Oct 2023 21:26:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7Rw7twnpt0/Suuj4QoHjOuJ1qlTRwOdcGGkPCfXV9GME0LB2OH3P7xpHpTXPym6+ASkQL X-Received: by 2002:a05:6a20:9150:b0:16b:8154:2168 with SMTP id x16-20020a056a20915000b0016b81542168mr20930795pzc.26.1697171217614; Thu, 12 Oct 2023 21:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697171217; cv=none; d=google.com; s=arc-20160816; b=yLY98cRCD21gUpAVfFL+2MmzRK4pVd3Wl+4eA8FIv+MK4or5sVEdyjXUk+Mqa4v+Ce WRLvbheYRgEc8f8gEBZBfDoanrhdejogDJLG0GA61UbNlaQiZMo3I/pTJN2kvKVadHsl cY8Day+EedUpCuzfUfyAurtK9LCA/MJk8OkYYdi54LGEYi1w76IjT4qf4qWyqJ1lFFPv xwtWuzzJ/NmdGkQlxPtscrlyQ/mZDyOYDdyoiYBEUCv68tCFCThKS+9QFUNlKuZ8EFOB rE1PshrKOlsU6TtyNU7/6gAewb/sumVuP8LGSR9iW7vW+/VIqBErl9D3zQ9X/nQ1hgF4 MKrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=dLY7IoqtFavaFIsX4t/LowA09YdJHjejMIZgmIBCs6c=; fh=w/qFDxdss3bSPCsB266+5t66+cspixC+AJhSLGevkec=; b=fBlrQghhHl94pzbk4SGQ5JohMSkj9G/iUGR+zO7ujHO23b6iPypU9F5ewyPdOwCPw4 U/ebWOxyI9PeebYbeO8X6GH6X2FypNqiq8zq+JbPRSN3jKvPjQ2YQFkm00ND1CZN7gJ0 dBjnmEdaF6u3ZPlCExnzgNdAFusOH/QpLelZ+g4iv0BcEmXXqEPv3zYpsydPo9NkdnKP HVBzqThm4xGcZnPDYxog69RbSYjsU9V3pLnGFiSCX2i0YAmCtehfZpm39AIcTuaKh+k4 nK1/jNf4cglGnm7PC/LxvnXkPNguN2PbiimR+K25lb46Aplo4toCCiaG4+Oua+Nfyry2 UfBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Jm44ktN0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id jn20-20020a170903051400b001bdafae4b7dsi2104425plb.43.2023.10.12.21.26.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 21:26:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Jm44ktN0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CF1B38216908; Thu, 12 Oct 2023 21:26:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbjJME0k (ORCPT + 99 others); Fri, 13 Oct 2023 00:26:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjJME0j (ORCPT ); Fri, 13 Oct 2023 00:26:39 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4943B8 for ; Thu, 12 Oct 2023 21:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697171197; x=1728707197; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=mZ+2rpTM3/mzvP3ekfm+ZTaIUCQECAeFuhaWR/OeRYk=; b=Jm44ktN0k9mv4hlMbw3lRB7ltVgDYdeNgc+OCgqgf+YLM8hp1d2NUZKO DylaZKKbdj8EfkpffXDrPq+oRphnCtUGCbAjhjR/358jongiVFwSbUaiE oPzzCDsiBqabVGP50p/WWmiotjY9X1Z7CIrspBb2nuLREVkS2iEZPQ5Ik K3K3e8FzNqyam5Bmnju3pw1SqX1WodsUf41Y6OOSQ7hsJ0t8XSRJxRB4S Nlmyapc/fU2wXKneIrOvIOMtii9TMX+wXuEOENErKMe7QfcHluOYRXjRK 6Nz68a029TenUK5iH0148lzn0Vn1wc2gdTgoDm6R7ib0GZ4Q+w3OPCyT4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="387956829" X-IronPort-AV: E=Sophos;i="6.03,221,1694761200"; d="scan'208";a="387956829" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 21:26:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="878390076" X-IronPort-AV: E=Sophos;i="6.03,221,1694761200"; d="scan'208";a="878390076" Received: from allen-box.sh.intel.com (HELO [10.239.159.127]) ([10.239.159.127]) by orsmga004.jf.intel.com with ESMTP; 12 Oct 2023 21:26:34 -0700 Message-ID: <5baa8c11-806c-4937-819d-a3b99a07c690@linux.intel.com> Date: Fri, 13 Oct 2023 12:23:00 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: baolu.lu@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATH v4 0/3] iommu/vt-d: debugfs: Enhancements to IOMMU debugfs Content-Language: en-US To: Jingqi Liu , iommu@lists.linux.dev, Tian Kevin , David Woodhouse , Joerg Roedel , Will Deacon , Robin Murphy References: <20231011083915.36706-1-Jingqi.liu@intel.com> From: Baolu Lu In-Reply-To: <20231011083915.36706-1-Jingqi.liu@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 12 Oct 2023 21:26:49 -0700 (PDT) On 10/11/23 4:39 PM, Jingqi Liu wrote: > The original debugfs only dumps all IOMMU page tables without pasid > supported. It traverses all devices on the pci bus, then dumps all page > tables based on device domains. This traversal is from software > perspective. This series dumps page tables whose mappings are created > and destroyed by the iommu_map/unmap() interfaces, by traversing root > tables, context tables, pasid directories and pasid tables from hardware > perspective. It supports dumping a specified page table in legacy mode > or scalable mode with or without a specified pasid. It adds a debugfs > directory per pair of {device, pasid} when attaching device with pasid, > i.e. /sys/kernel/debug/iommu/intel//. And > create a debugfs file in the directory for users to dump the page table > corresponding to {device, pasid}. e.g. > /sys/kernel/debug/iommu/intel/0000:00:02.0/1/domain_translation_struct. > For the default domain without pasid, it creates a debugfs file in the > debugfs device directory for users to dump its page table. e.g. > /sys/kernel/debug/iommu/intel/0000:00:02.0/domain_translation_struct. > Remove the corresponding debugfs directory and file when detaching or > releasing a device. For legacy mode, according to bus number and DEVFN, > traverse the root table and context table to get the pointer of page > table in the context table entry, then dump the specified page table. > For scalable mode, according to bus number, DEVFN and pasid, traverse > the root table, context table, pasid directory and pasid table to get > the pointer of page table in the pasid table entry, then dump the > specified page table. Examples are as follows: 1) Dump the page table of > device "0000:00:01.0" that only supports legacy mode. $ sudo cat > /sys/kernel/debug/iommu/intel/0000:00:01.0/domain_translation_struct 2) > Dump the page table of device "0000:00:02.0" with PASID "1" that > supports scalable mode. $ sudo cat > /sys/kernel/debug/iommu/intel/0000:00:0a.0/1/domain_translation_struct This series doesn't apply to v6.6-rc5. Can you please rebase and send a new version? Best regards, baolu