From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4oRM-0008O2-V8 for qemu-devel@nongnu.org; Tue, 16 Jun 2015 06:50:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4oRK-0003MQ-Q1 for qemu-devel@nongnu.org; Tue, 16 Jun 2015 06:50:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4oRK-0003M9-FX for qemu-devel@nongnu.org; Tue, 16 Jun 2015 06:49:58 -0400 Date: Tue, 16 Jun 2015 11:49:53 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20150616104952.GB2119@work-vm> References: <1424883128-9841-1-git-send-email-dgilbert@redhat.com> <1424883128-9841-23-git-send-email-dgilbert@redhat.com> <20150313012346.GA11973@voom.redhat.com> <20150313104153.GB2486@work-vm> <551905E0.6020103@redhat.com> <20150330140748.GC2474@work-vm> <55195917.4020701@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55195917.4020701@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 22/45] postcopy: OS support test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, quintela@redhat.com, qemu-devel@nongnu.org, amit.shah@redhat.com, yanghy@cn.fujitsu.com, David Gibson * Paolo Bonzini (pbonzini@redhat.com) wrote: > > > On 30/03/2015 16:07, Dr. David Alan Gilbert wrote: > >>> > > > >> > > >> > 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. > > I think it's okay. First include syscall.h, then include > linux/userfaultfd.h under #ifdef. > > > Although then what's the best way to tell people to try it out > > without an updated libc? > > They don't need an updated libc, just an updated kernel. syscall.h is > just a wrapper around Linux headers. That's what I've implemented in the v6 and the v7 I've just posted. Dave > > Paolo > > > Or is it best to modify ./configure to detect it? -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK