Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp7048477imm; Tue, 28 Aug 2018 05:41:37 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbror//hfBvPJWEnXJuTSgCrhpolVjtSzwi+RPY8RdFQ8uieYw6ZARD0R9zfieVYVfwfeiH X-Received: by 2002:a63:549:: with SMTP id 70-v6mr1409246pgf.385.1535460096958; Tue, 28 Aug 2018 05:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535460096; cv=none; d=google.com; s=arc-20160816; b=TH9xC9ssyntXk9cHegBttqrd07mFX1/2wl9r/GtFcmubJnd+uD3+SHaj24zvPbLA4x guEbamRLVg1VYuQfaEVz2pAWbW5mci7+cuwsUzOzycHqxz9L/w0ZbO+dsA6+dZnEggc8 jhY/r+Dhkg+c3WzBZWS95v+spPC+c4cWmYSziYl4c5NOm3gkP44JMt4Tn9dXpjqCWqfr T5Td+39NXrcRf+ql/yil9ynWLH6AMf0XjZXUzCE8QIUP8+KbwN61SBVl6oMaaJTlbr3t tAzzebbxCTi6rhl+Bw0pPRnXU3NJqmH8jcUoBBvSraOtAi5fvhEav+4ez9sHHovtR4Q7 URTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:arc-authentication-results; bh=m9HbzXignyMn97S3SHshjFwTuyuTVmvfdJorDSBRo9M=; b=HcTA5eI9UwN1taWJDs5OSy1J3RPeKDimajWd7Q0Dhnqk6ZCHLd6xXAatDUY2V7mxDJ z0AgSQ6RdWBU0ulroTD+gLzpjZZeLRB5frVYeBypO36Aat5sCpcGWmub+nxAT+r1MOIB Auak3+phUPQTxYoU1XhbU3RFLdNb01kTEp7Jug2zzVbHQOG3XWPeyfIUPUnx48XuCQlo lpyKI2nTWSHYt1uUIrTJbw/9pjvLJzOeJ3BOTG44DY2rtTZTynCJttrCCboy3Yo6YDEJ /ez2aOaiE9oQt3ZIAFYi/GxmtdcFU0Lf1O3K32ag+WZRqvk9CXz06gIPx3IrgUXOq39i CQPA== 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 k38-v6si859387pgm.335.2018.08.28.05.41.21; Tue, 28 Aug 2018 05:41:36 -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 S1727716AbeH1QbW (ORCPT + 99 others); Tue, 28 Aug 2018 12:31:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45160 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbeH1QbW (ORCPT ); Tue, 28 Aug 2018 12:31:22 -0400 Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6966286670; Tue, 28 Aug 2018 12:39:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 43CF9862C0; Tue, 28 Aug 2018 12:39:54 +0000 (UTC) Received: from zmail21.collab.prod.int.phx2.redhat.com (zmail21.collab.prod.int.phx2.redhat.com [10.5.83.24]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D7A254BB74; Tue, 28 Aug 2018 12:39:53 +0000 (UTC) Date: Tue, 28 Aug 2018 08:39:53 -0400 (EDT) From: Pankaj Gupta To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, qemu-devel@nongnu.org, linux-nvdimm@ml01.01.org, kwolf@redhat.com, haozhong zhang , jack@suse.cz, xiaoguangrong eric , riel@surriel.com, niteshnarayanlal@hotmail.com, mst@redhat.com, ross zwisler , lcapitulino@redhat.com, hch@infradead.org, stefanha@redhat.com, imammedo@redhat.com, pbonzini@redhat.com, dan j williams , nilal@redhat.com Message-ID: <16583366.7193885.1535459993521.JavaMail.zimbra@redhat.com> In-Reply-To: <1328e543-0276-8f33-1744-8baa053023c4@redhat.com> References: <20180713075232.9575-1-pagupta@redhat.com> <1328e543-0276-8f33-1744-8baa053023c4@redhat.com> Subject: Re: [Qemu-devel] [RFC v3 0/2] kvm "fake DAX" device flushing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.116.113, 10.4.195.30] Thread-Topic: kvm "fake DAX" device flushing Thread-Index: UtTP1YtN/57qbZTwbS5MJbaMnAE9XQ== X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 28 Aug 2018 12:39:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, > > for review. This patchset has two parts: > > > > - Guest virtio-pmem driver > > Guest driver reads persistent memory range from paravirt device > > and registers with 'nvdimm_bus'. 'nvdimm/pmem' driver uses this > > information to allocate persistent memory range. Also, we have > > implemented guest side of VIRTIO flushing interface. > > > > - Qemu virtio-pmem device > > It exposes a persistent memory range to KVM guest which at host > > side is file backed memory and works as persistent memory device. > > In addition to this it provides virtio device handling of flushing > > interface. KVM guest performs Qemu side asynchronous sync using > > this interface. > > > > Changes from RFC v2: > > - Add flush function in the nd_region in place of switching > > on a flag - Dan & Stefan > > - Add flush completion function with proper locking and wait > > for host side flush completion - Stefan & Dan > > - Keep userspace API in uapi header file - Stefan, MST > > - Use LE fields & New device id - MST > > - Indentation & spacing suggestions - MST & Eric > > - Remove extra header files & add licensing - Stefan > > > > Changes from RFC v1: > > - Reuse existing 'pmem' code for registering persistent > > memory and other operations instead of creating an entirely > > new block driver. > > - Use VIRTIO driver to register memory information with > > nvdimm_bus and create region_type accordingly. > > - Call VIRTIO flush from existing pmem driver. > > > > Details of project idea for 'fake DAX' flushing interface is > > shared [2] & [3]. > > > > Pankaj Gupta (2): > > Add virtio-pmem guest driver > > pmem: device flush over VIRTIO > > > > [1] https://marc.info/?l=linux-mm&m=150782346802290&w=2 > > [2] https://www.spinics.net/lists/kvm/msg149761.html > > [3] https://www.spinics.net/lists/kvm/msg153095.html > > > > drivers/nvdimm/nd.h | 1 > > drivers/nvdimm/pmem.c | 4 > > drivers/nvdimm/region_devs.c | 24 +++- > > drivers/virtio/Kconfig | 9 + > > drivers/virtio/Makefile | 1 > > drivers/virtio/virtio_pmem.c | 190 > > +++++++++++++++++++++++++++++++++++++++ > > include/linux/libnvdimm.h | 5 - > > include/linux/virtio_pmem.h | 44 +++++++++ > > include/uapi/linux/virtio_ids.h | 1 > > include/uapi/linux/virtio_pmem.h | 40 ++++++++ > > 10 files changed, 310 insertions(+), 9 deletions(-) > > > > Hi Pankaj, > > do you have a branch for the QEMU part somewhere available? I want to > see how this works with MemoryDevice changes. o.k I will update the guest virtio-pmem and Qemu current changes and share with you. BTW previous version is here: https://marc.info/?l=kvm&m=153146839627143&w=2 Thanks, Pankaj > > -- > > Thanks, > > David / dhildenb > >