Add MEMORY_LISTNER_PRIORITY_MIN for the symbolic value for the min value of the memory listener instead of the hard-coded magic value 0. Add explicit initialization.
No functional change intended. Signed-off-by: Isaku Yamahata <isaku.yamah...@intel.com> --- accel/kvm/kvm-all.c | 1 + include/exec/memory.h | 1 + target/arm/kvm.c | 1 + 3 files changed, 3 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index ae6ecf8326d1..026859a59cd7 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -1103,6 +1103,7 @@ static MemoryListener kvm_coalesced_pio_listener = { .name = "kvm-coalesced-pio", .coalesced_io_add = kvm_coalesce_pio_add, .coalesced_io_del = kvm_coalesce_pio_del, + .priority = MEMORY_LISTENER_PRIORITY_MIN, }; int kvm_check_extension(KVMState *s, unsigned int extension) diff --git a/include/exec/memory.h b/include/exec/memory.h index 5c9e04bf1208..dc6daa8364e5 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -811,6 +811,7 @@ struct IOMMUMemoryRegion { #define IOMMU_NOTIFIER_FOREACH(n, mr) \ QLIST_FOREACH((n), &(mr)->iommu_notify, node) +#define MEMORY_LISTENER_PRIORITY_MIN 0 #define MEMORY_LISTENER_PRIORITY_ACCEL 10 #define MEMORY_LISTENER_PRIORITY_DEV_BAKCNED 10 diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 84da49332c4b..14fbf786897d 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -341,6 +341,7 @@ static MemoryListener devlistener = { .name = "kvm-arm", .region_add = kvm_arm_devlistener_add, .region_del = kvm_arm_devlistener_del, + .priority =MEMORY_LISTENER_PRIORITY_MIN, }; static void kvm_arm_set_device_addr(KVMDevice *kd) -- 2.25.1