aboutsummaryrefslogtreecommitdiff
path: root/util/trace-events
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2023-02-07 15:57:11 -0500
committerJuan Quintela <quintela@redhat.com>2023-02-11 16:51:09 +0100
commitc40c0463413b941c13fe5f99a90c02d7d6584828 (patch)
treec34bd6ea8ec1f18b2313db12c20fc5d120c564fa /util/trace-events
parent93e0932b7be2498024cd6ba8446a0fa2cb1769bc (diff)
downloadqemu-c40c0463413b941c13fe5f99a90c02d7d6584828.zip
qemu-c40c0463413b941c13fe5f99a90c02d7d6584828.tar.gz
qemu-c40c0463413b941c13fe5f99a90c02d7d6584828.tar.bz2
util/userfaultfd: Support /dev/userfaultfd
Teach QEMU to use /dev/userfaultfd when it existed and fallback to the system call if either it's not there or doesn't have enough permission. Firstly, as long as the app has permission to access /dev/userfaultfd, it always have the ability to trap kernel faults which QEMU mostly wants. Meanwhile, in some context (e.g. containers) the userfaultfd syscall can be forbidden, so it can be the major way to use postcopy in a restricted environment with strict seccomp setup. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'util/trace-events')
-rw-r--r--util/trace-events1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/trace-events b/util/trace-events
index c8f53d7..16f78d8 100644
--- a/util/trace-events
+++ b/util/trace-events
@@ -93,6 +93,7 @@ qemu_vfio_region_info(const char *desc, uint64_t region_ofs, uint64_t region_siz
qemu_vfio_pci_map_bar(int index, uint64_t region_ofs, uint64_t region_size, int ofs, void *host) "map region bar#%d addr 0x%"PRIx64" size 0x%"PRIx64" ofs 0x%x host %p"
#userfaultfd.c
+uffd_detect_open_mode(int mode) "%d"
uffd_query_features_nosys(int err) "errno: %i"
uffd_query_features_api_failed(int err) "errno: %i"
uffd_create_fd_nosys(int err) "errno: %i"