diff options
author | David Hildenbrand | 2018-10-05 11:20:22 +0200 |
---|---|---|
committer | Eduardo Habkost | 2018-10-24 11:44:59 +0200 |
commit | 55d67a04923488cb27f470b37896dde7a8dc0366 (patch) | |
tree | 7aff2f663697dd174ba4c26561e21c68636e52f9 /hw/mem/pc-dimm.c | |
parent | memory-device: complete factoring out pre_plug handling (diff) | |
download | qemu-55d67a04923488cb27f470b37896dde7a8dc0366.tar.gz qemu-55d67a04923488cb27f470b37896dde7a8dc0366.tar.xz qemu-55d67a04923488cb27f470b37896dde7a8dc0366.zip |
memory-device: complete factoring out plug handling
With the new memory device functions in place, we can factor out
plugging of memory devices completely.
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20181005092024.14344-15-david@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/mem/pc-dimm.c')
-rw-r--r-- | hw/mem/pc-dimm.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index b2959bcf0e..647841bcd4 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -63,17 +63,10 @@ out: void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) { PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm); - MemoryDeviceClass *mdc = MEMORY_DEVICE_GET_CLASS(dimm); MemoryRegion *vmstate_mr = ddc->get_vmstate_memory_region(dimm, &error_abort); - MemoryRegion *mr = mdc->get_memory_region(MEMORY_DEVICE(dimm), - &error_abort); - uint64_t addr; - - addr = object_property_get_uint(OBJECT(dimm), PC_DIMM_ADDR_PROP, - &error_abort); - memory_device_plug_region(machine, mr, addr); + memory_device_plug(MEMORY_DEVICE(dimm), machine); vmstate_register_ram(vmstate_mr, DEVICE(dimm)); } |