From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haozhong Zhang Subject: Re: [RFC Design Doc] Add vNVDIMM support for Xen Date: Thu, 25 Feb 2016 00:42:21 +0800 Message-ID: <20160224164221.GD10229@hz-desktop.sh.intel.com> References: <20160201054414.GA25211@hz-desktop.sh.intel.com> <56C60AB102000078000D3D22@prv-mh.provo.novell.com> <20160224132855.GA2627@hz-desktop.sh.intel.com> <56CDB775.4020109@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <56CDB775.4020109@gmail.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: Ross Philipson Cc: Jun Nakajima , Juergen Gross , Kevin Tian , Wei Liu , Ian Campbell , Stefano Stabellini , George Dunlap , Andrew Cooper , Ian Jackson , xen-devel@lists.xen.org, Jan Beulich , Xiao Guangrong , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 02/24/16 09:00, Ross Philipson wrote: [...] > > For each NVDIMM device defined in NFIT, there is a ACPI namespace device > > (e.g. NVD0, NVD1) under the root NVDIMM device (NVDR). Because the > > number of vNVDIMM devices are unknown at build time, we can not > > determine whether and how many NVDIMM ACPI namespace devices should be > > defined in the pre-generated SSDT. > > We have dealt with the exact same issue in the past (though it concerned > WMI ACPI devices). The layout and number of these devices and their > methods was very platform dependent as this seems to be. Thus we > generated an SSDT at runtime to reflect the underlying platform. At that > time we had to write an AML generator but as noted earlier, SeaBIOS now > seems to have a fairly complete one. This would allow you to do create > the proper number of NVDx devices and set the desired addresses at runtime. > Thanks for the information. I just did a quick grep on SeaBIOS code and found some AML related code in scripts/acpi_extract.py. Is this the AML generator you mean? > If you have to do it statically at build time you will have to pick a > max number of possible NVDx devices and make some of them report they > are not there (e.g. w/ the _STA methods possibly). In this case you > could extend ACPI_INFO_PHYSICAL_ADDRESS or create your own IO/Memory > OpRegion that you handle at runtime. I would personally go for the first > option. > _STA does not work, because the individual NVDIMM ACPI namespace device (NVDx) does no provide _STA method. In addition, ACPI spec does not define any mechanism to check the presence of an individual NVDx. Haozhong