[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/2] tests/qtest/migration: Stop checking __NR_userfaultfd
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v2 2/2] tests/qtest/migration: Stop checking __NR_userfaultfd |
Date: |
Fri, 20 Dec 2024 09:11:14 +0000 |
User-agent: |
Mutt/2.2.13 (2024-03-09) |
On Wed, Dec 18, 2024 at 04:22:23PM -0300, Fabiano Rosas wrote:
> We don't need to check for __NR_userfaultfd in the tests anymore, the
> syscall has been present in Linux for a long time now.
The same is true of the migration/postcopy-ram.c code too which I
think should be changed at the same time as its tests.
There are a few other places in QEMU also checking __NR_userfaultfd
but not directly under migration subsystem, so change those ones at
your discretion.
>
> Suggested-by: Peter Xu <peterx@redhat.com>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
> tests/qtest/migration/migration-util.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/qtest/migration/migration-util.c
> b/tests/qtest/migration/migration-util.c
> index eb3640e27e..23e0163945 100644
> --- a/tests/qtest/migration/migration-util.c
> +++ b/tests/qtest/migration/migration-util.c
> @@ -27,8 +27,8 @@
> #include <sys/syscall.h>
> #endif
>
> -/* for uffd_version_check() */
> -#if defined(__linux__) && defined(__NR_userfaultfd) &&
> defined(CONFIG_EVENTFD)
> +/* for ufd_version_check() */
> +#if defined(__linux__) && defined(CONFIG_EVENTFD)
> #include <sys/eventfd.h>
> #include "qemu/userfaultfd.h"
> #endif
> @@ -301,7 +301,7 @@ bool probe_o_direct_support(const char *tmpfs)
> }
> #endif
>
> -#if defined(__linux__) && defined(__NR_userfaultfd) &&
> defined(CONFIG_EVENTFD)
> +#if defined(__linux__) && defined(CONFIG_EVENTFD)
> bool ufd_version_check(bool *uffd_feature_thread_id)
> {
> struct uffdio_api api_struct;
> --
> 2.35.3
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|