summaryrefslogtreecommitdiffstats
path: root/include/hw/mem
diff options
context:
space:
mode:
authorDavid Hildenbrand2018-06-19 15:41:37 +0200
committerPaolo Bonzini2018-06-28 19:05:33 +0200
commita57d1911222bba79bda543568e925635461ead82 (patch)
tree320b6d880137c4ed35f6c1b820feb145859a6090 /include/hw/mem
parenthostmem: drop error variable from host_memory_backend_get_memory() (diff)
downloadqemu-a57d1911222bba79bda543568e925635461ead82.tar.gz
qemu-a57d1911222bba79bda543568e925635461ead82.tar.xz
qemu-a57d1911222bba79bda543568e925635461ead82.zip
pc-dimm: merge get_(vmstate_)memory_region()
Importantly, get_vmstate_memory_region() should also fail with a proper error if called before the device is realized. For a PCDIMM, both functions are to return the same thing, so share the implementation. All current users are called after the device has been realized, so we can expect the calls to succeed. Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-9-david@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/mem')
-rw-r--r--include/hw/mem/pc-dimm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
index cf71247630..5679a80465 100644
--- a/include/hw/mem/pc-dimm.h
+++ b/include/hw/mem/pc-dimm.h
@@ -73,7 +73,8 @@ typedef struct PCDIMMDeviceClass {
/* public */
void (*realize)(PCDIMMDevice *dimm, Error **errp);
MemoryRegion *(*get_memory_region)(PCDIMMDevice *dimm, Error **errp);
- MemoryRegion *(*get_vmstate_memory_region)(PCDIMMDevice *dimm);
+ MemoryRegion *(*get_vmstate_memory_region)(PCDIMMDevice *dimm,
+ Error **errp);
} PCDIMMDeviceClass;
void pc_dimm_plug(DeviceState *dev, MachineState *machine, uint64_t align,