mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
pc-dimm: get_memory_region() will not fail after realize
Let's try to reduce error handling a bit. In the plug/unplug case, the device was realized and therefore we can assume that getting access to the memory region will not fail. For get_vmstate_memory_region() this is already handled that way. Document both cases. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180619134141.29478-13-david@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
a4659a8ef4
commit
f0b7bca64d
4 changed files with 8 additions and 24 deletions
|
@ -62,9 +62,11 @@ typedef struct PCDIMMDevice {
|
|||
* @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.
|
||||
* is directly mapped into the physical address space of guest. Will not
|
||||
* fail after the device was realized.
|
||||
* @get_vmstate_memory_region: returns #MemoryRegion which indicates the
|
||||
* memory of @dimm should be kept during live migration.
|
||||
* memory of @dimm should be kept during live migration. Will not fail
|
||||
* after the device was realized.
|
||||
*/
|
||||
typedef struct PCDIMMDeviceClass {
|
||||
/* private */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue