From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6019CC433DB for ; Fri, 12 Feb 2021 10:51:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2AAE064DCD for ; Fri, 12 Feb 2021 10:51:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230125AbhBLKvX (ORCPT ); Fri, 12 Feb 2021 05:51:23 -0500 Received: from 8bytes.org ([81.169.241.247]:55646 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230023AbhBLKvW (ORCPT ); Fri, 12 Feb 2021 05:51:22 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id D2EDC310; Fri, 12 Feb 2021 11:50:40 +0100 (CET) Date: Fri, 12 Feb 2021 11:50:39 +0100 From: Joerg Roedel To: Sai Prakash Ranjan Cc: Will Deacon , Robin Murphy , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] iommu: Add device name to iommu map/unmap trace events Message-ID: <20210212105039.GG7302@8bytes.org> References: <20210209123620.19993-1-saiprakash.ranjan@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210209123620.19993-1-saiprakash.ranjan@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue, Feb 09, 2021 at 06:06:20PM +0530, Sai Prakash Ranjan wrote: > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 5e7fe519430a..6064187d9bb6 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -87,6 +87,7 @@ struct iommu_domain { > void *handler_token; > struct iommu_domain_geometry geometry; > void *iova_cookie; > + char dev_name[32]; > }; No, definitly not. A domain is a device DMA address space which can be used by more than one device. Just look at IOMMU groups with more than one member device, in this case just one device name would be very misleading. Regards, Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3821C433DB for ; Fri, 12 Feb 2021 10:50:59 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 45EA864E65 for ; Fri, 12 Feb 2021 10:50:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45EA864E65 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EFE3587229; Fri, 12 Feb 2021 10:50:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IwoDv-i2hxtL; Fri, 12 Feb 2021 10:50:57 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 7B747861AB; Fri, 12 Feb 2021 10:50:57 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5FB04C0174; Fri, 12 Feb 2021 10:50:57 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 378A3C013A for ; Fri, 12 Feb 2021 10:50:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 17BE66F5D3 for ; Fri, 12 Feb 2021 10:50:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ySm6YawAACWd for ; Fri, 12 Feb 2021 10:50:55 +0000 (UTC) Received: by smtp3.osuosl.org (Postfix, from userid 1001) id 74DEC6F5E1; Fri, 12 Feb 2021 10:50:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by smtp3.osuosl.org (Postfix) with ESMTPS id 3564A6F5D3 for ; Fri, 12 Feb 2021 10:50:48 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id D2EDC310; Fri, 12 Feb 2021 11:50:40 +0100 (CET) Date: Fri, 12 Feb 2021 11:50:39 +0100 From: Joerg Roedel To: Sai Prakash Ranjan Subject: Re: [PATCH] iommu: Add device name to iommu map/unmap trace events Message-ID: <20210212105039.GG7302@8bytes.org> References: <20210209123620.19993-1-saiprakash.ranjan@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210209123620.19993-1-saiprakash.ranjan@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Will Deacon , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-arm-msm@vger.kernel.org, Robin Murphy , linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Tue, Feb 09, 2021 at 06:06:20PM +0530, Sai Prakash Ranjan wrote: > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 5e7fe519430a..6064187d9bb6 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -87,6 +87,7 @@ struct iommu_domain { > void *handler_token; > struct iommu_domain_geometry geometry; > void *iova_cookie; > + char dev_name[32]; > }; No, definitly not. A domain is a device DMA address space which can be used by more than one device. Just look at IOMMU groups with more than one member device, in this case just one device name would be very misleading. Regards, Joerg _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EF46C433DB for ; Fri, 12 Feb 2021 10:52:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 569E364E2D for ; Fri, 12 Feb 2021 10:52:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 569E364E2D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FQcAeDKRpEsXBk9tHdxDHSgvIAaFjxzgdGxQTxnp0q0=; b=o5VK/swamITTFkN47Wkrqys0e uNzFb1pgriGFAFzjSOyklZqmiIIW7R6IM8ynza5K0GmO1q6AxK5zSQsqOTRn/7UkMpXYleA99EKUh W9bEPOyje+lcFmHm5dWqKNrJtawQmg+d9LXR8U6yLR5pdWKpnFzTiUhu4zKLsM2AbRepTlU3GzzO/ q7CZMWyCX2tstjFrMbLFucCtd2lZgAOmSym0VZ8ZiJFy1h+yZVeWTdYER2Mz4mOw9oLFHceRegJLt CTtEEPaPD509Fj1oIzMRGuXh4QMsvN4pntAHhxR2DyyXJozTeMQAhLHxTPmULeeHNTAvI9DYLBCWH RY5Jk3c8A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAW2A-0004Wn-AR; Fri, 12 Feb 2021 10:50:46 +0000 Received: from 8bytes.org ([81.169.241.247] helo=theia.8bytes.org) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAW27-0004WL-Q3 for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2021 10:50:44 +0000 Received: by theia.8bytes.org (Postfix, from userid 1000) id D2EDC310; Fri, 12 Feb 2021 11:50:40 +0100 (CET) Date: Fri, 12 Feb 2021 11:50:39 +0100 From: Joerg Roedel To: Sai Prakash Ranjan Subject: Re: [PATCH] iommu: Add device name to iommu map/unmap trace events Message-ID: <20210212105039.GG7302@8bytes.org> References: <20210209123620.19993-1-saiprakash.ranjan@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210209123620.19993-1-saiprakash.ranjan@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210212_055043_969823_76F0A160 X-CRM114-Status: GOOD ( 15.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Will Deacon , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-arm-msm@vger.kernel.org, Robin Murphy , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 09, 2021 at 06:06:20PM +0530, Sai Prakash Ranjan wrote: > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 5e7fe519430a..6064187d9bb6 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -87,6 +87,7 @@ struct iommu_domain { > void *handler_token; > struct iommu_domain_geometry geometry; > void *iova_cookie; > + char dev_name[32]; > }; No, definitly not. A domain is a device DMA address space which can be used by more than one device. Just look at IOMMU groups with more than one member device, in this case just one device name would be very misleading. Regards, Joerg _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel