Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1474324img; Tue, 19 Mar 2019 08:23:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGtFn9tp8GgIclsXtX/RcGkDAKqHZKLKuBT+xgEHLLreaXhvKh/OipbBfnUftu6dVwU04F X-Received: by 2002:a62:4287:: with SMTP id h7mr2542882pfd.110.1553009019575; Tue, 19 Mar 2019 08:23:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553009019; cv=none; d=google.com; s=arc-20160816; b=C3LcjZ7eVZUE2hPtDPdjLlwds/OwyaBb/JXSC9WIGAceKonCZt1xNHDyvVNq04pyL8 9hXPMK6jVHRQmgd5RqdBbvRgPuTjoOX0X1YWGeWOZY3Zsd8gUZtn6wB3m0li6mEdMp4J Q7EtxbCjf2fxdcfKUXNIu00lWFbo31ZkoU16UV5LfaO9urnW49QGoRlxiAeVI72todLu 4QmBKXGUtqeddf9UIvvLeJBbLNU0A8hPF5Dthk732KX7yRjNBTheBz1Rma/6wuy9+BN2 uA7n/VELRBjV6DicNVvHGSCAWC3vfjy3MO5RdcJhpWn8XI9I34yp6m6Bf05c6YFMcD0Q 7lwA== 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=hC8NF9M7QrHp6+TUzibsHQdoZ4HiJdkjGjMsMizGa8k=; b=hsZOD9TrLpagjEocO+6btQuQTI9giYmkx7v6E53rvvTgvUFPp5tWZQPjc4fzqwoDbp NONdMuNJrg3q4DJDKKh6B2lu6A0bIYoxzFTf3UNvTBmVsg4DyF67s6hfNZHmy4MR2uiL 0tM5Srsq9B3jd1zLDzxrS4IaPBuFt5uOH0kZ/a6fJbyGZJ7twHb1PAEOLWKoFbMx/0zv d/flP2PZcDvqjwbtVURbJAZr3Xo0i5BBeKH+FU2D0QtRBixzZbH0h9ENRvIcLDsawSyz x02dVfa3cFmL/Xwf32t47ro62pyyhMonM5c1roA823xGpRSLInZAUtAFrXpUlRSZ7O8j hzqA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23si11327931pgv.63.2019.03.19.08.23.23; Tue, 19 Mar 2019 08:23:39 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727736AbfCSPVT (ORCPT + 99 others); Tue, 19 Mar 2019 11:21:19 -0400 Received: from mga07.intel.com ([134.134.136.100]:5751 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbfCSPVT (ORCPT ); Tue, 19 Mar 2019 11:21:19 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 08:21:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,498,1544515200"; d="scan'208";a="328664727" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by fmsmga006.fm.intel.com with ESMTP; 19 Mar 2019 08:21:17 -0700 Date: Tue, 19 Mar 2019 09:22:13 -0600 From: Keith Busch To: Maxim Levitsky Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Jens Axboe , Alex Williamson , Keith Busch , Christoph Hellwig , Sagi Grimberg , Kirti Wankhede , "David S . Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Wolfram Sang , Nicolas Ferre , "Paul E . McKenney " , Paolo Bonzini , Liang Cunming , Liu Changpeng , Fam Zheng , Amnon Ilan , John Ferlan Subject: Re: your mail Message-ID: <20190319152212.GC24176@localhost.localdomain> References: <20190319144116.400-1-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190319144116.400-1-mlevitsk@redhat.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 19, 2019 at 04:41:07PM +0200, Maxim Levitsky wrote: > -> Share the NVMe device between host and guest. > Even in fully virtualized configurations, > some partitions of nvme device could be used by guests as block devices > while others passed through with nvme-mdev to achieve balance between > all features of full IO stack emulation and performance. > > -> NVME-MDEV is a bit faster due to the fact that in-kernel driver > can send interrupts to the guest directly without a context > switch that can be expensive due to meltdown mitigation. > > -> Is able to utilize interrupts to get reasonable performance. > This is only implemented > as a proof of concept and not included in the patches, > but interrupt driven mode shows reasonable performance > > -> This is a framework that later can be used to support NVMe devices > with more of the IO virtualization built-in > (IOMMU with PASID support coupled with device that supports it) Would be very interested to see the PASID support. You wouldn't even need to mediate the IO doorbells or translations if assigning entire namespaces, and should be much faster than the shadow doorbells. I think you should send 6/9 "nvme/pci: init shadow doorbell after each reset" separately for immediate inclusion. I like the idea in principle, but it will take me a little time to get through reviewing your implementation. I would have guessed we could have leveraged something from the existing nvme/target for the mediating controller register access and admin commands. Maybe even start with implementing an nvme passthrough namespace target type (we currently have block and file).