1
0
mirror of https://gitlab.com/qemu-project/qemu synced 2024-07-08 20:17:27 +00:00
qemu/softmmu
David Hildenbrand 5c52a219bb softmmu/physmem: Distinguish between file access mode and mmap protection
There is a difference between how we open a file and how we mmap it,
and we want to support writable private mappings of readonly files. Let's
define RAM_READONLY and RAM_READONLY_FD flags, to replace the single
"readonly" parameter for file-related functions.

In memory_region_init_ram_from_fd() and memory_region_init_ram_from_file(),
initialize mr->readonly based on the new RAM_READONLY flag.

While at it, add some RAM_* flags we missed to add to the list of accepted
flags in the documentation of some functions.

No change in functionality intended. We'll make use of both flags next
and start setting them independently for memory-backend-file.

Message-ID: <20230906120503.359863-3-david@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
2023-09-19 10:23:21 +02:00
..
arch_init.c softmmu: Add qemu_init_arch_modules() 2022-03-06 13:15:42 +01:00
async-teardown.c util/async-teardown.c: move to softmmu/, only build it when system build is requested 2023-09-01 23:46:20 +02:00
balloon.c qapi: Restrict balloon-related commands to machine code 2020-09-29 15:41:35 +02:00
bootdevice.c machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
cpu-throttle.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
cpu-timers.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
cpus.c accel: Remove HAX accelerator 2023-08-31 19:46:43 +02:00
datadir.c meson: Prefix each element of firmware path 2022-07-13 16:58:57 +02:00
device_tree.c device-tree: add re-randomization helper function 2022-10-27 11:34:31 +01:00
dirtylimit.c softmmu/dirtylimit: Convert free to g_free 2023-08-29 10:19:03 +08:00
dma-helpers.c dma-helpers: prevent dma_blk_cb() vs dma_aio_cancel() race 2023-02-23 19:49:35 +01:00
globals.c accel/tcg: Use one_insn_per_tb global instead of old singlestep global 2023-05-02 15:47:40 +01:00
icount.c accel/tcg: spelling fixes 2023-08-31 19:47:43 +02:00
ioport.c accel/tcg: spelling fixes 2023-08-31 19:47:43 +02:00
main.c ui/cocoa: Run qemu_init in the main thread 2022-09-23 14:36:33 +02:00
memory_mapping.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
memory.c softmmu/physmem: Distinguish between file access mode and mmap protection 2023-09-19 10:23:21 +02:00
meson.build util/async-teardown.c: move to softmmu/, only build it when system build is requested 2023-09-01 23:46:20 +02:00
physmem.c softmmu/physmem: Distinguish between file access mode and mmap protection 2023-09-19 10:23:21 +02:00
qdev-monitor.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
qemu-seccomp.c seccomp: Get actual errno value from failed seccomp functions 2022-10-26 13:32:58 +01:00
qtest.c qtest: irq_intercept_[out/in]: return FAIL if no intercepts are installed 2023-08-22 17:31:01 +01:00
rtc.c rtc: Use time_t for passing and returning time offsets 2023-08-31 09:45:18 +01:00
runstate-action.c runstate: cleanup reboot and panic actions 2021-01-21 13:00:41 +01:00
runstate-hmp-cmds.c hmp: Add 'one-insn-per-tb' command equivalent to 'singlestep' 2023-05-02 15:47:40 +01:00
runstate.c sysemu: Add prepare callback to struct VMChangeStateEntry 2023-09-11 08:34:05 +02:00
timers-state.h qemu/atomic: Add aligned_{int64,uint64}_t types 2021-07-21 07:45:38 -10:00
tpm-hmp-cmds.c tpm: Move HMP commands from monitor/ to softmmu/ 2023-02-04 07:56:54 +01:00
tpm.c qapi: More complex uses of QAPI_LIST_APPEND 2021-01-28 08:08:45 +01:00
trace-events softmmu/dirtylimit: Implement virtual CPU throttle 2022-07-20 12:15:08 +01:00
trace.h softmmu: Add missing trace-events file 2020-09-09 17:15:18 +01:00
vl.c * only build util/async-teardown.c when system build is requested 2023-09-07 10:29:06 -04:00
watchpoint.c softmmu: Restore use of CPU watchpoint for all accelerators 2023-03-28 15:24:06 -07:00