On 17.08.21 03:35, Peter Xu wrote:
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 <[email protected]>
---
  accel/hvf/hvf-accel-ops.c         | 1 +
  accel/kvm/kvm-all.c               | 7 +++++--
  hw/i386/xen/xen-hvm.c             | 2 ++
  hw/intc/openpic_kvm.c             | 1 +
  hw/remote/proxy-memory-listener.c | 1 +
  hw/vfio/common.c                  | 1 +
  hw/vfio/spapr.c                   | 1 +
  hw/virtio/vhost-vdpa.c            | 1 +
  hw/virtio/vhost.c                 | 2 ++
  hw/virtio/virtio.c                | 1 +
  hw/xen/xen_pt.c                   | 2 ++
  include/exec/memory.h             | 8 ++++++++
  include/sysemu/kvm_int.h          | 2 +-
  softmmu/physmem.c                 | 1 +
  target/arm/kvm.c                  | 1 +
  target/i386/hax/hax-mem.c         | 1 +
  target/i386/kvm/kvm.c             | 2 +-
  target/i386/nvmm/nvmm-all.c       | 1 +
  target/i386/whpx/whpx-all.c       | 1 +
  19 files changed, 33 insertions(+), 4 deletions(-)



[...]

  static const MemoryListener xen_pt_io_listener = {
+    .name = "xen-pt-io",
      .region_add = xen_pt_io_region_add,
      .region_del = xen_pt_io_region_del,
      .priority = 10,
diff --git a/include/exec/memory.h b/include/exec/memory.h
index c3d417d317..ac79fee250 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -979,6 +979,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. > +     */

Not a native speaker, maybe simply "Name of the listener, primarily useful for debugging. Names can change in the future and are not fixed."

Apart from that LGTM

Reviewed-by: David Hildenbrand <[email protected]>

--
Thanks,

David / dhildenb


Reply via email to