qemu-patch-raspberry4/util
Zhang Yi 119906afa5 util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()
When a file supporting DAX is used as vNVDIMM backend, mmap it with
MAP_SYNC flag in addition which can ensure file system metadata
synced in each guest writes to the backend file, without other QEMU
actions (e.g., periodic fsync() by QEMU).

Current, We have below different possible use cases:

1. pmem=on is set, shared=on is set, MAP_SYNC supported:
   a: backend is a dax supporting file.
    - MAP_SYNC will active.
   b: backend is not a dax supporting file.
    - mmap will trigger a warning. then MAP_SYNC flag will be ignored

2. The rest of cases:
   - we will never pass the MAP_SYNC to mmap2

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Signed-off-by: Zhang Yi <yi.z.zhang@linux.intel.com>
[ehabkost: Rebased patch to latest code on master]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Tested-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190422004849.26463-2-richardw.yang@linux.intel.com>
[ehabkost: squashed documentation patch]
Message-Id: <20190422004849.26463-3-richardw.yang@linux.intel.com>
[ehabkost: documentation fixup]
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Pankaj Gupta <pagupta@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-04-25 14:17:36 -03:00
..
aio-posix.c aio-posix: Assert that aio_poll() is always called in home thread 2019-02-25 15:03:19 +01:00
aio-wait.c
aio-win32.c aio-posix: Fix concurrent aio_poll/set_fd_handler. 2019-01-14 14:09:41 +00:00
aiocb.c
async.c
atomic64.c
base64.c
bitmap.c
bitops.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
buffer.c
bufferiszero.c
cacheinfo.c
compatfd.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
crc32c.c
cutils.c cutils: Fix qemu_strtosz() & friends to reject non-finite sizes 2018-12-13 19:10:06 +01:00
drm.c
envlist.c
error.c util/error: do not free error on error_abort 2019-04-17 19:15:39 +02:00
event_notifier-posix.c
event_notifier-win32.c
fifo8.c
filemonitor-inotify.c filemon: fix watch IDs to avoid potential wraparound issues 2019-04-02 13:52:02 +01:00
filemonitor-stub.c filemon: fix watch IDs to avoid potential wraparound issues 2019-04-02 13:52:02 +01:00
getauxval.c
hbitmap.c Revert "hbitmap: Add @advance param to hbitmap_iter_next()" 2019-01-15 18:26:50 -05:00
hexdump.c
host-utils.c
id.c
iohandler.c
iov.c
iova-tree.c
keyval.c
lockcnt.c
log.c
main-loop.c slirp: move sources to src/ subdirectory 2019-03-07 12:46:31 +01:00
Makefile.objs qemu-print: New qemu_printf(), qemu_vprintf() etc. 2019-04-18 22:18:59 +02:00
memfd.c memfd: improve error messages 2019-03-11 17:17:01 -03:00
mmap-alloc.c util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap() 2019-04-25 14:17:36 -03:00
module.c
notify.c
osdep.c slirp: prefer c99 types over BSD kind 2019-02-07 15:49:08 +02:00
oslib-posix.c util/mmap-alloc: Add a 'is_pmem' parameter to qemu_ram_mmap 2019-04-25 14:17:36 -03:00
oslib-win32.c hostmem-file: reject invalid pmem file sizes 2019-03-11 10:44:19 -03:00
pagesize.c
path.c
qdist.c
qemu-config.c
qemu-coroutine-io.c
qemu-coroutine-lock.c
qemu-coroutine-sleep.c qemu-coroutine-sleep: drop CoSleepCB 2019-01-24 10:05:16 +00:00
qemu-coroutine.c
qemu-error.c monitor error: Make printf()-like functions return a value 2019-04-18 22:18:59 +02:00
qemu-openpty.c
qemu-option.c qemu/queue.h: simplify reverse access to QTAILQ 2019-01-11 15:46:55 +01:00
qemu-print.c qemu-print: New qemu_fprintf(), qemu_vfprintf() 2019-04-18 22:18:59 +02:00
qemu-progress.c
qemu-sockets.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
qemu-thread-common.h Clean up includes 2018-12-20 10:29:08 +01:00
qemu-thread-posix.c qemu-thread: Don't block SEGV, ILL and FPE 2019-01-08 12:34:46 +00:00
qemu-thread-win32.c build-sys: build with Vista API by default 2019-01-11 13:57:25 +01:00
qemu-timer-common.c
qemu-timer.c
qht.c
qsp.c qsp: Simplify how qsp_report() prints 2019-04-18 22:18:59 +02:00
range.c Don't talk about the LGPL if the file is licensed under the GPL 2019-01-30 10:51:20 +01:00
rcu.c
readline.c
stats64.c
sys_membarrier.c
systemd.c
thread-pool.c
throttle.c
timed-average.c
trace-events filemon: fix watch IDs to avoid potential wraparound issues 2019-04-02 13:52:02 +01:00
unicode.c
uri.c
uuid.c uuid: Make qemu_uuid_bswap() take and return a QemuUUID 2019-02-01 13:46:45 +01:00
vfio-helpers.c exec: Change RAMBlockIterFunc definition 2019-03-06 10:49:17 +00:00