aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2018-06-19 15:41:37 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2018-06-28 19:05:33 +0200
commita57d1911222bba79bda543568e925635461ead82 (patch)
tree320b6d880137c4ed35f6c1b820feb145859a6090 /include
parent7943e97b858e64eddf0f3395427e58c5cc00a7d9 (diff)
downloadqemu-a57d1911222bba79bda543568e925635461ead82.zip
qemu-a57d1911222bba79bda543568e925635461ead82.tar.gz
qemu-a57d1911222bba79bda543568e925635461ead82.tar.bz2
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')
-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 cf71247..5679a80 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,