Priorities can be negative, fix this limitation.

Fixes: d33382da9ab ("memory: MemoryRegion: Add may-overlap and priority props")
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
---
 softmmu/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/softmmu/memory.c b/softmmu/memory.c
index d4493ef9e43..4fbeee02dc7 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -1257,7 +1257,7 @@ static void memory_region_initfn(Object *obj)
 
     object_property_add_uint64_ptr(OBJECT(mr), "addr",
                                    &mr->addr, OBJ_PROP_FLAG_READ);
-    object_property_add(OBJECT(mr), "priority", "uint32",
+    object_property_add(OBJECT(mr), "priority", "int32",
                         memory_region_get_priority,
                         NULL, /* memory_region_set_priority */
                         NULL, NULL);
-- 
2.26.2


Reply via email to