From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1Cfl-0004B6-5y for qemu-devel@nongnu.org; Mon, 31 Oct 2016 09:30:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1Cfg-0003iJ-QR for qemu-devel@nongnu.org; Mon, 31 Oct 2016 09:30:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49722) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1Cfg-0003ht-L9 for qemu-devel@nongnu.org; Mon, 31 Oct 2016 09:30:40 -0400 Date: Mon, 31 Oct 2016 14:30:36 +0100 From: Igor Mammedov Message-ID: <20161031143036.2e70ae73@nial.brq.redhat.com> In-Reply-To: <040a2450-a854-3e97-15b3-621c571debb3@linux.intel.com> References: <1477850917-1214-1-git-send-email-mst@redhat.com> <1477850917-1214-31-git-send-email-mst@redhat.com> <20161031102032.0eb037b3@nial.brq.redhat.com> <6e873b38-715d-c9e5-9750-adaa88a00ba1@linux.intel.com> <20161031115644.71ca634a@nial.brq.redhat.com> <040a2450-a854-3e97-15b3-621c571debb3@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL 30/47] acpi nvdimm: fix device physical address base List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xiao Guangrong Cc: "Michael S. Tsirkin" , qemu-devel@nongnu.org, Peter Maydell On Mon, 31 Oct 2016 19:09:07 +0800 Xiao Guangrong wrote: > On 10/31/2016 06:56 PM, Igor Mammedov wrote: > > On Mon, 31 Oct 2016 17:23:31 +0800 > > Xiao Guangrong wrote: > > =20 > >> On 10/31/2016 05:20 PM, Igor Mammedov wrote: =20 > >>> On Sun, 30 Oct 2016 23:24:46 +0200 > >>> "Michael S. Tsirkin" wrote: > >>> =20 > >>>> From: Xiao Guangrong > >>>> > >>>> According to ACPI 6.0 spec, "Memory Device Physical Address > >>>> Region Base" in memdev is defined as "This field provides the > >>>> Device Physical Address base of the region". This field should > >>>> be zero in our case =20 > >>> I'm not sure that it should be a zero, > >>> care to point source which tells that it should be zero? =20 > >> > >> The spec says that this is the Device Physical Address, so that > >> it is the device internal address, it should be zero as we do not > >> reserve any thing in device internal and we do not have no memory > >> interleave. =20 > > spec says (ACPI 6.1: 5.2.25.3 NVDIMM Region Mapping Structure): > > "NVDIMM Physical Address Region Base": > > "The base physical address within the NVDIMM of the NVDIMM region." > > > > and nothing more than that so it's hard to come to conclusion that > > it's internal address nor it is offset as you treat it here > > (structure has 'Region Offset' for that). =20 >=20 > I think it is clear as the spec says "_within_ the NVDIMM", it is > even more clear than ACPI 6.0 (5.2.25.2 Memory Device to System Physical > Address Range Mapping Structure), in that, it says: > "In bytes. This field provides the Device Physical Address > base of the region." It would be less confusing if spec would say "starting offset of NVDIMM region within the NVDIMM" (at least that's how I read it now after looking at 6.0 and NVDIMM_Namespac= e_Spec.pdf) as "base physical address" is not defined/described in ACPI spec. > In the namespace spec (http://pmem.io/documents/NVDIMM_Namespace_Spec.pdf= ), > the explanation to DPA in page 9: > "DIMM Physical Address: A memory address from a DIMM=E2=80=99s perspe= ctive, > that is, the offset into the DIMM=E2=80=99s memory, starting=09 > with DPA zero > as the lowest addressable byte of the DIMM.