Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2423145yba; Mon, 6 May 2019 05:59:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYApNys/TLclsv08XRMOXng8OsMb3ncVIUlG/M/zDJ2mnweWmKsRuVED2PaPBGOTDAGmyI X-Received: by 2002:a17:902:684b:: with SMTP id f11mr24110071pln.96.1557147585209; Mon, 06 May 2019 05:59:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557147585; cv=none; d=google.com; s=arc-20160816; b=sOYA0JWA3wZN9Tg0JIQ/n2VO6+Y3WhGYEa/SKt9UAHcTZmd6CNCgY/ge6fxOPwfSaB gFk30mROfc1Ured9dxaEmWYKozUWc/XXLYIzhFJrOGM78pdE53CsNCNDRnK+FwgNZpSM 73EDzFE3+AZbyiqMDDga4bBCyIksEwaEIgnkbaJHmMa1gxY96wmuyQs+UaN2nju/PYmz WbnJmvq1diabMtFyGx6umbhZUX3bjlG+kp2nRKLiZWK+q3EtNMg4QXnk0apE8SipQAE6 Gt/nkG6L6VRjYRFBZtQL+3KcKV1d6nTXNyDuxSTwR0/Ho+r/U0yMGmkz+O07B/y3Wx5y GX+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6uRlrKdSIHyP0D26j/JzZkQHgge1eXwDDz3m3oOuXqI=; b=OQDh0HJLZHw58fs1rJ5hoW3dG25RiJLzkKtMrSUrGI37iIj6tsqn1/GxZmtoPlUCGF 2KgnlpDkRHvybMu2uKfmp+C5qmoqGdt3swOWGrY6n/yADNwvyPl/tR9zjF+RGvcKet/S kJeg8LCrpdxWOvZYLyYfqLa6i2DvI4lo6WbtM9E6CGBc/y4IN93qUoOw6EEH+DRwIQ1a DOaE0szKYVy82+sdazPYgpBs++7Htm8kJhTlmaJDM3y1TLV02aPl0LBXqpyoWPZu5uLj 5Eas/0Y5mnnyXRtyNzEkvgYcv52Y8uY2YxgcbKMnLw7kff42drjm2uuJnNY8rznZ1S5u cWVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o28si5485413pgm.183.2019.05.06.05.59.26; Mon, 06 May 2019 05:59:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726477AbfEFM6N (ORCPT + 99 others); Mon, 6 May 2019 08:58:13 -0400 Received: from verein.lst.de ([213.95.11.211]:52187 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbfEFM6N (ORCPT ); Mon, 6 May 2019 08:58:13 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 7423D67358; Mon, 6 May 2019 14:57:52 +0200 (CEST) Date: Mon, 6 May 2019 14:57:52 +0200 From: Christoph Hellwig To: Maxim Levitsky Cc: Christoph Hellwig , Fam Zheng , Keith Busch , Sagi Grimberg , kvm@vger.kernel.org, Wolfram Sang , Greg Kroah-Hartman , Liang Cunming , Nicolas Ferre , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, "David S . Miller" , Jens Axboe , Alex Williamson , Kirti Wankhede , Mauro Carvalho Chehab , Paolo Bonzini , Liu Changpeng , "Paul E . McKenney" , Amnon Ilan , John Ferlan Subject: Re: [PATCH v2 00/10] RFC: NVME MDEV Message-ID: <20190506125752.GA5288@lst.de> References: <20190502114801.23116-1-mlevitsk@redhat.com> <20190503121838.GA21041@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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 06, 2019 at 12:04:06PM +0300, Maxim Levitsky wrote: > 1. Frontend interface (the interface that faces the guest/userspace/etc): > > VFIO/mdev is just way to expose a (partially) software defined PCIe device to a > guest. > > Vhost on the other hand is an interface that is hardcoded and optimized for > virtio. It can be extended to be pci generic, but why to do so if we already > have VFIO. I wouldn't say vhost is virtio specific. At least Hanne's vhost-nvme doesn't get impacted by that a whole lot. > 2. Backend interface (the connection to the real nvme device): > > Currently the backend interface _doesn't have_ to allocate a dedicated queue and > bypass the block layer. It can use the block submit_bio/blk_poll as I > demonstrate in the last patch in the series. Its 2x slower though. > > However, similar to the (1), when the driver will support the devices with > hardware based passthrough, it will have to dedicate a bunch of queues to the > guest, configure them with the appropriate PASID, and then let the guest useA > these queues directly. We will not let you abuse the nvme queues for anything else. We had that discussion with the mellanox offload and it not only unsafe but also adds way to much crap to the core nvme code for corner cases. Or to put it into another way: unless your paravirt interface requires zero specific changes to the core nvme code it is not acceptable at all.