[PATCH v2] softmmu/physmem: try opening file readonly before failure in file_ram_open

2023-07-26 Thread Thiner Logoer
Users may give "-mem-path" a read only file and expect the file to be mapped read-write privately. Allow this but give a warning since other users may surprise when the ram file is readonly and qemu suddenly aborts elsewhere. Suggested-by: David Hildenbrand Signed-off-by: Thiner Logoer

[PATCH] Open file as read only on private mapping in qemu_ram_alloc_from_file

2023-07-25 Thread Thiner Logoer
, the flag is not used, so it should be OK. from https://gitlab.com/qemu-project/qemu/-/issues/1689 Signed-off-by: Thiner Logoer --- softmmu/physmem.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 3df73542e1..e8036ee335