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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A1C6EB64DC for ; Mon, 17 Jul 2023 22:52:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id BCEA881D3A; Mon, 17 Jul 2023 22:52:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org BCEA881D3A Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WSU35uqK X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bQcJ21ILL9oj; Mon, 17 Jul 2023 22:52:13 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3C1E781D18; Mon, 17 Jul 2023 22:52:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3C1E781D18 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 16990C0071; Mon, 17 Jul 2023 22:52:13 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id F2984C0032 for ; Mon, 17 Jul 2023 22:52:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B17BC40863 for ; Mon, 17 Jul 2023 22:52:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B17BC40863 Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WSU35uqK X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id elR_t3F2IYBu for ; Mon, 17 Jul 2023 22:52:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 7E5BB40861 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 7E5BB40861 for ; Mon, 17 Jul 2023 22:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689634329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8wy84DSSq8n2YYiK0mWellsvoswCFp/2kMAmdZ+UHHc=; b=WSU35uqKWX5qXsL9Eqi4qqS9SCAvtRdUoP1pqlX2O/1cZK2gLwhVZqB5eExNH9bGJCaIvz BDObKB9Pjgy9nnNWI0Mg64rgQFu1m48ni/wL21sFRtdMbxZw6ZsGTbH7RccOeY6fV1KDLB hn5FNoggx6POG5Pi2hj0zNHisqxMXTQ= Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-308-Xu2evVDSPn63GzDEi_D4oQ-1; Mon, 17 Jul 2023 18:52:07 -0400 X-MC-Unique: Xu2evVDSPn63GzDEi_D4oQ-1 Received: by mail-io1-f72.google.com with SMTP id ca18e2360f4ac-786fa88a6f0so317984539f.1 for ; Mon, 17 Jul 2023 15:52:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689634327; x=1692226327; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=8wy84DSSq8n2YYiK0mWellsvoswCFp/2kMAmdZ+UHHc=; b=YGancGnbNVZ0IMSO+VFEiZ+8nBrJ6pNCLcjk67+ieCDxxwjUxFCMwrGfNT8QwfPQx4 ecyQv3ykh36inJhQNU6DFYkfVUmduDUru/p1lMkuhQSfKwapJzGwVj2k5oyasCouDmy6 JJoxD2S9QgEM6YP0Cfm85OGiE5OZHS8BO4oqo8YOPDTQe1/eGR6vSTSCnTFrpVe2vBDb PbiM2XulE2Si8UZqHH6L+yrYXoUYLXt234PVnyJ+bJ19OlNey5Ld+qswB5SNFemrsrJ2 xFrNHG003uLMVkgpUu1UjT/g07MM5HeVH6gvRe3QvLUQ8ZXkvY3oM245euvxWo+osZHj tA7g== X-Gm-Message-State: ABy/qLbDmUCSZJFzeqY5nG94fXK4Zu7vlnjXkRKqK4liw/hxpRZQ5Mth e33doUWaBvwTEqR/ffK4xOObmqVV5GE+5xWer/9N3X5SGLOm/RsVgWDoToPZyYEQYdbfh142qss wZa3OdfiMe/l4VzEHCsH9kp5KdlusahWzO9P/aMH9Gw== X-Received: by 2002:a92:c651:0:b0:347:693a:7300 with SMTP id 17-20020a92c651000000b00347693a7300mr1012069ill.26.1689634327051; Mon, 17 Jul 2023 15:52:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlGlBYmCdY1EaUds5QDcX7E6PqePOm9wJTOwk2wgOBkeJp+9wxIVvWJlHjSTuTXhWw/m+atXtQ== X-Received: by 2002:a92:c651:0:b0:347:693a:7300 with SMTP id 17-20020a92c651000000b00347693a7300mr1012015ill.26.1689634326829; Mon, 17 Jul 2023 15:52:06 -0700 (PDT) Received: from redhat.com ([38.15.36.239]) by smtp.gmail.com with ESMTPSA id d10-20020a92ddca000000b00341c0710169sm242627ilr.46.2023.07.17.15.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 15:52:06 -0700 (PDT) Date: Mon, 17 Jul 2023 16:52:03 -0600 From: Alex Williamson To: Jason Gunthorpe Subject: Re: [PATCH 0/2] eventfd: simplify signal helpers Message-ID: <20230717165203.4ee6b1e6.alex.williamson@redhat.com> In-Reply-To: References: <20230630155936.3015595-1-jaz@semihalf.com> <20230714-gauner-unsolidarisch-fc51f96c61e8@brauner> <20230717130831.0f18381a.alex.williamson@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: linux-aio@kvack.org, Muchun Song , Tony Krowiak , Matthew Rosato , Paul Durrant , Tom Rix , Roman Gushchin , dri-devel@lists.freedesktop.org, Michal Hocko , Heiko Carstens , linux-mm@kvack.org, Kirti Wankhede , netdev@vger.kernel.org, Vineeth Vijayan , Diana Craciun , Borislav Petkov , Alexander Gordeev , Fei Li , Xuan Zhuo , Marcin Wojtas , Arnd Bergmann , Leon Romanovsky , Harald Freudenberger , x86@kernel.org, Halil Pasic , Ingo Molnar , Moritz Fischer , Frederic Barrat , Xu Yilun , linux-fpga@vger.kernel.org, Zhi Wang , Wu Hao , Jason Herne , Eric Farman , Dave Hansen , Andrew Donnellan , Vasily Gorbik , linux-s390@vger.kernel.org, Dominik Behr , intel-gfx@lists.freedesktop.org, Sean Christopherson , Eric Auger , Greg Kroah-Hartman , Shakeel Butt , kvm@vger.kernel.org, Rodrigo Vivi , cgroups@vger.kernel.org, Thomas Gleixner , virtualization@lists.linux-foundation.org, intel-gvt-dev@lists.freedesktop.org, io-uring@vger.kernel.org, Jens Axboe , Tvrtko Ursulin , Christian Brauner , Grzegorz Jaszczyk , Oded Gabbay , linux-usb@vger.kernel.org, Peter Oberparleiter , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Benjamin LaHaise , "Michael S. Tsirkin" , Sven Schnelle , Johannes Weiner , linux-fsdevel@vger.kernel.org, Paolo Bonzini , David Woodhouse , linuxppc-dev@lists.ozlabs.org, Pavel Begunkov X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Mon, 17 Jul 2023 19:12:16 -0300 Jason Gunthorpe wrote: > On Mon, Jul 17, 2023 at 01:08:31PM -0600, Alex Williamson wrote: > > > What would that mechanism be? We've been iterating on getting the > > serialization and buffering correct, but I don't know of another means > > that combines the notification with a value, so we'd likely end up with > > an eventfd only for notification and a separate ring buffer for > > notification values. > > All FDs do this. You just have to make a FD with custom > file_operations that does what this wants. The uAPI shouldn't be able > to tell if the FD is backing it with an eventfd or otherwise. Have the > kernel return the FD instead of accepting it. Follow the basic design > of eg mlx5vf_save_fops Sure, userspace could poll on any fd and read a value from it, but at that point we're essentially duplicating a lot of what eventfd provides for a minor(?) semantic difference over how the counter value is interpreted. Using an actual eventfd allows the ACPI notification to work as just another interrupt index within the existing vfio IRQ uAPI. Thanks, Alex _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization