From patchwork Tue Nov 29 20:31:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 13059144 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 BDB3CC433FE for ; Tue, 29 Nov 2022 20:33:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236138AbiK2Udk (ORCPT ); Tue, 29 Nov 2022 15:33:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235210AbiK2UdV (ORCPT ); Tue, 29 Nov 2022 15:33:21 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2070.outbound.protection.outlook.com [40.107.93.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1F57686BF for ; Tue, 29 Nov 2022 12:33:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mW2yO+nNw26rI29QWptr5ZcwV2GsZKHkZJeuQ2PFOqbcPDeku2czysSAvqkuDrrUeY+s0IQNsWevG5l+UljTUc9g56Xzizj7ssBl8PpB/XDSWP5iWCSOpSssDcP56dfPfdhS8x2ZMtbc/qQvjp+ReMyx9nTEg8uQiWdFXpmp2SXumMxHLzJsW1YOOkcnnOt1t7gCpOigdIhP+KoRE3D4wNmJIXfnQxsrfbVArj/YnUiWY8PVDnQUhgK3k6AaF1GHeuupBRB1aduAke9+tHNTmuf8FptG1v69KwZ8f3jkR6J8ZWyYIC9dcClMLPw80NZ57W3R3xwpN8CeVm22kE3FjA== 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=u7QUjwHC1XGNl6OYKkp7lpyIPd0t2IjurQcp52ZhbP8=; b=CH3iHh5L3GxIawdwQH5hAtWVIFQRxdMhRLxmRDP9whFEyLIA2z5SP4A1aIU09SBV2VI/xKd9r9tBCmWKeshWAQK1PB6NE+vOu8Asy62jlDjUdQiZVRa7zbXqviPnwKqC1IPg+Po8ih0H5dHxy6vk6cQzIwy2BXEo8I8TYrfKnI+q96Y6hK0EUdlGFZ+poXKj/8KTtOPyAbHPzZONXJPgmQzp7hlNL1QpKoq4x0O5i2Ep3TN3ZLofOG1y6aQef3GCYf7uYhrQxxU5DR+x2ORCb3okjFmFUOGgiD5SsHSNVxFNGEjRzIiGpMnqpRcMg8Zfm6Y9RaNbwTFr5U/HxhiuiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u7QUjwHC1XGNl6OYKkp7lpyIPd0t2IjurQcp52ZhbP8=; b=W9zDsk+6E9SEX/+Sni6yizZZneFj65olAZeiaYg6K6Rjjs3COVdtjCYoRTNf16B2Ft9Ajl3f8GWRCepwuYwzgDg54ofREmjiYtYO5Tbohk5HOy+3Y5nDMeIRUaHlspF/VsjQHgwlpO0DmeAq5+38dd4fOw/PwZQm2XyZ2q14G+7cUQ4nBm540izn2BAOJ48J3ss9dvKh6c10iXOPvVnjDSM+JIx1ngoA/oenawx7cBgY1TnHYpFRFL7ee0Wv30TniHBOvVk3641ul4vv4z6gxhfSkzgFSdH9D2MA6gQkzQDlf1zKHTNS8HUqPhCU++/W3VnCGRg0QQIl9fmTUIg2tw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by PH7PR12MB5688.namprd12.prod.outlook.com (2603:10b6:510:130::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Tue, 29 Nov 2022 20:32:01 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::f8b0:df13:5f8d:12a]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::f8b0:df13:5f8d:12a%8]) with mapi id 15.20.5857.023; Tue, 29 Nov 2022 20:32:00 +0000 From: Jason Gunthorpe Cc: Alex Williamson , Lu Baolu , Cornelia Huck , Eric Auger , Kevin Tian , kvm@vger.kernel.org, Lixiao Yang , Matthew Rosato , Nicolin Chen , Yi Liu , Yu He Subject: [PATCH v4 08/10] vfio: Move container related MODULE_ALIAS statements into container.c Date: Tue, 29 Nov 2022 16:31:53 -0400 Message-Id: <8-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com> In-Reply-To: <0-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com> References: X-ClientProxiedBy: BYAPR08CA0004.namprd08.prod.outlook.com (2603:10b6:a03:100::17) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|PH7PR12MB5688:EE_ X-MS-Office365-Filtering-Correlation-Id: d498e421-7259-4be6-405f-08dad248c35e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wGyiwRjgxNgMJgZHHqSjk0Y/D8Gn7NrMWS4z/EZiO/b4M9maRSe7HvUNvrxuubqcqyLkAOocNUvxqYNuEp/VYIRUeqXOa9VYd7Sn+t7hL0bLZgw8lac5tovUlUb5SjLr+BLnb0nStNYMT3dGY8VJs03jiDeRF0cfW+8GbrYhmfmrpMVUjXtSFwjAgcAOvuIiyB67hT/RVV9UZslkTbsrW5KRNwYGGFxrdJgc2QqK4jFqVcaG9C9wG9S9njFO7YClqoAfki4cuZQvPwgvnvwcWH5EKdiSfBG0ZFE8T995kR5gGT6ikYIaeITYhzQ4T+2qQ4XdyRgBCvWuB+ZW2ZQrDZN/+I3dPvB7gUKL8pgEa2P3hCvyhCORBbgC6FEGly8Pb8FFcd0tjfJoNV4Rv50TPtnboC7sbkgM/mvx1LO9x11sZ3Rbl38a8VycJ97YHbWwoct+yuzPFJdgF14peEdgU2J0h60I4qQZxinYQP9YwQqjNuOk6Illo2LbDhGnFfcCRrNAGEfyharKWrevyA0UaYbStJf6fKBi2w3lOTkNNxy/oKakkXjy9wvJ3LIoVFSVrDJ8NXGC1RjVYueJEdFyLPhwd28XM3v8VFXDo5aX2TrpSxBwfAoATSjSelsDXIIg/9Cic5yMHNdJQNMztiu7jNIUdBQDfK0n+/ilakjmDs6hFxzvLMNttvL98ugMp6clAl1Vya2kGgTddEEPXVng5w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(376002)(39860400002)(396003)(366004)(346002)(109986013)(451199015)(5660300002)(66946007)(7416002)(38100700002)(54906003)(186003)(6512007)(316002)(8936002)(36756003)(4326008)(8676002)(6666004)(66556008)(26005)(66476007)(6506007)(2616005)(41300700001)(86362001)(478600001)(6486002)(2906002)(83380400001)(4216001)(266003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZfKGoRXk6ozG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8AbJIhhqbBD3j7+Nhgph3OlKNCT/KPPZkFTkwWFhiQb0Ev9mkMFXC5rL8ucIOXC3eCjHjDYfpQNI+zBUmxUC/XD3UblP4O/UcWp5m2DG45IAVP3zXScmYqlNK+Zirqx+hNFAoAy4J1XGiQiPCgL6zDK6/Jvw12ebDhZTSEB0j2EzC4C1PicBFHrwlHkNseKzqIqzMH8smO1xOmYk61WDVJ9XhNDoHYBmiBmNHxNfyc9CbRg8mzfEfa731j7o/rkBHnsTkfHB905DeR4oW0PZReN7LfhoficDX1NgBZX0Gk1WESwIv4RwiP1tI1YJQzCf1oNcrNCZEsU26BxBZW/Ylk8NO7JI/1jRoDUGkpqGxbHAsrMDhvcbkhHTiAMWKItjQrEOwGUsiNBG84SD+jF/0xd0kjcNU/r9XjZxkliRWKSwFClkdPyxP1gF1wINjhuo95NzK9zXRsOR+bddmFrlArcTuq+FbbF5D1dBaB7xpTTax X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: d498e421-7259-4be6-405f-08dad248c35e X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2022 20:31:58.5277 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9T8Lc+q4kEtpIMJEm3EDGpLFZnJiG928eu1XOZ89LArYeGO930OQMFrpnBvznPPH X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5688 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The miscdev is in container.c, so should these related MODULE_ALIAS statements. This is necessary for the next patch to be able to fully disable /dev/vfio/vfio. Fixes: cdc71fe4ecbf ("vfio: Move container code into drivers/vfio/container.c") Reported-by: Yi Liu Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Tested-by: Yi Liu Tested-by: Lixiao Yang Tested-by: Matthew Rosato Tested-by: Yu He Signed-off-by: Jason Gunthorpe --- drivers/vfio/container.c | 3 +++ drivers/vfio/vfio_main.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/container.c b/drivers/vfio/container.c index 7f3961fd4b5aac..6b362d97d68220 100644 --- a/drivers/vfio/container.c +++ b/drivers/vfio/container.c @@ -608,3 +608,6 @@ void vfio_container_cleanup(void) misc_deregister(&vfio_dev); mutex_destroy(&vfio.iommu_drivers_lock); } + +MODULE_ALIAS_MISCDEV(VFIO_MINOR); +MODULE_ALIAS("devname:vfio/vfio"); diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c index fd5e969ab653a5..ce6e6a560c702a 100644 --- a/drivers/vfio/vfio_main.c +++ b/drivers/vfio/vfio_main.c @@ -2073,6 +2073,4 @@ MODULE_VERSION(DRIVER_VERSION); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); -MODULE_ALIAS_MISCDEV(VFIO_MINOR); -MODULE_ALIAS("devname:vfio/vfio"); MODULE_SOFTDEP("post: vfio_iommu_type1 vfio_iommu_spapr_tce");