]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Add support for /dev/userfaultfd
authorJiri Denemark <jdenemar@redhat.com>
Thu, 8 Feb 2024 14:56:38 +0000 (15:56 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 13 Feb 2024 16:44:26 +0000 (17:44 +0100)
commit66643931e7db08681239c2f74e9ce300d6e291e1
treecaab271f841dc3260b929eb3d5ab2a23c7547400
parenta2c3e390f7bedf36f4ddc544d09fe3b8772c5c6f
qemu: Add support for /dev/userfaultfd

/dev/userfaultfd device is preferred over userfaultfd syscall for
post-copy migrations. Unless qemu driver is configured to disable mount
namespace or to forbid access to /dev/userfaultfd in cgroup_device_acl,
we will copy it to the limited /dev filesystem QEMU will have access to
and label it appropriately. So in the default configuration post-copy
migration will be allowed even without enabling
vm.unprivileged_userfaultfd sysctl.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu.conf.in
src/qemu/qemu_cgroup.c
src/qemu/qemu_process.c
src/qemu/qemu_security.c
src/qemu/qemu_security.h
src/qemu/test_libvirtd_qemu.aug.in