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 4C753C43334 for ; Thu, 9 Jun 2022 07:16:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235159AbiFIHQJ (ORCPT ); Thu, 9 Jun 2022 03:16:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232523AbiFIHQI (ORCPT ); Thu, 9 Jun 2022 03:16:08 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 369755A0AE; Thu, 9 Jun 2022 00:16:05 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id B883C6732D; Thu, 9 Jun 2022 09:16:00 +0200 (CEST) Date: Thu, 9 Jun 2022 09:16:00 +0200 From: Christoph Hellwig To: Kirti Wankhede Cc: Christoph Hellwig , Tony Krowiak , Halil Pasic , Jason Herne , Eric Farman , Matthew Rosato , Zhenyu Wang , Zhi Wang , Alex Williamson , kvm@vger.kernel.org, linux-s390@vger.kernel.org, intel-gvt-dev@lists.freedesktop.org, Neo Jia , Dheeraj Nigam , Tarun Gupta Subject: Re: [PATCH 3/8] vfio/mdev: simplify mdev_type handling Message-ID: <20220609071600.GA4173@lst.de> References: <20220603063328.3715-1-hch@lst.de> <20220603063328.3715-4-hch@lst.de> <86df429e-9f01-7a91-c420-bb1130b4d343@nvidia.com> <20220607055050.GB8680@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org On Wed, Jun 08, 2022 at 11:27:02PM +0530, Kirti Wankhede wrote: >> the code correctness perspective. It just isn't very useful. Just >> like say creating a kobject without attributes in the device model. > > Creating kobject without kobj_type is not allowed in the kernel, similarly > mdev registration should not be allowed without its type. But the kobj_type doesn't need to have any attributes. > Instead of exporting mdev_type_add/mdev_type_remove, these functions might > be called internally from registration function. I very fundamentally disagree. That is exactly what makes the current interface so messy and complicated and I want to get rid of that.