Received: by 10.192.165.148 with SMTP id m20csp570082imm; Wed, 25 Apr 2018 04:26:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/+BiV3iYpn+nMyz+j99UYm5+QRTDDCl6Y12hTQQg/166ZNUbYQoiIv8FxZ6JezfLGxj184 X-Received: by 10.99.8.135 with SMTP id 129mr17772118pgi.17.1524655613071; Wed, 25 Apr 2018 04:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524655613; cv=none; d=google.com; s=arc-20160816; b=V4J/Esd7ZX0/F1wpRcks8ujWqzR9dtHPyzl/91BkFGBiWNkmbi1MOquGmpct+Gr3OH lC/xzeYdZh+dyswozN9NXurVWpfRBYmJqzCOg/KmroUVeQLfNwRoh4Wi6NvW7SgD4GlV mh3aL3MBrtUIbsSJYrV5UQ4OmGF/oFNFx04HpHjdfwAc90MBnOuNwS/FVRdRyO4zJA3J 93vkExekSJOunCrOztwGxH9di+L/h46OLtU/KXeg/O1Usy34d3WlXcxMeIw6yMd1SErJ VUMzwMNtEO9Mb0rSF7T4b/N673GnFTX9SpsA0dKd7XVX4FkImIZv9glU2+8Ed4obfMtn Dyig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7vD/GX83tEydLyiPzx0ocSFwAvWNtiwkAolDO2RM4+I=; b=0kQGWt9iyvy7wmRYatY9bHynJHhyJ4oeQfiStHfrFsHEO7kfnuk0oGQKxbxetFMrzT cuBrN/ir+uYt9014lacuW2wJenbxZTDFa0xS9INfAfHgdwPgnFdPjvYSJCGtXu0y7296 Od/dowRVwwMlt8V4eaa0bo/LOgC1XoRTkPxfSO1Ihtnj0vD4xJ5MDxT8s18LyoXrZqDD IGx5VT9FWI82NyAjL0exIVT95cmJSuyOqzoac3Ftuo7e8pkxVDfNVYGsNo0blWQPLLod gXq0nrm6MOgYP7KuUPrLp2jEQww7qFD8W9rPMTf7L2FbmB0xlgsUPCnlPUbZJ1OlPk1g r1hg== 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 u198si8811241pgc.203.2018.04.25.04.26.38; Wed, 25 Apr 2018 04:26:53 -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 S1753601AbeDYLYd (ORCPT + 99 others); Wed, 25 Apr 2018 07:24:33 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36744 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752938AbeDYLY2 (ORCPT ); Wed, 25 Apr 2018 07:24:28 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81010A2C93; Wed, 25 Apr 2018 11:24:27 +0000 (UTC) Received: from dhcp201-121.englab.pnq.redhat.com (dhcp193-127.pnq.redhat.com [10.65.193.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 298DA2023239; Wed, 25 Apr 2018 11:24:16 +0000 (UTC) From: Pankaj Gupta To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, qemu-devel@nongnu.org, linux-nvdimm@ml01.01.org, linux-mm@kvack.org Cc: jack@suse.cz, stefanha@redhat.com, dan.j.williams@intel.com, riel@surriel.com, haozhong.zhang@intel.com, nilal@redhat.com, kwolf@redhat.com, pbonzini@redhat.com, ross.zwisler@intel.com, david@redhat.com, xiaoguangrong.eric@gmail.com, hch@infradead.org, marcel@redhat.com, mst@redhat.com, niteshnarayanlal@hotmail.com, imammedo@redhat.com, pagupta@redhat.com, lcapitulino@redhat.com Subject: [RFC v2 0/2] kvm "fake DAX" device flushing Date: Wed, 25 Apr 2018 16:54:12 +0530 Message-Id: <20180425112415.12327-1-pagupta@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 25 Apr 2018 11:24:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 25 Apr 2018 11:24:27 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'pagupta@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is RFC V2 for 'fake DAX' flushing interface sharing for review. This patchset has two main 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 previous RFC[1]: - 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/region_devs.c | 7 ++ drivers/virtio/Kconfig | 12 +++ drivers/virtio/Makefile | 1 drivers/virtio/virtio_pmem.c | 118 +++++++++++++++++++++++++++++++++++++++ include/linux/libnvdimm.h | 4 + include/uapi/linux/virtio_ids.h | 1 include/uapi/linux/virtio_pmem.h | 58 +++++++++++++++++++ 7 files changed, 201 insertions(+)