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=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 01C3BC432C0 for ; Tue, 19 Nov 2019 23:10:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C91BD2245C for ; Tue, 19 Nov 2019 23:10:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="pE71tkb4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726948AbfKSXK0 (ORCPT ); Tue, 19 Nov 2019 18:10:26 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:33835 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726025AbfKSXKZ (ORCPT ); Tue, 19 Nov 2019 18:10:25 -0500 Received: by mail-qt1-f195.google.com with SMTP id i17so26737834qtq.1 for ; Tue, 19 Nov 2019 15:10:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9PMAt9BpsUAZp7Bq1/geFdXKwd/meD5cyXpSWT+Lwjw=; b=pE71tkb4vz6SNRqGBbLLdLfetZLPw3HitJWCvIUNNIpyeTQh2eXlnQnH/Kfd//LZ1b k5g6pc66cOli0osrRQfkd/iJ7Wqt4ogWX9G1drEftRQG0+huQYwK77FnWqvnXnKvfh75 1NO0F9IQS8S7S6ggZ7pY8UrfoUAMQZfXpYfoPMkGKhSl5u+YY9PcUnPeRylw7t9jCING ZZqkMNA8BRIhV5nI/jrILCSSim4qtwFNlb6VYnUeXkTxjRxL1sUGV7qe1QehW572+M3P BM4YOI5Io5j+4xAUK02y/VcmRTBkC5v684YEVYTZ5n+Xlj3d+kP5LFNoxzqFRWfgZePq rMcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9PMAt9BpsUAZp7Bq1/geFdXKwd/meD5cyXpSWT+Lwjw=; b=uhxl+FF1wypqE7HiW+m2/+so6PieJ9b+yU8mPvzZk/U4+tuyANxuaZAxnxlvmJUv36 VMsj2m0Tt0HABxfHW62VcPfswM2hPVv6eIyjtASnGXK/7ocUKbzxs0zpBkHJM9oGLB/v tgMCwwOMhDlt3f06JxQ7O8ECp1H/9ZE600qRLpj5JruNdoTjqustKaMyoWMJWDhysOvd 27mWjT+ss0NVQGCk2xRWMAVVD9DtNctaxzc9weCNi5MyfIlFTizwZSNPUwfXSzgK43Bw ox9Q+5y5jR8BuwkjwZ1JlkaC4IysV7Tl1NKz6nYlvNV9cx2w0dOidAqwoa8ZOqDS0rCy 7G4Q== X-Gm-Message-State: APjAAAXn7uyqefWL5CfxT+9sUNMRxBqZEZDDSCpQoyKiwMUWoV7YMiTH rCDvfuDLaSxbmXWWikcF9tJAlw== X-Google-Smtp-Source: APXvYqzesiXM2A+pKq+Xz4FHwQgAiCe2v9inGm0MQBdQeEcjFmSBfQkf/yh83hwKuJJZQN0EGsfZwQ== X-Received: by 2002:ac8:3475:: with SMTP id v50mr334772qtb.105.1574205024721; Tue, 19 Nov 2019 15:10:24 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-113-180.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.180]) by smtp.gmail.com with ESMTPSA id d131sm122112qkg.62.2019.11.19.15.10.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Nov 2019 15:10:24 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1iXCdb-0004gv-0x; Tue, 19 Nov 2019 19:10:23 -0400 Date: Tue, 19 Nov 2019 19:10:23 -0400 From: Jason Gunthorpe To: "Michael S. Tsirkin" Cc: Jason Wang , Parav Pandit , Jeff Kirsher , "davem@davemloft.net" , "gregkh@linuxfoundation.org" , Dave Ertman , "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "nhorman@redhat.com" , "sassmann@redhat.com" , Kiran Patil , Alex Williamson , "Bie, Tiwei" Subject: Re: [net-next v2 1/1] virtual-bus: Implementation of Virtual Bus Message-ID: <20191119231023.GN4991@ziepe.ca> References: <13946106-dab2-6bbe-df79-ca6dfdeb4c51@redhat.com> <20191119164632.GA4991@ziepe.ca> <20191119134822-mutt-send-email-mst@kernel.org> <20191119191547.GL4991@ziepe.ca> <20191119163147-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191119163147-mutt-send-email-mst@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Tue, Nov 19, 2019 at 04:33:40PM -0500, Michael S. Tsirkin wrote: > On Tue, Nov 19, 2019 at 03:15:47PM -0400, Jason Gunthorpe wrote: > > On Tue, Nov 19, 2019 at 01:58:42PM -0500, Michael S. Tsirkin wrote: > > > On Tue, Nov 19, 2019 at 12:46:32PM -0400, Jason Gunthorpe wrote: > > > > As always, this is all very hard to tell without actually seeing real > > > > accelerated drivers implement this. > > > > > > > > Your patch series might be a bit premature in this regard. > > > > > > Actually drivers implementing this have been posted, haven't they? > > > See e.g. https://lwn.net/Articles/804379/ > > > > Is that a real driver? It looks like another example quality > > thing. > > > > For instance why do we need any of this if it has '#define > > IFCVF_MDEV_LIMIT 1' ? > > > > Surely for this HW just use vfio over the entire PCI function and be > > done with it? > > What this does is allow using it with unmodified virtio drivers > within guests. You won't get this with passthrough as it only > implements parts of virtio in hardware. I don't mean use vfio to perform passthrough, I mean to use vfio to implement the software parts in userspace while vfio to talk to the hardware. kernel -> vfio -> user space virtio driver -> qemu -> guest Generally we don't want to see things in the kernel that can be done in userspace, and to me, at least for this driver, this looks completely solvable in userspace. Jason