From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoElU-0001eo-0Y for qemu-devel@nongnu.org; Mon, 19 Oct 2015 14:02:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoElQ-0002d2-Qo for qemu-devel@nongnu.org; Mon, 19 Oct 2015 14:02:31 -0400 Received: from mga01.intel.com ([192.55.52.88]:33254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoElQ-0002cx-LN for qemu-devel@nongnu.org; Mon, 19 Oct 2015 14:02:28 -0400 References: <1444535584-18220-1-git-send-email-guangrong.xiao@linux.intel.com> <1444535584-18220-23-git-send-email-guangrong.xiao@linux.intel.com> <20151019095612-mutt-send-email-mst@redhat.com> <56249B59.1040103@linux.intel.com> <20151019103754-mutt-send-email-mst@redhat.com> <56249F4D.10709@linux.intel.com> <20151019121707-mutt-send-email-mst@redhat.com> <20151019114635.510b031c@igors-macbook-pro.local> <5624BF6D.8060509@linux.intel.com> <20151019124246.3a65dcea@igors-macbook-pro.local> From: Xiao Guangrong Message-ID: <56252EB4.3080805@linux.intel.com> Date: Tue, 20 Oct 2015 01:56:04 +0800 MIME-Version: 1.0 In-Reply-To: <20151019124246.3a65dcea@igors-macbook-pro.local> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: ehabkost@redhat.com, kvm@vger.kernel.org, "Michael S. Tsirkin" , gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com, dan.j.williams@intel.com, rth@twiddle.net On 10/19/2015 06:42 PM, Igor Mammedov wrote: > On Mon, 19 Oct 2015 18:01:17 +0800 > Xiao Guangrong wrote: > >> >> >> On 10/19/2015 05:46 PM, Igor Mammedov wrote: >>> On Mon, 19 Oct 2015 12:17:22 +0300 >>> "Michael S. Tsirkin" wrote: >>> >>>> On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: >>>>> >>>>> >>>>> On 10/19/2015 03:39 PM, Michael S. Tsirkin wrote: >>>>>> On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao Guangrong wrote: >>>>>>>>> + nvdimm_init_memory_state(&pcms->nvdimm_memory, >>>>>>>>> system_memory, machine, >>>>>>>>> + TARGET_PAGE_SIZE); >>>>>>>>> + >>>>>>>> >>>>>>>> Shouldn't this be conditional on presence of the nvdimm device? >>>>>>>> >>>>>>> >>>>>>> We will enable hotplug on nvdimm devices in the near future once >>>>>>> Linux driver is ready. I'd keep it here for future development. >>>>>> >>>>>> No, I don't think we should add stuff unconditionally. If not >>>>>> nvdimm, some other flag should indicate user intends to hotplug >>>>>> things. >>>>>> >>>>> >>>>> Actually, it is not unconditionally which is called if parameter >>>>> "-m aaa, maxmem=bbb" (aaa < bbb) is used. It is on the some path >>>>> of memoy-hotplug initiation. >>>>> >>>> >>>> Right, but that's not the same as nvdimm. >>>> >>> >>> it could be pc-machine property, then it could be turned on like >>> this: -machine nvdimm_support=on >> >> Er, I do not understand why this separate switch is needed and why >> nvdimm and pc-dimm is different. :( >> >> NVDIMM reuses memory-hotplug's framework, such as maxmem, slot, and >> dimm device, even some of ACPI logic to do hotplug things, etc. Both >> nvdimm and pc-dimm are built on the same infrastructure. > NVDIMM support consumes precious low RAM and MMIO resources and > not small amount at that. So turning it on unconditionally with > memory hotplug even if NVDIMM wouldn't ever be used isn't nice. Okay, understand... will introduce nvdimm_support as your suggestion. Thank you, Igor and Michael!