From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757541AbcH3G6j (ORCPT ); Tue, 30 Aug 2016 02:58:39 -0400 Received: from mga09.intel.com ([134.134.136.24]:20641 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757315AbcH3G6h (ORCPT ); Tue, 30 Aug 2016 02:58:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,255,1470726000"; d="scan'208";a="1022112404" Subject: Re: DAX can not work on virtual nvdimm device To: Ross Zwisler References: <436d7526-bf06-633d-afce-4333552d9e31@linux.intel.com> <20160819183047.GA7216@linux.intel.com> <600ac51c-0f61-6e53-9bfa-669c85494d1f@linux.intel.com> <20160829193014.GB16738@linux.intel.com> Cc: Dan Williams , Yumei Huang , KVM , "linux-nvdimm@lists.01.org" , "qemu-devel@nongnu.org" , LKML , Linux ACPI , Stefan Hajnoczi From: Xiao Guangrong Message-ID: <61d5c470-a8bf-86d5-d1fe-b4b577a85967@linux.intel.com> Date: Tue, 30 Aug 2016 14:53:10 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160829193014.GB16738@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/30/2016 03:30 AM, Ross Zwisler wrote: > > Can you please verify that you are using "usable" memory for your memmap? All > the details are here: > > https://nvdimm.wiki.kernel.org/how_to_choose_the_correct_memmap_kernel_parameter_for_pmem_on_your_system Sure. This is the BIOS E820 info in the guest: e820: BIOS-provided physical RAM map: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved BIOS-e820: [mem 0x0000000000100000-0x00000000bffdefff] usable BIOS-e820: [mem 0x00000000bffdf000-0x00000000bfffffff] reserved BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved BIOS-e820: [mem 0x0000000100000000-0x000000083fffffff] usable NX (Execute Disable) protection: active e820: user-defined physical RAM map: user: [mem 0x0000000000000000-0x000000000009fbff] usable user: [mem 0x000000000009fc00-0x000000000009ffff] reserved user: [mem 0x00000000000f0000-0x00000000000fffff] reserved user: [mem 0x0000000000100000-0x00000000bffdefff] usable user: [mem 0x00000000bffdf000-0x00000000bfffffff] reserved user: [mem 0x00000000feffc000-0x00000000feffffff] reserved user: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved user: [mem 0x0000000100000000-0x000000027fffffff] usable user: [mem 0x0000000280000000-0x00000003ffffffff] persistent (type 12) user: [mem 0x0000000400000000-0x000000083fffffff] usable So that the memory we used to emulate PMEM split the 'usable' region. > > My guess is that Boaz was correct, and that your memmap is off using addresses > that don't actually map to memory. I do not think so. :( I did mmap-write and mmap-read test, the data written by mmap-write can be correctly read out, so that the backend memory is really existing. Thanks!