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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41712C43333 for ; Wed, 10 Mar 2021 07:57:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2891F64FF2 for ; Wed, 10 Mar 2021 07:57:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231829AbhCJH5R (ORCPT ); Wed, 10 Mar 2021 02:57:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbhCJH4w (ORCPT ); Wed, 10 Mar 2021 02:56:52 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F8B6C06174A; Tue, 9 Mar 2021 23:56:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8yDNi4Cu7JaX2t8j5a1pH+xv/sVGeWdMdEUl6pT4Ks0=; b=DMrk3dBOuhklCt4yj8SS0dgfR4 +1PbC4jpBhZCLTLvddt8tZDJoxaoW6ICKxqclcUI+u12CQhc7x91rDb0NNszOXkJSa15d+94Ek8Ri myp2LwbQR9xow+bF02kIENvcti+ctlnLgdpilVo1/z64HTSZ+Lvn0PeIO9DsJgWUvrs2z2H+aHoIA M5MATDVvPDQM797+9scQSd0xpzlz+d95SBedfNXbHImZi9+eTUyNsJd2CEtR2UAj3w0JU6cVPF8/a 0cxIX9Qq26wbejO5uKM59JAVZAoGQUTtGAa975CyqxnvkTqLJ9YwCdNkNO6EXIo/7BUi9MIJzBDAX NrJ3GZSg==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lJthv-002nUx-HH; Wed, 10 Mar 2021 07:56:43 +0000 Date: Wed, 10 Mar 2021 07:56:39 +0000 From: Christoph Hellwig To: Alex Williamson Cc: cohuck@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, jgg@nvidia.com, peterx@redhat.com Subject: Re: [PATCH v1 07/14] vfio: Add a device notifier interface Message-ID: <20210310075639.GB662265@infradead.org> References: <161523878883.3480.12103845207889888280.stgit@gimli.home> <161524010999.3480.14282676267275402685.stgit@gimli.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <161524010999.3480.14282676267275402685.stgit@gimli.home> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 08, 2021 at 02:48:30PM -0700, Alex Williamson wrote: > Using a vfio device, a notifier block can be registered to receive > select device events. Notifiers can only be registered for contained > devices, ie. they are available through a user context. Registration > of a notifier increments the reference to that container context > therefore notifiers must minimally respond to the release event by > asynchronously removing notifiers. Notifiers generally are a horrible multiplexed API. Can't we just add a proper method table for the intended communication channel?