aboutsummaryrefslogtreecommitdiff
path: root/memory.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-02-08 21:05:17 +0200
committerAvi Kivity <avi@redhat.com>2012-02-29 13:44:42 +0200
commit7376e5827a898d8ddf10f929047cc84bf65d9f52 (patch)
treeaf5ade26946ff09d19d950d66af6083c6f2f00d2 /memory.h
parent8df8a8436fa22442a58b366fbb7e471b4a8d88ce (diff)
memory: allow MemoryListeners to observe a specific address space
Ignore any regions not belonging to a specified address space. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'memory.h')
-rw-r--r--memory.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/memory.h b/memory.h
index 1d99cee019..bc9600b402 100644
--- a/memory.h
+++ b/memory.h
@@ -193,6 +193,7 @@ struct MemoryListener {
bool match_data, uint64_t data, int fd);
/* Lower = earlier (during add), later (during del) */
unsigned priority;
+ MemoryRegion *address_space_filter;
QTAILQ_ENTRY(MemoryListener) link;
};
@@ -685,8 +686,9 @@ void memory_region_transaction_commit(void);
* space
*
* @listener: an object containing the callbacks to be called
+ * @filter: if non-%NULL, only regions in this address space will be observed
*/
-void memory_listener_register(MemoryListener *listener);
+void memory_listener_register(MemoryListener *listener, MemoryRegion *filter);
/**
* memory_listener_unregister: undo the effect of memory_listener_register()