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 C277DC433FE for ; Tue, 12 Apr 2022 12:38:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348150AbiDLMkT (ORCPT ); Tue, 12 Apr 2022 08:40:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351194AbiDLMgP (ORCPT ); Tue, 12 Apr 2022 08:36:15 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD334CC for ; Tue, 12 Apr 2022 04:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649764580; x=1681300580; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=L0qUnMQOFRRb2Pk8gqURd8V55DtzojRRl0dzjoOnUPY=; b=aPb2Qki5qVZwYQ9w8N0hBFRX4NSqJqdPJd0nGKyUxluWAgng4eJ29FL6 crUaZhTul+0xvdfTyP5JhPpPuQbi2+hDxIFIbB14nieKnRE9Xf2ij7TqQ gdYUPEU2CtVVPNC8ChdUl5juPoIQkosmdP4M7RSBgypNPDYpeeS1weOxB 1ytezj99tLtd0jZbs5RBODh5XDuPGPRjH9QbsreN3cPKl4u/414M9oRQm XI934fUZ4tlu1weptVSjnNSIDBjNnNgQpIAk2/oHQ18mmngFd6j6CTJnr 7gVAlZw4XVzEibrrC1/17SpwoUSd99XkNk0OCrcnQRT08e4IkaVLamV9Y A==; X-IronPort-AV: E=McAfee;i="6400,9594,10314"; a="325267536" X-IronPort-AV: E=Sophos;i="5.90,253,1643702400"; d="scan'208";a="325267536" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2022 04:56:20 -0700 X-IronPort-AV: E=Sophos;i="5.90,253,1643702400"; d="scan'208";a="572730132" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.210.174]) ([10.254.210.174]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2022 04:56:16 -0700 Message-ID: <317c1d39-13df-2559-dff7-2a5c82630739@linux.intel.com> Date: Tue, 12 Apr 2022 19:56:14 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Cc: baolu.lu@linux.intel.com, Eric Auger , "Pan, Jacob jun" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH RFC v3 02/12] iommu: Add a flag to indicate immutable singleton group Content-Language: en-US To: Yi Liu , "Tian, Kevin" , Joerg Roedel , Jason Gunthorpe , Christoph Hellwig , "Raj, Ashok" , Will Deacon , Robin Murphy , Jean-Philippe Brucker References: <20220410102443.294128-1-baolu.lu@linux.intel.com> <20220410102443.294128-3-baolu.lu@linux.intel.com> <7c70a136-6871-b48c-8e46-852bb1b62958@linux.intel.com> From: Lu Baolu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yi, On 2022/4/12 14:34, Yi Liu wrote: >>> >>>> >>>> This adds a flag in the iommu_group struct to indicate an immutable >>>> singleton group, and uses standard PCI bus topology, isolation >>>> features, >>>> and DMA alias quirks to set the flag. If the device came from DT, >>>> assume >>>> it is static and then the singleton attribute can know from the device >>>> count in the group. >>> >>> where does the assumption come from? >> >> Hotplug is the only factor that can dynamically affect the >> characteristics of IOMMU group singleton as far as I can see. If a >> device node was created from the DT, it could be treated as static, >> hence we can judge the singleton in iommu probe phase during boot. > > not sure if hotplug is the only factor. Is it possible that admin modifies > the ACS configuration on the bridge? Not likely. This will completely change the existing iommu_group settings. Best regards, baolu