Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5936938ybi; Wed, 12 Jun 2019 11:01:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWWf4HGQgkUJ8T2jTErv9lY225y385bUdk3+WieF+GZ7tkT8lv6UGu2nMenyUmoHS2GPWf X-Received: by 2002:a63:610d:: with SMTP id v13mr25889550pgb.341.1560362492431; Wed, 12 Jun 2019 11:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362492; cv=none; d=google.com; s=arc-20160816; b=VKkhU3oZgfbzaIJCGxF6iYcBrwYZkKw+j3zcbwZOEsVtWjsmpBnZ/+KvEz3oIz8D42 e/a9HPdOFe7UFDL4i1C2i+gadCRSyngZt5TsFNM4x5MaTrMpwL7dsGBxZmZrKSliWLld iEcVRpPY7YcKZD8mot2JhvJsHsYSIoJeTSHVwaByFEsL9WrSy8vrY8fMtPJB7IIHJGIg zDydHFyZnNO+hGbhgTlwzm5q+siMma00Hhc5pv6qeVTqjMTldqocaJ3KhBTDL8a67y0R 07/7nWHWWnk+CYDMVjivp1X7sYwqx4atrUriQFk3H4qb6CY9vybq5JyIRuVYx+yf4bCJ hICg== 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=mwdwXJ2BxSwmW05V/t6mTRWS7HhHxAv54xsC/qVzTSY=; b=CkesWBmbFebrMQ6JZLfFvnLafKANy2pUsmvS0tyoDVr8qlQ+NX5yS+etkl5o5ndl/U PMtZZGHlG4ggfAeJT+J1udAgg78d4MZOO7yvH4pg3vgtxir/QQ7VmgvQt/Mcq/iEHXqH cXPdaG3uRZBUhsqAV8c98GRb3Fj1zENoLBl0uJSoThz+0Rmy5rubZ2CO58GXN9ocWzHi NcyTrWVa6jL6XR16d3EReqgNOflXAybFwL0cNPSrScdp5uPUcbGbsNK6vn3M/0IcHOkd sZaI4nzixSd9BYwUrUDHDgfzGVfxbE5kD2hozJbY04x7jaj76sUBFvlTiuQnAZgYU07B ZpZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 r11si298345plo.360.2019.06.12.11.01.18; Wed, 12 Jun 2019 11:01:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 S2405539AbfFLOVF (ORCPT + 99 others); Wed, 12 Jun 2019 10:21:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35482 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726921AbfFLOVE (ORCPT ); Wed, 12 Jun 2019 10:21:04 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1648030C3195; Wed, 12 Jun 2019 14:20:56 +0000 (UTC) Received: from gondolin (ovpn-116-169.ams2.redhat.com [10.36.116.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id D885A79581; Wed, 12 Jun 2019 14:20:14 +0000 (UTC) Date: Wed, 12 Jun 2019 16:20:12 +0200 From: Cornelia Huck To: Pankaj Gupta Cc: dm-devel@redhat.com, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-acpi@vger.kernel.org, qemu-devel@nongnu.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, dan.j.williams@intel.com, zwisler@kernel.org, vishal.l.verma@intel.com, dave.jiang@intel.com, mst@redhat.com, jasowang@redhat.com, willy@infradead.org, rjw@rjwysocki.net, hch@infradead.org, lenb@kernel.org, jack@suse.cz, tytso@mit.edu, adilger.kernel@dilger.ca, darrick.wong@oracle.com, lcapitulino@redhat.com, kwolf@redhat.com, imammedo@redhat.com, jmoyer@redhat.com, nilal@redhat.com, riel@surriel.com, stefanha@redhat.com, aarcange@redhat.com, david@redhat.com, david@fromorbit.com, xiaoguangrong.eric@gmail.com, pbonzini@redhat.com, yuval.shaia@oracle.com, kilobyte@angband.pl, jstaron@google.com, rdunlap@infradead.org, snitzer@redhat.com Subject: Re: [PATCH v13 2/7] virtio-pmem: Add virtio pmem driver Message-ID: <20190612162012.06b4af7f.cohuck@redhat.com> In-Reply-To: <20190612124527.3763-3-pagupta@redhat.com> References: <20190612124527.3763-1-pagupta@redhat.com> <20190612124527.3763-3-pagupta@redhat.com> Organization: Red Hat GmbH 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 12 Jun 2019 14:21:04 +0000 (UTC) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, 12 Jun 2019 18:15:22 +0530 Pankaj Gupta wrote: > This patch adds virtio-pmem driver for KVM guest. > > Guest reads the persistent memory range information from > Qemu over VIRTIO and registers it on nvdimm_bus. It also > creates a nd_region object with the persistent memory > range information so that existing 'nvdimm/pmem' driver > can reserve this into system memory map. This way > 'virtio-pmem' driver uses existing functionality of pmem > driver to register persistent memory compatible for DAX > capable filesystems. > > This also provides function to perform guest flush over > VIRTIO from 'pmem' driver when userspace performs flush > on DAX memory range. > > Signed-off-by: Pankaj Gupta > Reviewed-by: Yuval Shaia > Acked-by: Michael S. Tsirkin > Acked-by: Jakub Staron > Tested-by: Jakub Staron > --- > drivers/nvdimm/Makefile | 1 + > drivers/nvdimm/nd_virtio.c | 125 +++++++++++++++++++++++++++++++ > drivers/nvdimm/virtio_pmem.c | 122 ++++++++++++++++++++++++++++++ > drivers/nvdimm/virtio_pmem.h | 55 ++++++++++++++ > drivers/virtio/Kconfig | 11 +++ > include/uapi/linux/virtio_ids.h | 1 + > include/uapi/linux/virtio_pmem.h | 35 +++++++++ > 7 files changed, 350 insertions(+) > create mode 100644 drivers/nvdimm/nd_virtio.c > create mode 100644 drivers/nvdimm/virtio_pmem.c > create mode 100644 drivers/nvdimm/virtio_pmem.h > create mode 100644 include/uapi/linux/virtio_pmem.h Reviewed-by: Cornelia Huck