From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] tests/qtest/migration: Restore include for postcopy
Date: Wed, 18 Dec 2024 16:22:11 +0000 [thread overview]
Message-ID: <Z2L2syGHfm923PRP@redhat.com> (raw)
In-Reply-To: <87ldwduit0.fsf@suse.de>
On Wed, Dec 18, 2024 at 12:12:11PM -0300, Fabiano Rosas wrote:
> Daniel P. Berrangé <berrange@redhat.com> writes:
>
> > On Tue, Dec 17, 2024 at 04:47:39PM -0500, Peter Xu wrote:
> >> On Tue, Dec 17, 2024 at 06:22:01PM -0300, Fabiano Rosas wrote:
> >> > Commit 124a3c58b8 ("tests/qtest/migration: Move ufd_version_check to
> >> > utils") moved the ufd_version_check() function to another file but
> >> > failed to bring along the <sys/syscall> include, which is necessary to
> >> > pull in <asm/unistd.h> for __NR_userfaultd.
> >> >
> >> > Restore the missing include.
> >>
> >> Ohhhhhhh.. so postcopy tests will always be skipped as of now? Maybe worth
> >> explicit mention that in the commit message if so, only when you merge.
> >>
> >> >
> >> > While here, remove the ifdef __linux__ that's redundant and fix a
> >> > couple of typos.
> >> >
> >> > Fixes: 124a3c58b8 ("tests/qtest/migration: Move ufd_version_check to utils")
> >> > Signed-off-by: Fabiano Rosas <farosas@suse.de>
> >>
> >> Reviewed-by: Peter Xu <peterx@redhat.com>
> >>
> >> Maybe we don't need to be as careful on old kernels anymore especially in
> >> tests, because userfaultfd syscall existed for ~10 years. So if we want we
> >> can start requiring __NR_userfaultfd present for __linux__, then no way to
> >> miss such spot next time.
> >
> > Yes, I think that check is obsolete, based on our supported platforms
> > list. It would suffice to just check __linux__.
>
> This breaks the cross builds. It seems the __NR_userfaultfd was actually
> stopping several archs from reaching ufd_version_check(). Since
> <sys/ioctl.h> is under HOST_X86_64, these new instances now fail to find
> the 'ioctl' symbol:
>
> https://gitlab.com/farosas/qemu/-/pipelines/1594332399
>
> Of course I could just include <sys/ioctl.h> unconditionally, but the
> fact that new code is not being built means the assumption that we can
> imply __NR_userfaultfd from __linux__ alone is not correct.
I think removing __NR_userfaultfd is still correct. The problem is that
the ufd_version_check code is wrapped in a conditional that is not the
same as the conditional that pulls in ioctl.h. That pre-existing bug
should be fixed regardless, and once that's done, removing __NR_userfaultfd
wouldn't be an issue.
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 :|
next prev parent reply other threads:[~2024-12-18 16:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 21:22 [PATCH] tests/qtest/migration: Restore include for postcopy Fabiano Rosas
2024-12-17 21:47 ` Peter Xu
2024-12-18 8:22 ` Daniel P. Berrangé
2024-12-18 15:12 ` Fabiano Rosas
2024-12-18 16:16 ` Peter Xu
2024-12-18 16:22 ` Daniel P. Berrangé [this message]
2024-12-18 19:20 ` Fabiano Rosas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z2L2syGHfm923PRP@redhat.com \
--to=berrange@redhat.com \
--cc=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.