diff options
author | Xiao Guangrong <guangrong.xiao@linux.intel.com> | 2016-05-20 16:19:59 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-06-07 15:39:28 +0300 |
commit | 9f318f8f7e689b9653b42bac73047f9719a1f34e (patch) | |
tree | 324165d4e5668389bd2721699a7ce3180a8a8f89 /include | |
parent | 3c3e88a814ef4eb8b2f8bf81863baec24838d998 (diff) | |
download | qemu-9f318f8f7e689b9653b42bac73047f9719a1f34e.tar.gz qemu-9f318f8f7e689b9653b42bac73047f9719a1f34e.tar.bz2 qemu-9f318f8f7e689b9653b42bac73047f9719a1f34e.zip |
pc-dimm: introduce realize callback
nvdimm needs to check if the backend memory is large enough to contain
label data and init its memory region when the device is realized, so
introduce realize callback which is called after common dimm has been
realize
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 'include')
-rw-r--r-- | include/hw/mem/pc-dimm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index 6024627167..67e92d8f7b 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -58,6 +58,8 @@ typedef struct PCDIMMDevice { /** * PCDIMMDeviceClass: + * @realize: called after common dimm is realized so that the dimm based + * devices get the chance to do specified operations. * @get_memory_region: returns #MemoryRegion associated with @dimm which * is directly mapped into the physical address space of guest */ @@ -66,6 +68,7 @@ typedef struct PCDIMMDeviceClass { DeviceClass parent_class; /* public */ + void (*realize)(PCDIMMDevice *dimm, Error **errp); MemoryRegion *(*get_memory_region)(PCDIMMDevice *dimm); } PCDIMMDeviceClass; |