qemu-patch-raspberry4/hw/mem
David Hildenbrand a4659a8ef4 nvdimm: make get_memory_region() perform checks and initialization
We might get a call to get_memory_region() before the device has been
realized. We should return a consistent value, as the return value
will e.g. later on be used in the pre_plug handler.

To avoid duplicating too much code, factor the initialization and checks
out into a helper function.

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-12-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-06-28 19:05:34 +02:00
..
Makefile.objs pc-dimm: factor out MemoryDevice interface 2018-05-07 10:00:02 -03:00
memory-device.c memory-device: turn alignment assert into check 2018-06-28 19:05:31 +02:00
nvdimm.c nvdimm: make get_memory_region() perform checks and initialization 2018-06-28 19:05:34 +02:00
pc-dimm.c pc-dimm: merge get_(vmstate_)memory_region() 2018-06-28 19:05:33 +02:00
trace-events docs: fix broken paths to docs/devel/tracing.txt 2017-07-31 13:12:53 +03:00