Skip to contentSkip to conversation

remote/memory: Replace share parameter with ram_flags

PATCH Superseded Yang Zhong 3 participants 4 messages Jul 8, 2021

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Yang Zhong

author
#0 lore raw

PATCH 1/1 remote/memory: Replace share parameter with ram_flags

The commit(d5015b80) missed the ram_flags to memory_region_init_ram_from_fd() in the hw/remote/memory.c.

---
 hw/remote/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/remote/memory.c +1 -1
index 472ed2a272..6e21ab1a45 100644
@@ -46,7 +46,7 @@ void remote_sysmem_reconfig(MPQemuMsg *msg, Error **errp)
         subregion = g_new(MemoryRegion, 1);
         memory_region_init_ram_from_fd(subregion, NULL,
                                        name, sysmem_info->sizes[region],
-                                       true, msg->fds[region],
+                                       RAM_SHARED, msg->fds[region],
                                        sysmem_info->offsets[region],
                                        errp);
 
Signature · 1 line
2.29.2.334.gfaefdd61ec
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Yang Zhong

The commit(d5015b80) missed the ram_flags to memory_region_init_ram_from_fd() in the hw/remote/memory.c.

Yes, seems like that call was added just after I crafted my patches:

Fixes d5015b801340 ("softmmu/memory: Pass ram_flags to qemu_ram_alloc_from_fd()")

Thanks!

Quoted 20 lines
---
  hw/remote/memory.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/remote/memory.c +1 -1
index 472ed2a272..6e21ab1a45 100644
@@ -46,7 +46,7 @@ void remote_sysmem_reconfig(MPQemuMsg *msg, Error **errp)
          subregion = g_new(MemoryRegion, 1);
          memory_region_init_ram_from_fd(subregion, NULL,
                                         name, sysmem_info->sizes[region],
-                                       true, msg->fds[region],
+                                       RAM_SHARED, msg->fds[region],
                                         sysmem_info->offsets[region],
                                         errp);
 
Signature · 3 lines
Thanks,

David / dhildenb
author
#2 lore raw
Quoted 10 lines · David Hildenbrand
Quoted 2 lines · Yang Zhong

The commit(d5015b80) missed the ram_flags to memory_region_init_ram_from_fd() in the hw/remote/memory.c.

Yes, seems like that call was added just after I crafted my patches:

Fixes d5015b801340 ("softmmu/memory: Pass ram_flags to

qemu_ram_alloc_from_fd()")

Thanks David, if there is not any other comments, i will send the new version according to your commit info. thanks!

Yang

Quoted 27 lines

Thanks!

Quoted 19 lines
---
 hw/remote/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/remote/memory.c +1 -1
index 472ed2a272..6e21ab1a45 100644
@@ -46,7 +46,7 @@ void remote_sysmem_reconfig(MPQemuMsg *msg, Error **errp)
         subregion = g_new(MemoryRegion, 1);
         memory_region_init_ram_from_fd(subregion, NULL,
                                        name, sysmem_info->sizes[region],
-                                       true, msg->fds[region],
+                                       RAM_SHARED, msg->fds[region],
                                        sysmem_info->offsets[region],
                                        errp);
 
Signature · 3 lines
Thanks,

David / dhildenb