Message ID | 20241218192223.10551-3-farosas@suse.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | migration: Fix postcopy tests | expand |
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. > > Suggested-by: Peter Xu <peterx@redhat.com> > Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com>
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
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;
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. 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(-)