Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp749745img; Wed, 20 Mar 2019 10:04:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPt5KU5dPSpoUfcrl6WaQ+k09sWYmAMos8Y7TJTpZHfzrkPt2w5nkDZHch2ms4SJe11nBL X-Received: by 2002:a63:2c3:: with SMTP id 186mr8330922pgc.161.1553101489201; Wed, 20 Mar 2019 10:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553101489; cv=none; d=google.com; s=arc-20160816; b=vhaRgN/ovZMhbeUEUjM2xtXO7omg/k2yYBXboko0mcpiG7Pzbr4HiOL2fni0CmhE4u D3Q7ZGYFaUwHSKFOBZTlpUqH/6UJqMggbhQuRdQp9MmA4HZzKBv+8Og0iOc5dvBzcj0o aUiaqaJF90AuZ1iZNj5RQ/YPzKZqv7cG7LT3fVJBZ+iqjYi4yVOGm2Cbo/IX/4y2ynN7 ZzYBMsMdsVMWKDAUVlG2SZBOElbT8GRAwkX+v6jCEcCMl4SainkA+JyhY48yEIUf4MVr dhtYg4zQq0I/pvwk0/OEXFfMaITkdxiM9DLrsRrJgJU2ToWrQc8+I8Bk7RzRqJMgkw3s tgfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=vU+YcQ0kGCLxb1/QT51ryjVlgHiobYBnhDNa+FVwSgk=; b=TZaNCON83pVxJZs1Tglhguj3Yzet6xO/ePx76GJ50maJBoIAfQeKX0KURjQsdWJAu6 ehMip/xuhkKsQ98DZtL/yL4HWrCW1k1XLrGw2e8NwWmald4aFTihW8shDbvGPfaN/Jio 6yDBsvZl8O/SJDaVORol583027AsIyyC7vMMevaRJ+QAL+qX00svL9rnIPTXXUKqQq53 ddfdH1ecZASEQyzhSRP3dz9b02e7l1Dza2BdTyVhF90Zu13y9kPKWULGjBhc2hmoCBH7 SVMl6llqiYG2TsXl7JGkJw6YOEztoFPMbd54hgYelDgh9d0liC3xkUZ8xXu4qGiJBstK g/Hg== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si1962520pgv.212.2019.03.20.10.04.33; Wed, 20 Mar 2019 10:04:49 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727369AbfCTRD2 (ORCPT + 99 others); Wed, 20 Mar 2019 13:03:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60132 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726802AbfCTRD2 (ORCPT ); Wed, 20 Mar 2019 13:03:28 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA2CE3078AB3; Wed, 20 Mar 2019 17:03:27 +0000 (UTC) Received: from x1.home (ovpn-116-218.phx2.redhat.com [10.3.116.218]) by smtp.corp.redhat.com (Postfix) with ESMTP id 572D660BE2; Wed, 20 Mar 2019 17:03:26 +0000 (UTC) Date: Wed, 20 Mar 2019 11:03:25 -0600 From: Alex Williamson To: Maxim Levitsky Cc: Bart Van Assche , linux-nvme@lists.infradead.org, Fam Zheng , Jens Axboe , Sagi Grimberg , kvm@vger.kernel.org, Wolfram Sang , Greg Kroah-Hartman , Liang Cunming , Nicolas Ferre , linux-kernel@vger.kernel.org, Liu Changpeng , Keith Busch , Kirti Wankhede , Christoph Hellwig , Paolo Bonzini , Mauro Carvalho Chehab , John Ferlan , "Paul E . McKenney" , Amnon Ilan , "David S . Miller" Subject: Re: [PATCH 0/9] RFC: NVME VFIO mediated device Message-ID: <20190320110325.465c1dff@x1.home> In-Reply-To: <8994f43d26ebf6040b9d5d5e3866ee81abcf1a1c.camel@redhat.com> References: <20190319144116.400-1-mlevitsk@redhat.com> <1553095686.65329.36.camel@acm.org> <8994f43d26ebf6040b9d5d5e3866ee81abcf1a1c.camel@redhat.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 20 Mar 2019 17:03:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Mar 2019 18:42:02 +0200 Maxim Levitsky wrote: > On Wed, 2019-03-20 at 08:28 -0700, Bart Van Assche wrote: > > On Tue, 2019-03-19 at 16:41 +0200, Maxim Levitsky wrote: > > > * All guest memory is mapped into the physical nvme device > > > but not 1:1 as vfio-pci would do this. > > > This allows very efficient DMA. > > > To support this, patch 2 adds ability for a mdev device to listen on > > > guest's memory map events. > > > Any such memory is immediately pinned and then DMA mapped. > > > (Support for fabric drivers where this is not possible exits too, > > > in which case the fabric driver will do its own DMA mapping) > > > > Does this mean that all guest memory is pinned all the time? If so, are you > > sure that's acceptable? > I think so. The VFIO pci passthrough also pins all the guest memory. > SPDK also does this (pins and dma maps) all the guest memory. > > I agree that this is not an ideal solution but this is a fastest and simplest > solution possible. FWIW, the pinned memory request up through the vfio iommu driver count against the user's locked memory limits, if that's the concern. Thanks, Alex