Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp192892lqh; Thu, 30 May 2024 20:12:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVAsInZm76uePpGhewWUCTGoxjZgEZpkGt94zytbTdwrwqeklZJaWByDDoUdeY4X/b3+W76P/GzHmHm+iZRXxU5+RxiI18+vwNFwwaKaA== X-Google-Smtp-Source: AGHT+IFCQ2OL1v47ulBuA6pxNqeqpj3pFZ5ZcdeofIrrE9FlaM8bnNX7l7GHBWvn6DKmcNZoBb66 X-Received: by 2002:a05:620a:1091:b0:792:a194:52e8 with SMTP id af79cd13be357-794f5c86a8bmr65509485a.19.1717125144979; Thu, 30 May 2024 20:12:24 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f2f04e96si121003685a.56.2024.05.30.20.12.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 20:12:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196214-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ATeChw88; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-196214-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196214-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A14F61C218D8 for ; Fri, 31 May 2024 03:12:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B69CC210EC; Fri, 31 May 2024 03:12:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ATeChw88" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E8D618B1A for ; Fri, 31 May 2024 03:12:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.7 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717125138; cv=fail; b=T7MMUYJezmMY7QVEjWXGLETMSFwjnn9N/cr6vZpP1wxyMJQ+mxiPi1FwR24nijZvWkjlMeksoPfnvNeYiSrGadvMaXklM1VJgxY+etEmN6caZnCsJBOm5mZXGEFMyoujvRwJQ04+TsWz0ih0dC0F2oE8xHY//R41TZRPHIabcuY= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717125138; c=relaxed/simple; bh=nhkPlR9DShOxrmmWwCwry75bOL8tTksg6eANaX9YINo=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=ACfZfGLNn82gBofndimTML/RsunVT8KAhFnSwgTLmYh1u4gPhaSRKDDwCFuQXbFYZkYL2ZeP9WL85IuU0UIBDxB957rzGrd0UCJ3bXfjS6Enq4ENbX5zuyb8ntf7Ieb0bn7beJBOwDGlc2EIram2GJDEGNxuPjChxTgA/kw0iJc= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ATeChw88; arc=fail smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717125136; x=1748661136; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=nhkPlR9DShOxrmmWwCwry75bOL8tTksg6eANaX9YINo=; b=ATeChw88A8G7NXZMW3PN3kR+oh1hDlm0DJDPKQ/vL/0mLFDVJ3hffx7b gO7aAFQLj4oGyYacpuB4IIn2nIGsvkjgW5BeT1JND8gRTj8x4Fq74FxNX H+R9tCCltYwv9tYk0IPwkytzJyxlzsq3Q+R/AHaYBBNNWQt6rpqGQx+MH EA2E1QjisqP4j99VtD6IHwXRTtAm0YHSWGwZSM9oV2YXIbz9aw0orxo0U gHFcjS4iShp9zKaz7wrwL8zOuIrMdRHXvrb8pRTFuMFNbTd/v/W6VyNPz QN5SqjgUhAkdXB5kh9mPC3irLUooMkfmQcNNZJ97V81jfbbZepJeG9NW6 A==; X-CSE-ConnectionGUID: EKZfrRQ8RAeOb2oIXHbIyQ== X-CSE-MsgGUID: QO93decpRwC7Cdhtgy2XCQ== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="39042951" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="39042951" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 20:12:15 -0700 X-CSE-ConnectionGUID: G71MrCQlT9StRqQM7qWrQA== X-CSE-MsgGUID: q+TVWP7FSh6nLaXpXJ+tJw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="36119325" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa009.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 30 May 2024 20:12:15 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 30 May 2024 20:12:14 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 30 May 2024 20:12:14 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 30 May 2024 20:12:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RVa+BqhYWKuwNl3BughFpaJ8DupM6G/Chdfssr009txajkHajsOuCifh8r1wXWp+XVycZxJwy1xsyj/ZELkL8JMNlaF4/VP7/Cw6dqGsfgEgCc7g4b5N/7bJS4hcW2CXaOfF+Agtlj5BPdNPL6Oy5dcLmXoaz7oifG8aWlKOpVgSckDLswjTZaK+5ImyUCLP2GBcVcfp+KJK2BPOFMkAUZqetwEFXregUfEOixtHOzaUAwUJ0KpIL8W9bNq7aumLVgv2ZV+A/89D5nN/VGdd+mW6sqxcn4dRxd46fyYzEnvTktwuEOiIThGra+BX78tIpQNBGAltulobwEeC6umY5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tzlVK+Eh15Hoky86ZxNSmlxVZACNhu7VxALT1QhEbwI=; b=QVDR6L2y2q/Ra8/UHEs9PRj4oqNajcX78Bw4OWkLs1DkkRVvT1DGNC6fTFO9xInzH9xGP9je3GGbU3QEolUe/mkjxKeTvKEagDHumNPPh5EtQBf/ZQ3AV8dhh3cL0dcCAlSDxx2soumGomYElnuqTyXx1BJSCG3nI5htYg9hWe2WcXf/kxHZjLlkX/Z0nzOE2KCBd0HefetRG8sxCSRpi4JdgEqt6HJIumrlPMPHn2U9pV8cmT9/0un0AFWliFG66gk9kFR1rvfT54xNn3cahFKA4KH5YE7RluWKw3baX3BKtQ/qBtYEeilHnx9O2VFvoPxxu62sjf2Nkupt/pY8tQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7529.namprd11.prod.outlook.com (2603:10b6:8:141::20) by MW3PR11MB4585.namprd11.prod.outlook.com (2603:10b6:303:52::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.24; Fri, 31 May 2024 03:12:11 +0000 Received: from DS0PR11MB7529.namprd11.prod.outlook.com ([fe80::d244:15cd:1060:941a]) by DS0PR11MB7529.namprd11.prod.outlook.com ([fe80::d244:15cd:1060:941a%7]) with mapi id 15.20.7633.018; Fri, 31 May 2024 03:12:11 +0000 Message-ID: <7af4fee2-1b37-4eb8-9d03-8b1a402ec00b@intel.com> Date: Fri, 31 May 2024 11:16:03 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/20] iommu: Refactoring domain allocation interface To: Baolu Lu , Joerg Roedel , "Will Deacon" , Robin Murphy , "Jason Gunthorpe" , Kevin Tian CC: David Airlie , Daniel Vetter , "Kalle Valo" , Bjorn Andersson , "Mathieu Poirier" , Alex Williamson , , Jason Wang , Thierry Reding , "Jonathan Hunter" , Mikko Perttunen , , , References: <20240529053250.91284-1-baolu.lu@linux.intel.com> Content-Language: en-US From: Yi Liu In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR01CA0181.apcprd01.prod.exchangelabs.com (2603:1096:4:189::13) To DS0PR11MB7529.namprd11.prod.outlook.com (2603:10b6:8:141::20) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7529:EE_|MW3PR11MB4585:EE_ X-MS-Office365-Filtering-Correlation-Id: de6afb29-1830-4270-1539-08dc811f76b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|7416005|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bnJORzZ0YnJDejNyMzRHMk1IOVlyeVFtRmR0b3BDeTRQeEJiWEkrZGVxSmwz?= =?utf-8?B?SWo0QUJlSHAvV0pUWlM3V0ExZy9FcTlyRERZS2RCc2EvQTRndTY3YktFcmtY?= =?utf-8?B?WkI3TGlrajBGMHlzMkxBSFZLNW5UYStwU3Z5clpGMEwyZVovNWxQUHVxUll4?= =?utf-8?B?dTZXNTMrcElXUTdmQmpTWlU1ZXVrQU9EdG9kTEpFVDlUODB6RHpCSnFhZnBI?= =?utf-8?B?N2Z3a1VPakZqSEYybXdHdnlvQU5LamdYMFRvS3F6cFFkYW12RkNuYzBseG8r?= =?utf-8?B?R2ZRQzB6RHUrY3p4UXZmaUZFZHNqUG5mQlJWNitDTUZjUHR5YkpvTFJXVGZk?= =?utf-8?B?MFFOa0VWTVR3T1Q1VC9SZkk2SnJuQndnaHVPcytzOHFWZ0dTNFFmNk4yNXV2?= =?utf-8?B?Sk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NlZS9SVkFpM2NHYWFF?= =?utf-8?B?QUJzTlltMnE4RXlSWE5UcGo0eUJSWTJXclZ6dWJHeHJRRGdFSFp2MWdDQlc5?= =?utf-8?B?R0g4M3BNb1ZUNnk3d3lSSzI3VGlMNXF1YlQxYndvaEJVU1M0dkh3cGQ0MjJv?= =?utf-8?B?TS9VQnp0b1kvU0J5SWJLVC9ubG96Z04wRExsZjhaKzBQTTlmZk0wV0RIQ2gz?= =?utf-8?B?cFFxWjZVcjA2b1VaSGRFNW5qSTEyeG1QNUh0R2djdk5ic0J1akRNdmRGc2Jl?= =?utf-8?B?K3BvNzVNaE1UOFRHWm1PK3lRa2c4a2xkM3dCanlrYWdhYlNRVGxHRmdyWjFn?= =?utf-8?B?WFJsNnNOaTB3TTYzZlRHQmFwNzNwcW4xUDQwM0Q5MEFjSmQ3ajNGa3dCQmNx?= =?utf-8?B?TFA4akN4VXVncFNOVnlLUDRGRTh5WmQ0RlZHNHNEWWVTeE1jVFUwSFRBPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB7529.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(7416005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?akdKeHpRZVRBOTBzVG90bzBTWEdsV2FHUWJicnVqQTBlekp4WWppbmlncDRE?= =?utf-8?B?SU83QlhuUldSNUtmdkVWTnlDVVh2d2VqUDJkYmp0a3ZwU29KMCtJRk10K0JB?= =?utf-8?B?YWdPcERsejR2UzN0T3NBcVd2Q0lscGJ6cUZ6STkrMDZQdm1ZdEJaQzVPamVD?= =?utf-8?B?bUMyUkpGcnRheUdRZkFUeWRQT3dkZlZWczNlSXNJdTNqS3NBNFkyckNNNkxo?= =?utf-8?B?Y0U2dXRHZGp6dUJlY1JsbG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= =?utf-8?B?d3lvNDBEVVRZVDZXTXNtelNkL0ZRdWc2MlNQY0VENVVrSitzdFJSTEFlTk85?= =?utf-8?Q?lADGNcMBAUZUIZ2vNYC2tn+Q7?= X-MS-Exchange-CrossTenant-Network-Message-Id: de6afb29-1830-4270-1539-08dc811f76b4 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7529.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2024 03:12:11.8215 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: K1l+ldtEHiUkIs1bU4nEXCYpQJRk5p9arsgljm/Fd3J5H02CnDHu4mUUbPmpmgneB7vdbAHXhRGtmKVPfOxDUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4585 X-OriginatorOrg: intel.com On 2024/5/29 20:02, Baolu Lu wrote: > On 2024/5/29 17:03, Yi Liu wrote: >> On 2024/5/29 13:32, Lu Baolu wrote: >>> The IOMMU subsystem has undergone some changes, including the removal >>> of iommu_ops from the bus structure. Consequently, the existing domain >>> allocation interface, which relies on a bus type argument, is no longer >>> relevant: >>> >>>      struct iommu_domain *iommu_domain_alloc(struct bus_type *bus) >>> >>> This series is designed to refactor the use of this interface. It >>> proposes two new interfaces to replace iommu_domain_alloc(): >>> >>> - iommu_user_domain_alloc(): This interface is intended for allocating >>>    iommu domains managed by userspace for device passthrough scenarios, >>>    such as those used by iommufd, vfio, and vdpa. It clearly indicates >>>    that the domain is for user-managed device DMA. >> >> user paging domain? It looks to me user domain includes the nested domains >> as well. > > Yes, nested domain is a user domain. The iommu driver should implement > iommu_ops->domain_alloc_user for nested domain allocation. will it be more clear to name iommu_user_domain_alloc() be iommu_user_paging_domain_alloc() as it is mainly for paging domain allocation? >> >>>    If an IOMMU driver does not implement iommu_ops->domain_alloc_user, >>>    this interface will rollback to the generic paging domain allocation. >>> >>> - iommu_paging_domain_alloc(): This interface is for allocating iommu >>>    domains managed by kernel drivers for kernel DMA purposes. It takes a >>>    device pointer as a parameter, which better reflects the current >>>    design of the IOMMU subsystem. >>> >>> The majority of device drivers currently using iommu_domain_alloc() do >>> so to allocate a domain for a specific device and then attach that >>> domain to the device. These cases can be straightforwardly migrated to >>> the new interfaces. >>> >>> However, there are some drivers with more complex use cases that do >>> not fit neatly into this new scheme. For example: >>> >>> $ git grep "= iommu_domain_alloc" >>> arch/arm/mm/dma-mapping.c:      mapping->domain = iommu_domain_alloc(bus); >>> drivers/gpu/drm/rockchip/rockchip_drm_drv.c:    private->domain = >>> iommu_domain_alloc(private->iommu_dev->bus); >>> drivers/gpu/drm/tegra/drm.c:            tegra->domain = >>> iommu_domain_alloc(&platform_bus_type); >>> drivers/infiniband/hw/usnic/usnic_uiom.c:       pd->domain = domain = >>> iommu_domain_alloc(dev->bus); >>> >>> This series leave those cases unchanged and keep iommu_domain_alloc() >>> for their usage. But new drivers should not use it anymore. >> >> does it mean there is still domains allocated via iommu_domain_alloc() >> on VT-d platform? > > I think the drivers mentioned above do not run on x86 platforms, or do > they? cool. BTW. I know out-of-tree drivers are not counted in upstream review. Just out of curious, is there a formal way to let such drivers know it is no longer allowed to use iommu_domain_alloc() on VT-d? -- Regards, Yi Liu