]> xenbits.xensource.com Git - people/aperard/qemu-dm.git/commitdiff
exec/memory: Add symbol for the min value of memory listener priority
authorIsaku Yamahata <isaku.yamahata@intel.com>
Tue, 20 Jun 2023 16:50:49 +0000 (09:50 -0700)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 28 Jun 2023 12:27:59 +0000 (14:27 +0200)
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.yamahata@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <29f88477fe82eb774bcfcae7f65ea21995f865f2.1687279702.git.isaku.yamahata@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
accel/kvm/kvm-all.c
include/exec/memory.h
target/arm/kvm.c

index 9d0837a39c8d87c20abbe3bb17b5977bc78bcb97..373d876c0580aa21278cdbd2d56e29224073a422 100644 (file)
@@ -1105,6 +1105,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)
index 4d789461a2c46350c550f7737b30b1bc222abde8..7f5c11a0cc9e963f63c13a602c0ead8796094f6c 100644 (file)
@@ -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_BACKEND    10
 
index 84da49332c4b7bfa818b61401c64bdebc7677d91..b4c7654f498095798611b87ebfe6277f9788f7d1 100644 (file)
@@ -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)