aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-07-01 11:55:48 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-07-01 11:55:49 +0100
commitc26f3a0a6dfe5ef2973ddfab03b1ceff641a7ebe (patch)
tree286413832e3d84d7d1cf3fd4d1093f2c48e87f7d /include/exec
parentb3959efdbb2dc3d5959e3b0a8e188126930beca8 (diff)
parent352e8da743f26948cb12d0ee53c455f328f59bbe (diff)
Merge remote-tracking branch 'remotes/bonzini/memory' into staging
* remotes/bonzini/memory: qdev: correctly send DEVICE_DELETED for recursively-deleted devices memory: do not give a name to the internal exec.c regions memory: MemoryRegion: Add size property memory: MemoryRegion: Add may-overlap and priority props memory: MemoryRegion: Add container and addr props memory: MemoryRegion: replace owner field with QOM parent memory: MemoryRegion: QOMify memory: MemoryRegion: use /machine as default owner libqtest: escape strings in QMP commands, fix leak qom: object: Ignore refs/unrefs of NULL qom: object: remove parent pointer when unparenting mc146818rtc: add "rtc-time" link to "/machine/rtc" qom: allow creating an alias of a child<> property qom: add a generic mechanism to resolve paths qom: add object_property_add_alias() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/memory.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 3d778d70f0..e2c8e3e0a6 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -32,10 +32,15 @@
#include "qemu/int128.h"
#include "qemu/notify.h"
#include "qapi/error.h"
+#include "qom/object.h"
#define MAX_PHYS_ADDR_SPACE_BITS 62
#define MAX_PHYS_ADDR (((hwaddr)1 << MAX_PHYS_ADDR_SPACE_BITS) - 1)
+#define TYPE_MEMORY_REGION "qemu:memory-region"
+#define MEMORY_REGION(obj) \
+ OBJECT_CHECK(MemoryRegion, (obj), TYPE_MEMORY_REGION)
+
typedef struct MemoryRegionOps MemoryRegionOps;
typedef struct MemoryRegionMmio MemoryRegionMmio;
@@ -131,11 +136,11 @@ typedef struct CoalescedMemoryRange CoalescedMemoryRange;
typedef struct MemoryRegionIoeventfd MemoryRegionIoeventfd;
struct MemoryRegion {
+ Object parent_obj;
/* All fields are private - violators will be prosecuted */
const MemoryRegionOps *ops;
const MemoryRegionIOMMUOps *iommu_ops;
void *opaque;
- struct Object *owner;
MemoryRegion *container;
Int128 size;
hwaddr addr;
@@ -152,7 +157,7 @@ struct MemoryRegion {
bool flush_coalesced_mmio;
MemoryRegion *alias;
hwaddr alias_offset;
- int priority;
+ int32_t priority;
bool may_overlap;
QTAILQ_HEAD(subregions, MemoryRegion) subregions;
QTAILQ_ENTRY(MemoryRegion) subregions_link;