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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E3CBC433FE for ; Thu, 6 Jan 2022 03:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231838AbiAFDvy (ORCPT ); Wed, 5 Jan 2022 22:51:54 -0500 Received: from mga12.intel.com ([192.55.52.136]:4821 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbiAFDvw (ORCPT ); Wed, 5 Jan 2022 22:51:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641441112; x=1672977112; h=cc:subject:to:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=duW+vQR4sMirxxEYotvqV0oLcyExanZmvqlVTiuxZFs=; b=PFwmvSA1h1XkJNZBw4lhZRt9RWSn16C6hfAiYDvNtBk5zv5MWP8JQQ/M ZiX2/eqMnD0hlfMfgAeRB4pLQr+djodWbUAdp9TiAJoOcl2rldGAIkisf oI+qnfuPy48AbIidQcBEY5TVBu8bHep78YjF5GQor9D6LUjMD1otpL/lS Jl1nowowk0R0Eb1FmwkJODeJuNCryil3ImvX0WCmQ0wz9V06s4tjonTbh redNq8L+6JbOoyY0huIfCxatZ8aVK+bnu2d8c333POWJjpC/p3ca9EFhS MpXF56/tNDy+2R+frer/nVsEM44Zeffk7TL7eJg52Yr/0T7lxtN9NQFWG g==; X-IronPort-AV: E=McAfee;i="6200,9189,10217"; a="222580241" X-IronPort-AV: E=Sophos;i="5.88,265,1635231600"; d="scan'208";a="222580241" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2022 19:51:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,265,1635231600"; d="scan'208";a="526815760" Received: from allen-box.sh.intel.com (HELO [10.239.159.118]) ([10.239.159.118]) by orsmga008.jf.intel.com with ESMTP; 05 Jan 2022 19:51:45 -0800 Cc: baolu.lu@linux.intel.com, Greg Kroah-Hartman , Joerg Roedel , Alex Williamson , Bjorn Helgaas , Jason Gunthorpe , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Dan Williams , rafael@kernel.org, Diana Craciun , Cornelia Huck , Eric Auger , Liu Yi L , Jacob jun Pan , Chaitanya Kulkarni , Stuart Yoder , Laurentiu Tudor , Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter , Li Yang , Dmitry Osipenko , iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 01/14] iommu: Add dma ownership management interfaces To: Bjorn Helgaas , Christoph Hellwig References: <20220104164100.GA101735@bhelgaas> From: Lu Baolu Message-ID: Date: Thu, 6 Jan 2022 11:51:07 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20220104164100.GA101735@bhelgaas> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/5/22 12:41 AM, Bjorn Helgaas wrote: >>> struct group_device { >>> @@ -289,7 +291,12 @@ int iommu_probe_device(struct device *dev) >>> mutex_lock(&group->mutex); >>> iommu_alloc_default_domain(group, dev); >>> >>> - if (group->default_domain) { >>> + /* >>> + * If device joined an existing group which has been claimed >>> + * for none kernel DMA purpose, avoid attaching the default >>> + * domain. > AOL: another "none kernel DMA purpose" that doesn't read well. Is > this supposed to be "non-kernel"? What does "claimed for non-kernel > DMA purpose" mean? What interface does that? > It's hard to read. I will rephrase it like this: /* * If device joined an existing group which has been claimed, don't * attach the default domain. */ Best regards, baolu 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 Received: from smtp1.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 smtp.lore.kernel.org (Postfix) with ESMTPS id E8F01C433F5 for ; Thu, 6 Jan 2022 03:51:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7BC9481348; Thu, 6 Jan 2022 03:51:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bE_BStgGv9Gp; Thu, 6 Jan 2022 03:51:55 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7707881343; Thu, 6 Jan 2022 03:51:55 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5B2AFC002F; Thu, 6 Jan 2022 03:51:55 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id EDF96C001E for ; Thu, 6 Jan 2022 03:51:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D846260E58 for ; Thu, 6 Jan 2022 03:51:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com 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 44swBvBidy3a for ; Thu, 6 Jan 2022 03:51:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by smtp3.osuosl.org (Postfix) with ESMTPS id 1D27060E14 for ; Thu, 6 Jan 2022 03:51:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641441113; x=1672977113; h=cc:subject:to:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=duW+vQR4sMirxxEYotvqV0oLcyExanZmvqlVTiuxZFs=; b=NkA2NEacAS5hmZc/TByf1LYWAQPb6X2fhuTk4n1k1WcKEbFlwG+5RiOD 6O+yXxwGuXfTqAtz+uWSZYg3uCEN5jVzgtsnbZtgLZrtmcfL/Dwlfdd2Y ZdwjZDLD5ANdUomNDTBzPQ441R8wl6HTF0TMwaBVneT0+BMaJX9goQpd1 mztJpIyEGBvvjCTDGDxAbHhOFEZ/hRCFAb5UhpFRtZyhqcE43yhJ8r7S4 rKIJPc3URdDl8dDReboXjXOfl2twJe9veNawwbl9hC74Qg0ku7PJVMj+u h4SS4ez/WKNNiIyiJVv8A6qPc1+ob6mzkb5UXJgaa9NmZ/PIpTedk0IeD w==; X-IronPort-AV: E=McAfee;i="6200,9189,10217"; a="266869728" X-IronPort-AV: E=Sophos;i="5.88,265,1635231600"; d="scan'208";a="266869728" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2022 19:51:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,265,1635231600"; d="scan'208";a="526815760" Received: from allen-box.sh.intel.com (HELO [10.239.159.118]) ([10.239.159.118]) by orsmga008.jf.intel.com with ESMTP; 05 Jan 2022 19:51:45 -0800 Subject: Re: [PATCH v5 01/14] iommu: Add dma ownership management interfaces To: Bjorn Helgaas , Christoph Hellwig References: <20220104164100.GA101735@bhelgaas> From: Lu Baolu Message-ID: Date: Thu, 6 Jan 2022 11:51:07 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20220104164100.GA101735@bhelgaas> Content-Language: en-US Cc: Stuart Yoder , rafael@kernel.org, David Airlie , linux-pci@vger.kernel.org, Thierry Reding , Diana Craciun , Dmitry Osipenko , Will Deacon , Ashok Raj , Jonathan Hunter , Jason Gunthorpe , Kevin Tian , Chaitanya Kulkarni , Alex Williamson , kvm@vger.kernel.org, Bjorn Helgaas , Dan Williams , Greg Kroah-Hartman , Cornelia Huck , linux-kernel@vger.kernel.org, Li Yang , iommu@lists.linux-foundation.org, Jacob jun Pan , Daniel Vetter , Robin Murphy 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On 1/5/22 12:41 AM, Bjorn Helgaas wrote: >>> struct group_device { >>> @@ -289,7 +291,12 @@ int iommu_probe_device(struct device *dev) >>> mutex_lock(&group->mutex); >>> iommu_alloc_default_domain(group, dev); >>> >>> - if (group->default_domain) { >>> + /* >>> + * If device joined an existing group which has been claimed >>> + * for none kernel DMA purpose, avoid attaching the default >>> + * domain. > AOL: another "none kernel DMA purpose" that doesn't read well. Is > this supposed to be "non-kernel"? What does "claimed for non-kernel > DMA purpose" mean? What interface does that? > It's hard to read. I will rephrase it like this: /* * If device joined an existing group which has been claimed, don't * attach the default domain. */ Best regards, baolu _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu