Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp38046lfv; Tue, 12 Apr 2022 16:19:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOjH4/LP9iNTyHacvWA5NtC0INFRaAJs+86+1YwLVAFPtB619awxrakZIi7Ty7UJuuUYDq X-Received: by 2002:a17:902:7006:b0:156:3cbe:6b04 with SMTP id y6-20020a170902700600b001563cbe6b04mr38936718plk.68.1649805549279; Tue, 12 Apr 2022 16:19:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649805549; cv=pass; d=google.com; s=arc-20160816; b=O4Q4P4SmgiC/aFOvZ3hhlit+07Ecedk9XN6vW3Dtq4PDnuMgqVAJNN34GNmM3cqbYI cfDVUWSSITTPRfQSP5GWoAuFFe3yHoZpZUNRVjXS2sckOXh9Q+u4/GWPgNYKwgnHUgg+ 8GRW9RksB8McAM8JiXYnrf2GfBywtz6zDiPqPzNMMpltJ9q+df7MbOWYfdrwyT4O2+iS KH8oI+T9bJFVGvAtd/EhQtQE0uImqPoTGLODioa64FB6C7Dtm3IItNOhLQfNLmt7WEka wUHb09VwArpQ+zI9h0WTSwZ8mwnvKAshdTAxNTZpInElrgxt4CsytTY7PeB4GQFsduCB FYpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=cthwjclGMPbPpnk/MGYP5dDa7WDpfI91BXxxjXyjJRU=; b=ucJ9nXVOEwk5BrDEfVx9akzf4LLdOOUtYoTkvsicGBXKUqcWwPGftYbm6H0YfPre0h w78/NyM2eli+EyQoNphFy5FsGdcGmPjHQOTtXQQ9fXtWqSVNCin6QjDESO4yRXGCgEQq XZuNEen4wGzycy2ImEvGmWvAdbcqz77GOOfytGXiVwuIUYznZ3bKbVkHAn4Lj1R2XNnb x6x0OI3E5MagkeJisZnRwiDmgnFtL5JvIVtQzcxuNNdvteh8W/u/BZJXmQD3L5prWxBF GRSUPplZN5T+vStg5hvvuKK/LzhKolieF2TAsqrdD22Ki9KXHH4xHf1MCqNMYdTaAgvJ Ak6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=RH8UxS+8; 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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k15-20020a170902760f00b00153b2d16531si12008830pll.313.2022.04.12.16.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:19:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=RH8UxS+8; 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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 37BAF22321B; Tue, 12 Apr 2022 15:03:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231860AbiDLVGy (ORCPT + 99 others); Tue, 12 Apr 2022 17:06:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231522AbiDLVGi (ORCPT ); Tue, 12 Apr 2022 17:06:38 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2060.outbound.protection.outlook.com [40.107.243.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F16F81557D8 for ; Tue, 12 Apr 2022 13:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C1fVpaXR29IRGij+cOQmVqZnNHiJq4DifdacNZ5Ny+MTu/vCGhdlwgz1+ftKkeq64DOwks+51aN8DWNOZwmC/4EJDPqa6RjD/ubjM+5bAmwWCqQsHwvFcy5BBh6xyy3s5ZKgBujVYLOYoYaQMrRGLEmv4i/NWpYYE7i3bLWU1H6eYMEgInjh8RHfdiTjGqDJmJuRTQNFm+OUJY2MMHeRxBCcEwk2iZ6oqe4JPtB2m3l2gzR95i9KM1giG0aaZzX5YWoVCXxBY142T2QCWQUrnKaQDvdkMCFTv35J8itzlcHHGj5E9Lh8PgKbSBFsSgfj4l+8bAGyrTFVDdQOCAVBEg== 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=cthwjclGMPbPpnk/MGYP5dDa7WDpfI91BXxxjXyjJRU=; b=lZ0oFkZ6WHEfoLmltXozs1eBHNBzfiYgkYAcH/5v3rctuk8RDn0SDvoYOVnMWe6AD9NHY6NdiRLnQfX2dAGUG2NacaosQO4P2E64tfQMIwFu90QMGYbsXNh8W8rQUIEdW6a3jfFlXpLdoEnC+TMvLhFh89Ne2AUlOXy6SRGEFbclw26Hm8eSj3r8Fwy6T+bY4aY3E9KJyDLrkFsElPLtj5xSrF5eXjWM1ayacNg8rRppXlCDw7KFYfYU8ZPRa5npOGiC9gTCCkrWZ8yJ+2t1O6/LCX7K1H+IbtMiP1z0kEqZ4jbaAEWNTFQ5KlZWHF/f93AdoAb9REkI63gMmIYw8w== 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=cthwjclGMPbPpnk/MGYP5dDa7WDpfI91BXxxjXyjJRU=; b=RH8UxS+8bbcVsaic4PU3bBYLakj1zLqgVmKW7yQNR60AeZ3BA/nTNA8MrYrSxMmOJdSl1elQ+TzSxYBaaa/JdMIixJiVWzs8fnMA3cexyqBS9Fk4wNL4Aj4hCeZp/b+roCN2BbyTHEQymbB6DUfM06qoXOXjFlsdTZBmZFG8JI2pfX25mI0M6Cy3MfbN/D9KFUe3GOEeZQRa4I5Fi61rD8g1bO+XWCRaRqPHbatAL68KUlsFivrbvpf2NZFv+p1372H24WyKmCpYu35PUh5evQKlWSnfpAKU4v270zzJyTi5mh8BEx9ns0If0s/OH47j7EQfLxJaPLi+Kw4BkHGrVA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4206.namprd12.prod.outlook.com (2603:10b6:208:1d5::18) by MWHPR12MB1679.namprd12.prod.outlook.com (2603:10b6:301:f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Tue, 12 Apr 2022 20:52:02 +0000 Received: from MN2PR12MB4206.namprd12.prod.outlook.com ([fe80::211e:d78f:c944:6665]) by MN2PR12MB4206.namprd12.prod.outlook.com ([fe80::211e:d78f:c944:6665%7]) with mapi id 15.20.5144.030; Tue, 12 Apr 2022 20:52:02 +0000 Message-ID: Date: Wed, 13 Apr 2022 02:21:47 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH 31/34] vfio/mdev: Remove mdev_parent_ops dev_attr_groups Content-Language: en-US To: Christoph Hellwig , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Zhenyu Wang , Zhi Wang Cc: Jason Gunthorpe , intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20220411141403.86980-1-hch@lst.de> <20220411141403.86980-32-hch@lst.de> X-Nvconfidentiality: public From: Kirti Wankhede In-Reply-To: <20220411141403.86980-32-hch@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MA1PR0101CA0063.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::25) To MN2PR12MB4206.namprd12.prod.outlook.com (2603:10b6:208:1d5::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df4e8198-8227-44dd-8a5f-08da1cc64b77 X-MS-TrafficTypeDiagnostic: MWHPR12MB1679:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4cEcKZnUrrwI7fr5mblA3yfcQ4WXhxhozNzGnbQb8bUVuzRaPC7T3GQFE+pjs0pi6pnPF0FbqTfmJjawGmf8rUS02SyF74qzCFXw0YP+dxtcLUQLluRsGQUKJ5kyjVPHsjQ/HARdAWWA2v4D+ItwaLs8FM0l2SrUaYCzI0hLMMoLUAjnADC8zW7ZGVffwDZ3o3pr8rWIKShuextJnDWyMbrO6+IP+hQSicB1OMS2N3EXadEdLVEtk2m682DsJrXnrKNmaTXm9VbVIH73EK1YeK0VHoIQxYZ4P6gKW+a1/Y/CvLrXrc/8xD21JiF41nghUxcW5fjo46O5NkIkTgZ3QkTvObEY2fs9pidgnmNV3ztTKaCj/6uAFfzXOcb7I40yj3mWssFmG6MeGSw1YOu8cln1r6wx4kFsOZ/9OCDBP0loKYAMAt4qUXdsRf5GNSWBZ2FBXIAs/I1vSwEtB3qrPRpkNzapkb+4cLz5nG8agmc3P9jCPXM/Ctn6fzrxOJC1jiY6AN1EWHyTcjXpV1WcW4gsa1CffqTV1M55T5rf3ESF5l7CTiLf4aPXoKf+kOTfke7aW6Ybf42hUxNWRkgcs3FDxRG6gnGvU1a2Zw0BWG1sIPOldIl/KoNKiBb/DaoyW88YGmV9bMKcjgm7ykJCxe8m2z1DBCJJDnUzbjMBjGcqVajIVcPPXXWPizIHQyc+6S4ldcPcUAZSxLb58CszZPOlx3bk4/B8tGTYjs8SRNc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4206.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6486002)(2906002)(6512007)(31686004)(66946007)(31696002)(8676002)(186003)(26005)(4326008)(7416002)(53546011)(8936002)(5660300002)(6666004)(86362001)(66556008)(55236004)(2616005)(6506007)(508600001)(83380400001)(66476007)(36756003)(316002)(110136005)(38100700002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YUx3V1drNGJxOUkxSVFtMVpxck15SEZmaVk1c01CUFNEMDh1RDdWWDlKcUt3?= =?utf-8?B?ZDFOdFdMd0J5eUtNRFhOM25ONHc2eG51KzZENzBwT2dnYmxXWVQ2VzFpb0Jv?= =?utf-8?B?b3JTMTRPSEJrTEpQa2NZU2pCODkyOHRBLzJ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= =?utf-8?B?WFJ4ODcwSnk1Mk5KOWNFOC85NzRJYWJ6eHdvOFZLRmoxaTJDdWZ2Vlg1WWdG?= =?utf-8?B?UFVKQVIvRitWZFlnUjFXeS8yekVJd1BMNXhHVnowcG5JVmxVcDExRVcvU3Mr?= =?utf-8?B?cW8wR25aa2tWeWs2REZOM1hDUXhZdk1qeWJlUnJPS2RzQTh0T3RYblkwemJp?= =?utf-8?B?cUl3UThvZ1A2NjljQkdQalV5b29SaEVYRUljSkkrb2NKN1MrNk15ZW1KQlBO?= =?utf-8?B?RkNLbWpvRzhFemk4aW9Pak1yWXFaUVR1d21RZkNWM0phaDdjY3M5ODRVeWZr?= =?utf-8?B?T0dzdTdsa0VHN3VDM1FKbmFjc3FRa0J0L2oyS1JBRGtaYTBxZVRjRjZQbXhF?= =?utf-8?B?V0JVbnhGQXEvS09DV3ZWNmtLUFdLUEx3V29URXROQUx3SXUzbXE2dz09?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: df4e8198-8227-44dd-8a5f-08da1cc64b77 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4206.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2022 20:52:02.5180 (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: 9roXIkzC4UarfrGXlX6hl/5cJcGEKGDr4JruvM0cplhojrYoIe+Zz5jSrP7PuVI9iPgJcKk4n8szmgqrXLCuvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1679 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/11/2022 7:44 PM, Christoph Hellwig wrote: > From: Jason Gunthorpe > > This is only used by one sample to print a fixed string that is pointless. > > In general, having a device driver attach sysfs attributes to the parent > is horrific. This should never happen, and always leads to some kind of > liftime bug as it become very difficult for the sysfs attribute to go back > to any data owned by the device driver. > > Remove the general mechanism to create this abuse. > > Signed-off-by: Jason Gunthorpe > Signed-off-by: Christoph Hellwig > --- > drivers/vfio/mdev/mdev_sysfs.c | 12 ++---------- > include/linux/mdev.h | 2 -- > samples/vfio-mdev/mtty.c | 30 +----------------------------- > 3 files changed, 3 insertions(+), 41 deletions(-) > Update Documentation/driver-api/vfio-mediated-device.rst where mtty sample code explained. Tree command output should be updated, i.e remove below 2 lines. |-- mtty_dev | `-- sample_mtty_dev Rest looks good to me. Thanks, Kirti