From: Haozhong Zhang Subject: Re: [PATCH 4/4] hvmloader: add support to load extra ACPI tables from qemu Date: Thu, 21 Jan 2016 22:01:03 +0800 Message-ID: <20160121140103.GB6362@hz-desktop.sh.intel.com> References: <20160120110449.GD4939@hz-desktop.sh.intel.com> <569F7B8302000078000C8FF8@prv-mh.provo.novell.com> <569FA7F3.8080506@linux.intel.com> <569FCCED02000078000C94BA@prv-mh.provo.novell.com> <569FC112.9060309@linux.intel.com> <56A0A25002000078000C971B@prv-mh.provo.novell.com> <56A095E3.5060507@linux.intel.com> <56A0AA8A02000078000C977D@prv-mh.provo.novell.com> <56A0A09A.2050101@linux.intel.com> <56A0C02A02000078000C9823@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <56A0C02A02000078000C9823@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Kevin Tian , Xiao Guangrong , Ian Campbell , Stefano Stabellini , Andrew Cooper , Ian Jackson , xen-devel@lists.xen.org, Jun Nakajima , Wei Liu , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 01/21/16 03:25, Jan Beulich wrote: > >>> On 21.01.16 at 10:10, wrote: > > On 01/21/2016 04:53 PM, Jan Beulich wrote: > >>>>> On 21.01.16 at 09:25, wrote: > >>> On 01/21/2016 04:18 PM, Jan Beulich wrote: > >>>> Yes. But then - other than you said above - it still looks to me as > >>>> if the split between PMEM and PBLK is arranged for by firmware? > >>> > >>> Yes. But OS/Hypervisor is not excepted to dynamically change its configure > >>> (re-split), > >>> i,e, for PoV of OS/Hypervisor, it is static. > >> > >> Exactly, that has been my understanding. And hence the PMEM part > >> could be under the hypervisor's control, while the PBLK part could be > >> Dom0's responsibility. > >> > > > > I am not sure if i have understood your point. What your suggestion is that > > leave PMEM for hypervisor and all other parts (PBLK and _DSM handling) to > > Dom0? If yes, we should: > > a) handle hotplug in hypervisor (new PMEM add/remove) that causes hyperivsor > > interpret ACPI SSDT/DSDT. > > Why would this be different from ordinary memory hotplug, where > Dom0 deals with the ACPI CA interaction, notifying Xen about the > added memory? > The process of NVDIMM hotplug is similar to the ordinary memory hotplug, and seemingly possible to support it in Xen hypervisor like ordinary memory hotplug. > > b) some _DSMs control PMEM so you should filter out these kind of _DSMs and > > handle them in hypervisor. > > Not if (see above) following the model we currently have in place. > You mean let dom0 linux evaluates those _DSMs and interact with hypervisor if necessary (e.g. XENPF_mem_hotadd for memory hotplug)? > > c) hypervisor should mange PMEM resource pool and partition it to multiple > > VMs. > > Yes. > But I Still do not quite understand this part: why must pmem resource management and partition be done in hypervisor? I mean if we allow the following steps of operations (for example) (1) partition pmem in dom 0 (2) get address and size of each partition (part_addr, part_size) (3) call a hypercall like nvdimm_memory_mapping(d, part_addr, part_size, gpfn) to map a partition to the address gpfn in dom d. Only the last step requires hypervisor. Would anything be wrong if we allow above operations? Ha