From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcaNs-0007t6-Cd for qemu-devel@nongnu.org; Mon, 30 Mar 2015 10:09:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcaNo-0000tT-7C for qemu-devel@nongnu.org; Mon, 30 Mar 2015 10:09:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcaNo-0000s8-09 for qemu-devel@nongnu.org; Mon, 30 Mar 2015 10:09:40 -0400 Message-ID: <55195917.4020701@redhat.com> Date: Mon, 30 Mar 2015 16:09:27 +0200 From: Paolo Bonzini MIME-Version: 1.0 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> In-Reply-To: <20150330140748.GC2474@work-vm> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: "Dr. David Alan Gilbert" 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 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. Paolo > Or is it best to modify ./configure to detect it?