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 EEBAFFA3742 for ; Sat, 29 Oct 2022 03:43:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbiJ2Dng (ORCPT ); Fri, 28 Oct 2022 23:43:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbiJ2Dnf (ORCPT ); Fri, 28 Oct 2022 23:43:35 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA0A61C8D7C; Fri, 28 Oct 2022 20:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667015014; x=1698551014; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=lwhcsqVAPcB+BRLzzkySku/43hUGK299jANuukpJQiU=; b=DU5uUi+sMPvwvQvrMrsKVZ7QYkhHdRbqX3edVEUBiX13HbqjrMb5Zjeo PHEstuGA4JyAm3XM8ER+4XJKw8Q2ON8Q3DT9eWSAfZDIKjjA3W9x5gT9z yZCeUG/39seUm49yg0mno4PoeehngrAK3ynElWQ/cNvFtXTAKHLrh3Eu4 44prwvaoYNMnf8Yo2jk5BU14jvVq4Is03d5ax0FVyyZMo38hlze/oI2o1 7hf6fyHD/vBT6+6AkrixetzF6jYZGazQ4MSxq8mh5H1+/aT+7y9DsWlyR 7FDqZv9FtaYggSrj1xpsRo/RArb6CAU77zibHcxobyCJQ4LV1UpGOJEVk A==; X-IronPort-AV: E=McAfee;i="6500,9779,10514"; a="309723947" X-IronPort-AV: E=Sophos;i="5.95,222,1661842800"; d="scan'208";a="309723947" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2022 20:43:34 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10514"; a="635522260" X-IronPort-AV: E=Sophos;i="5.95,222,1661842800"; d="scan'208";a="635522260" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.215.211]) ([10.254.215.211]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2022 20:43:25 -0700 Message-ID: <8b165b88-eea1-c891-2754-33209a2711bf@linux.intel.com> Date: Sat, 29 Oct 2022 11:43:23 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Cc: baolu.lu@linux.intel.com, bpf@vger.kernel.org, Jonathan Corbet , David Woodhouse , iommu@lists.linux.dev, Joerg Roedel , Kevin Tian , linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor , Nick Desaulniers , Miguel Ojeda , Robin Murphy , Shuah Khan , Suravee Suthikulpanit , Tom Rix , Will Deacon , Alex Williamson , Chaitanya Kulkarni , Cornelia Huck , Daniel Jordan , David Gibson , Eric Auger , Eric Farman , Jason Wang , Jean-Philippe Brucker , Joao Martins , kvm@vger.kernel.org, Matthew Rosato , "Michael S. Tsirkin" , Nicolin Chen , Niklas Schnelle , Shameerali Kolothum Thodi , Yi Liu , Keqian Zhu Subject: Re: [PATCH v3 05/15] iommufd: File descriptor, context, kconfig and makefiles Content-Language: en-US To: Jason Gunthorpe References: <5-v3-402a7d6459de+24b-iommufd_jgg@nvidia.com> <9a837538-6333-0973-c6f4-229064026330@linux.intel.com> From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On 2022/10/27 1:14, Jason Gunthorpe wrote: > On Wed, Oct 26, 2022 at 08:58:23PM +0800, Baolu Lu wrote: >>> + [_IOC_NR(_ioctl) - IOMMUFD_CMD_BASE] = { \ >>> + .size = sizeof(_struct) + \ >>> + BUILD_BUG_ON_ZERO(sizeof(union ucmd_buffer) < \ >>> + sizeof(_struct)), \ >>> + .min_size = offsetofend(_struct, _last), \ >>> + .ioctl_num = _ioctl, \ >>> + .execute = _fn, \ >>> + } >>> +static struct iommufd_ioctl_op iommufd_ioctl_ops[] = { >> >> How about making the ops "static const"? > > Yes both const's were missed > >>> +static void __exit iommufd_exit(void) >>> +{ >>> + misc_deregister(&iommu_misc_dev); >>> +} >>> + >>> +module_init(iommufd_init); >>> +module_exit(iommufd_exit); >>> + >>> +MODULE_DESCRIPTION("I/O Address Space Management for passthrough devices"); >>> +MODULE_LICENSE("GPL"); >> >> Could above be "GPL v2"? > > It should be just "GPL", see Documentation/process/license-rules.rst: > > "GPL v2" Same as "GPL". It exists for historic Ah! Thanks for letting me know this. > >>> --- /dev/null >>> +++ b/include/uapi/linux/iommufd.h >>> @@ -0,0 +1,55 @@ >>> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ >>> +/* Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES. >>> + */ >>> +#ifndef _UAPI_IOMMUFD_H >>> +#define _UAPI_IOMMUFD_H >>> + >>> +#include >>> +#include >>> + >>> +#define IOMMUFD_TYPE (';') >>> + >>> +/** >>> + * DOC: General ioctl format >>> + * >>> + * The ioctl mechanims follows a general format to allow for extensibility. Each >> ^^^^^^^^^ mechanism? > > How about "interface" ? Yes. It works. With above addressed, Reviewed-by: Lu Baolu Best regards, baolu