[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 22/45] postcopy: OS support test

From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH v5 22/45] postcopy: OS support test
Date: Mon, 30 Mar 2015 15:07:49 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

* Paolo Bonzini (address@hidden) wrote:
> On 13/03/2015 11:41, Dr. David Alan Gilbert wrote:
> >>> > > +#ifdef HOST_X86_64
> >>> > > +#ifndef __NR_userfaultfd
> >>> > > +#define __NR_userfaultfd 323
> >> > 
> >> > Sholdn't this come from the kernel headers imported in the previous
> >> > patch?  Rather than having an arch-specific hack.
> > The header, like the rest of the kernel headers, just provides
> > the constant and structure definitions for the call; the syscall numbers
> > come from arch specific headers.  I guess in the final world I wouldn't
> > need this at all since it'll come from the system headers; but what's
> > the right way to put this in for new syscalls?
> > 
> You would just require new _installed_ kernel headers.  Then you can use
> linux/userfaultfd.h and syscall.h (the latter from glibc, includes
> asm/unistd.h to get syscall numbers).
> linux-headers/ is useful for APIs that do not require system calls, or
> for APIs that are extensible.  However, if a system call is required
> (and mandatory) it's simpler to just use installed headers.

OK, so then I could check for ifdef __NR_userfault and then
do the include and I think that would be safe.
Although then what's the best way to tell people to try it out
without an updated libc?

Or is it best to modify ./configure to detect it?


> Paolo
Dr. David Alan Gilbert / address@hidden / Manchester, UK

reply via email to

[Prev in Thread] Current Thread [Next in Thread]