From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c18lk-0007XD-9f for qemu-devel@nongnu.org; Mon, 31 Oct 2016 05:20:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c18lh-0001B1-7A for qemu-devel@nongnu.org; Mon, 31 Oct 2016 05:20:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43484) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c18lh-0001AV-1S for qemu-devel@nongnu.org; Mon, 31 Oct 2016 05:20:37 -0400 Date: Mon, 31 Oct 2016 10:20:32 +0100 From: Igor Mammedov Message-ID: <20161031102032.0eb037b3@nial.brq.redhat.com> In-Reply-To: <1477850917-1214-31-git-send-email-mst@redhat.com> References: <1477850917-1214-1-git-send-email-mst@redhat.com> <1477850917-1214-31-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, Peter Maydell , Xiao Guangrong On Sun, 30 Oct 2016 23:24:46 +0200 "Michael S. Tsirkin" wrote: > 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 I'm not sure that it should be a zero, care to point source which tells that it should be zero? > Signed-off-by: Xiao Guangrong > Reviewed-by: Michael S. Tsirkin > Signed-off-by: Michael S. Tsirkin > --- > hw/acpi/nvdimm.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c > index bbb2cfd..c2f5caa 100644 > --- a/hw/acpi/nvdimm.c > +++ b/hw/acpi/nvdimm.c > @@ -289,8 +289,6 @@ static void > nvdimm_build_structure_memdev(GArray *structures, DeviceState *dev) > { > NvdimmNfitMemDev *nfit_memdev; > - uint64_t addr = object_property_get_int(OBJECT(dev), PC_DIMM_ADDR_PROP, > - NULL); > uint64_t size = object_property_get_int(OBJECT(dev), PC_DIMM_SIZE_PROP, > NULL); > int slot = object_property_get_int(OBJECT(dev), PC_DIMM_SLOT_PROP, > @@ -314,7 +312,8 @@ nvdimm_build_structure_memdev(GArray *structures, DeviceState *dev) > > /* The memory region on the device. */ > nfit_memdev->region_len = cpu_to_le64(size); > - nfit_memdev->region_dpa = cpu_to_le64(addr); > + /* The device address starts from 0. */ > + nfit_memdev->region_dpa = cpu_to_le64(0); > > /* Only one interleave for PMEM. */ > nfit_memdev->interleave_ways = cpu_to_le16(1);