From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751991AbeDIGmx (ORCPT ); Mon, 9 Apr 2018 02:42:53 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:46200 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750925AbeDIGmv (ORCPT ); Mon, 9 Apr 2018 02:42:51 -0400 Subject: Re: [Qemu-devel] [RFC] qemu: Add virtio pmem device To: Stefan Hajnoczi , Pankaj Gupta Cc: kwolf@redhat.com, haozhong zhang , jack@suse.cz, xiaoguangrong eric , kvm@vger.kernel.org, riel@surriel.com, linux-nvdimm@ml01.01.org, mst@redhat.com, ross zwisler , linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, hch@infradead.org, pbonzini@redhat.com, stefanha@redhat.com, niteshnarayanlal@hotmail.com, marcel@redhat.com, imammedo@redhat.com, dan j williams , nilal@redhat.com References: <20180405104834.10457-1-pagupta@redhat.com> <20180405104834.10457-4-pagupta@redhat.com> <416823501.16310251.1522930166070.JavaMail.zimbra@redhat.com> <20180409032601.GA1648@stefanha-x1.localdomain> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <36218ea8-5fa8-e670-104d-616da790a333@redhat.com> Date: Mon, 9 Apr 2018 08:42:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180409032601.GA1648@stefanha-x1.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.04.2018 05:26, Stefan Hajnoczi wrote: > On Thu, Apr 05, 2018 at 08:09:26AM -0400, Pankaj Gupta wrote: >>> Will this raw file already have the "disk information header" (no idea >>> how that stuff is called) encoded? Are there any plans/possible ways to >>> >>> a) automatically create the headers? (if that's even possible) >> >> Its raw. Right now we are just supporting raw format. >> >> As this is direct mapping of memory into guest address space, I don't >> think we can have an abstraction of headers for block specific features. >> Or may be we can get opinion of others(Qemu block people) it is at all possible? > > memdev and the block layer are completely separate. The block layer > isn't designed for memory-mapped access. > Not questioning if this is the right thing to do now. I was wondering if we could expose any block device in the future as virtio-pmem. And I think with quite some work it could be possible. As you said, we will need some buffering. Maybe userfaultfd and friends (WP) could allow to implement that. > I think it makes sense to use memdev here. If the user wants a block > device, they should use an emulated block device, not virtio-pmem, > because buffering is necessary anyway when an image file format is used. > > Stefan > -- Thanks, David / dhildenb