summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2021-08-16 21:35:52 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2021-09-30 15:30:24 +0200
commit142518bda515c132a46ce5826e73fbd2a5b154d9 (patch)
treeabc85b88e464cd7c8b380158daf229dbba00061e /include
parent523a3d9524d5edd49dbec50c634b6e3872ad7d84 (diff)
downloadqemu-142518bda515c132a46ce5826e73fbd2a5b154d9.zip
memory: Name all the memory listeners
Provide a name field for all the memory listeners. It can be used to identify which memory listener is which. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20210817013553.30584-2-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/exec/memory.h8
-rw-r--r--include/sysemu/kvm_int.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 9446874d21..a185b6dcb8 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -982,6 +982,14 @@ struct MemoryListener {
*/
unsigned priority;
+ /**
+ * @name:
+ *
+ * Name of the listener. It can be used in contexts where we'd like to
+ * identify one memory listener with the rest.
+ */
+ const char *name;
+
/* private: */
AddressSpace *address_space;
QTAILQ_ENTRY(MemoryListener) link;
diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h
index c788452cd9..1f5487d9b7 100644
--- a/include/sysemu/kvm_int.h
+++ b/include/sysemu/kvm_int.h
@@ -37,7 +37,7 @@ typedef struct KVMMemoryListener {
} KVMMemoryListener;
void kvm_memory_listener_register(KVMState *s, KVMMemoryListener *kml,
- AddressSpace *as, int as_id);
+ AddressSpace *as, int as_id, const char *name);
void kvm_set_max_memslot_size(hwaddr max_slot_size);