Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp446779pxb; Wed, 15 Sep 2021 05:52:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGdz3QNTc2f47xtdSLHbY62C4iHW97EVcovM8rNeR5tOiWTU1r/ZnlcC1HqXR14A/5lTh5 X-Received: by 2002:a05:6512:2356:: with SMTP id p22mr6198460lfu.214.1631710349920; Wed, 15 Sep 2021 05:52:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631710349; cv=pass; d=google.com; s=arc-20160816; b=B8A21edOySpYj8KqzVePnAr+VA8SFgdvr/YEoShMUlAciUhfKicLqYAii+GtJLglKc wDkd8E7linPZLCoUndZF8HA08+ZJZUvfozTUV7c/MRp5swegmwbIE+QzDK2frGXGudzV d/g/6CjoiOhOrhgcCBKVy/VXb5OlXlgZ0FA+lfALYNcJJLRrfK3XIrf1tnjGO9UsLaQD 8ynbi2ANUmVsCUGNgXu31MTU2cGl09xb7CL9ommIRZVCjfneX/096H50L/5X1gXkbnGN WVTcWsJ8/E9fvsjxwg8GDiUNvpAV/SYwDCAZW+q7hZ7syh8ehozbLSxzhIiNNAsx6OZZ 9LBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WfZEAQPfAum67/FfNLP2VYOgfEgslR59rkcRAaYVVrE=; b=yA8D0TC+nC/Fi13jCEL57599IdARiK1QvmwD6TaSmCyM+gYdiHlKpU77D8PzneiEZy RKy/DeBOVQpucQI+vVUYU338rLsDNcUAsQtVCd22v5qxmDjIBP9pEf+xi3DOzdV7Cr+B PToleI1W7H6s6yO7W02uQE9DmAa3564U4I1+hsk9+Mgoh9rkOj2F/tJqUyEESJNuzk2S gkJivX1GkusRD9Un1ZqJfNGBMYBGs8uzmARLpPURNNR0Q2ygJjWw7KkIEriGJMxI2Oto azK7vTa8CUK5nnWuQl7SLd3pIyG1Qw9DHpISn3ym8JP7pdwn7M+x9lPGbaLuU6QbGFuc tcqA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="WFNnqI6/"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o15si14263529ljg.520.2021.09.15.05.52.01; Wed, 15 Sep 2021 05:52:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="WFNnqI6/"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233634AbhIOMxK (ORCPT + 99 others); Wed, 15 Sep 2021 08:53:10 -0400 Received: from mail-co1nam11on2043.outbound.protection.outlook.com ([40.107.220.43]:13181 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233139AbhIOMxI (ORCPT ); Wed, 15 Sep 2021 08:53:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bPHhwIXRxKI93tW/YgzBXWa08qdHt/VCyNn96E9BVKtsRFSh/eSEQWRFonQOEGK11blEGamqNaX0xtuu+L4/sQcFa2Nob8KxopeHCGv9mwv1Z1nQv9CETbraO/YZfWp9GbLdoT5+Qp0pIv1yT1t3Y8JQWXk65RY6MY8ykwTmfR+Sxc2as6T/Kq5dNH/n6tBLWZ5IeCqYTRcmtGBI8bRn6i778VpLMQMSijdYx7LOgbSriYqSLogt+VWX42CZua+P588RiXq4gtSBKkHARtSJ6o/QXmFQM8QFlZfXISdvjZvZ1B5p5TNFhcSDnm2hHgZKVfi059/ZJcbRbhjwqPf5OQ== 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; bh=WfZEAQPfAum67/FfNLP2VYOgfEgslR59rkcRAaYVVrE=; b=D3vHvjYIzEzMXVclX7aDg6FEWPPtSou4B9QvE3+pe+pDi86ooypPc7aidA4PLGqb6YXBl2olzWakgLYV/fGugd02ciSiMFBwHypxDuYHvj/NK5lwGaOZF2AZ+ARtUrD77Dej9d242dRf1MrIAo4V8IyZH3IAo+17xUo1tJbnf4Ax8tvEM3kNlM4lIkYtWGxxqIR2ejI+AoXvIpXrwmh6VGb3aq3TXbSnt7JUwwm06XGn4ua1uFBjMxaloaXNQp8OJ2uH2wepe9aDfS+/tQcK0IczENy0NUqTF3o+AIM8YBgG/ICoxouu8KJo1LZMfO8v+aNRYcW3F2F9DHm54sY/oQ== 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=WfZEAQPfAum67/FfNLP2VYOgfEgslR59rkcRAaYVVrE=; b=WFNnqI6/iVVvo7rR4PNGLMQksC/1iaskz603ztpYQGOlyh8JBIiIsoHfNAqlcr/tiWs7DhQzFcnp2Kt/xm+KjSuAncTndQ09YiTgfxPxIltLM6XGAO9ETaYB2pcDN0eNxmxL51TEMDGuXyy7ysVk/wDHhQVi0NGPtKEh4qfWl2+a8tjnsq42xgMVGtlnWVRX2KhfqA2SdeO+3R2w4POBmt1EsVuA6RGfSxDH3AiCJxwE8GeouEmBWMHN+6WZf75pZkMPDl59C8PtHiXz6ojMbH0HEsHrMNPacSkVYJ0JW42TvRdvEa+csIGI4bqtwJIRtySaQiNEDq8ZPaprlEGVUw== Authentication-Results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=nvidia.com; Received: from BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) by BL1PR12MB5304.namprd12.prod.outlook.com (2603:10b6:208:314::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.17; Wed, 15 Sep 2021 12:51:48 +0000 Received: from BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::e8af:232:915e:2f95]) by BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::e8af:232:915e:2f95%8]) with mapi id 15.20.4523.014; Wed, 15 Sep 2021 12:51:48 +0000 Date: Wed, 15 Sep 2021 09:51:46 -0300 From: Jason Gunthorpe To: Shameer Kolothum Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, alex.williamson@redhat.com, mgurtovoy@nvidia.com, linuxarm@huawei.com, liulongfang@huawei.com, prime.zeng@hisilicon.com, jonathan.cameron@huawei.com, wangzhou1@hisilicon.com Subject: Re: [PATCH v3 4/6] hisi-acc-vfio-pci: add new vfio_pci driver for HiSilicon ACC devices Message-ID: <20210915125146.GI4065468@nvidia.com> References: <20210915095037.1149-1-shameerali.kolothum.thodi@huawei.com> <20210915095037.1149-5-shameerali.kolothum.thodi@huawei.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210915095037.1149-5-shameerali.kolothum.thodi@huawei.com> X-ClientProxiedBy: YTXPR0101CA0017.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00::30) To BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) MIME-Version: 1.0 Received: from mlx.ziepe.ca (206.223.160.26) by YTXPR0101CA0017.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Wed, 15 Sep 2021 12:51:47 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mQUOA-000s8X-2U; Wed, 15 Sep 2021 09:51:46 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f7f1d142-14f3-4464-13ad-08d97847947a X-MS-TrafficTypeDiagnostic: BL1PR12MB5304: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3826; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JRUj68FUNOVNTlFLCwcXnmMpSNdRKy+bPA02K4rpjIWR23xLox0HC4JAMy3s+DEt0KEUZvieUa0mFM6mhMhaqjozEcBGLnEXNLVPIFcsgEEHg/ehjHfbnpr095dVIyVS4ok8Z8ESe1kMO5KnYdc2jxIXZRDP7AFKHxfNaHKavPy1ZqtHCkuiNGqsP/+JruHjDhG/Q5qGl2Itly7NNsyAv9dohrZPLykXfh2vc3JFFlxNg5DcWlS7N1OREJ6oYyATAZqyVSUygz2XVRT3pW4jDyueg8IHYFaJBkC/w3Gbr2TMDCpeROaJkkvdSOrdC1Xb8hXgtQxKWRRdaBqe/dg7X7iBgEapXJGqLq5QyFeEkvFjdUoeucjPR3209zkppuVpVFD+mwfoLqo3Uk1GMe3bD4RXk2GVAqxSFfTwe6dcGL0OoShYngwuOQEzfosgHIwz6eXVo7XI8lORrfcB1Oimz/wzPzBRTcefAiRs/nb6vcmRoMI3BXbXadsOIAqE798wSkG+dnaKEzc5vB8BwBAMXF9iFuWGJv9COuwxMQUnuPwAK1wCmDdI8feNdSXXfzGv1CvLeti2smzC/P9O7EXUsTkE3EPhhj77VsvSCzMF4nahSGeSzj/r6YUsatnlMbPnmzqCxibFuuHxIJyw6iHyKA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR12MB5506.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(366004)(396003)(39860400002)(136003)(376002)(346002)(5660300002)(8936002)(8676002)(478600001)(6916009)(66946007)(1076003)(66476007)(66556008)(7416002)(9746002)(36756003)(86362001)(33656002)(2906002)(38100700002)(426003)(2616005)(26005)(186003)(4326008)(83380400001)(316002)(9786002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?iYgouChASin7p3CKCfx0jsIN/1LT0fVX8mmEIvzVP0N5iZ69M7nbUjH5aInu?= =?us-ascii?Q?8g40zp0SoJJVQrHD4VYk+rEfQqaMdeGVXxFhDVc2V3IsQ+yOyC642jDM5Il3?= =?us-ascii?Q?l3ik7vYYYIEbAgsVAFMu+1qH/9Zu7jmY6u+240kGnkz1FTn3btU7Lg2gPzAy?= =?us-ascii?Q?4LnfkFZAZSXKA6WUjMa9E7j1bVmi6iaJO+sCN6nTJu1W9f3LlPi84PkwFu7/?= =?us-ascii?Q?+29TOZmuTukLP3dd6EBT22AEvoRb8VnM3EmPDqcA0/5xxxwLsQ6WUG9piy1V?= =?us-ascii?Q?NKyY9V6j7HubZhVQ4jjHOFb8P31FEUeKfI6sneUOSAhL8yueIFEZXGXX5JKM?= =?us-ascii?Q?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kWv+bsj3LaBDmo/Kh7Zsv?= =?us-ascii?Q?1KLk0QltR4wdyYGfzlXDVEgyj0p/laA5kmrAdd3KWffaTRsctbA3bbCVzTtT?= =?us-ascii?Q?mUyvbpOC71l3AcHmpaU44hcV?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7f1d142-14f3-4464-13ad-08d97847947a X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5506.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2021 12:51:48.0248 (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: EelXkKUY+WeuaXSt+RoQnZiuAwu5klDs8mbKTTh8yYbilLFyEo3N0G9ORgQaXyeV X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5304 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Sep 15, 2021 at 10:50:35AM +0100, Shameer Kolothum wrote: > +static const struct vfio_device_ops hisi_acc_vfio_pci_ops = { > + .name = "hisi-acc-vfio-pci", > + .open_device = hisi_acc_vfio_pci_open_device, > + .close_device = vfio_pci_core_close_device, > + .ioctl = vfio_pci_core_ioctl, > + .read = vfio_pci_core_read, > + .write = vfio_pci_core_write, > + .mmap = vfio_pci_core_mmap, > + .request = vfio_pci_core_request, > + .match = vfio_pci_core_match, > +}; Avoid horizontal alignments please > +static void hisi_acc_vfio_pci_remove(struct pci_dev *pdev) > +{ > + struct vfio_pci_core_device *vdev = dev_get_drvdata(&pdev->dev); > + > + vfio_pci_core_unregister_device(vdev); > + vfio_pci_core_uninit_device(vdev); > + kfree(vdev); > +} > + > +static const struct pci_device_id hisi_acc_vfio_pci_table[] = { > + { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_HUAWEI, SEC_VF_PCI_DEVICE_ID) }, > + { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_HUAWEI, HPRE_VF_PCI_DEVICE_ID) }, > + { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_HUAWEI, ZIP_VF_PCI_DEVICE_ID) }, > + { 0, } Just {} > +}; > + > +MODULE_DEVICE_TABLE(pci, hisi_acc_vfio_pci_table); > + > +static struct pci_driver hisi_acc_vfio_pci_driver = { > + .name = "hisi-acc-vfio-pci", This shoud be KBUILD_MODNAME, the string must always match the module name Jason