aboutsummaryrefslogtreecommitdiff
path: root/hw/mem
diff options
context:
space:
mode:
authorXiao Guangrong <guangrong.xiao@linux.intel.com>2016-05-20 16:19:58 +0800
committerMichael S. Tsirkin <mst@redhat.com>2016-06-07 15:39:28 +0300
commit3c3e88a814ef4eb8b2f8bf81863baec24838d998 (patch)
treeb03d8f590b165dff9fe794309d554ddde2f9ef33 /hw/mem
parent28213cb6a61a724e2cb1e3a76d2bb17aa0ce9b36 (diff)
downloadqemu-3c3e88a814ef4eb8b2f8bf81863baec24838d998.zip
qemu-3c3e88a814ef4eb8b2f8bf81863baec24838d998.tar.gz
qemu-3c3e88a814ef4eb8b2f8bf81863baec24838d998.tar.bz2
pc-dimm: get memory region from ->get_memory_region()
Curretly, the memory region of backed memory is all directly mapped to guest's address space, however, it will be not true for nvdimm device if we introduce nvdimm label which only can be indirectly accessed by ACPI DSM method Also it improves the comments a bit to reflect this fact Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/mem')
-rw-r--r--hw/mem/pc-dimm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 9e7de56..70b9451 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -354,8 +354,9 @@ static void pc_dimm_get_size(Object *obj, Visitor *v, const char *name,
int64_t value;
MemoryRegion *mr;
PCDIMMDevice *dimm = PC_DIMM(obj);
+ PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(obj);
- mr = host_memory_backend_get_memory(dimm->hostmem, errp);
+ mr = ddc->get_memory_region(dimm);
value = memory_region_size(mr);
visit_type_int(v, name, &value, errp);