On 25/1/23 23:40, Peter Xu wrote:
Add a helper to create the uffd handle.

Signed-off-by: Peter Xu <pet...@redhat.com>
---
  include/qemu/userfaultfd.h   |  1 +
  migration/postcopy-ram.c     | 11 +++++------
  tests/qtest/migration-test.c |  3 ++-
  util/userfaultfd.c           | 13 +++++++++++--
  4 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/include/qemu/userfaultfd.h b/include/qemu/userfaultfd.h
index 6b74f92792..a19a05d5f7 100644
--- a/include/qemu/userfaultfd.h
+++ b/include/qemu/userfaultfd.h
@@ -17,6 +17,7 @@
  #include "exec/hwaddr.h"
  #include <linux/userfaultfd.h>
+int uffd_open(int flags);

Preferably documenting what this function returns:
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to