From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Philipson Subject: Re: [RFC Design Doc] Add vNVDIMM support for Xen Date: Wed, 24 Feb 2016 12:50:33 -0500 Message-ID: <56CDED69.8010104@gmail.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> <20160224164221.GD10229@hz-desktop.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160224164221.GD10229@hz-desktop.sh.intel.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 , Andrew Cooper , Ian Campbell , Wei Liu , George Dunlap , Ian Jackson , Stefano Stabellini , Jun Nakajima , Kevin Tian , Xiao Guangrong , xen-devel@lists.xen.org, Konrad Rzeszutek Wilk , Juergen Gross , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 02/24/2016 11:42 AM, Haozhong Zhang wrote: > 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? Oh terribly sorry - I am talking about QEMU. The code in hw/acpi/aml-build.c looks like it does a lot of what my library does. I don't know how complete it is. For example I had to do a lot of work to build resource packages and I have not found that yet. But it is a good starting place. > >> 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 > -- Ross Philipson