From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M0y75-0002Af-J0 for qemu-devel@nongnu.org; Mon, 04 May 2009 09:21:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M0y70-00026x-5r for qemu-devel@nongnu.org; Mon, 04 May 2009 09:21:42 -0400 Received: from [199.232.76.173] (port=49449 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0y6z-00026h-Sx for qemu-devel@nongnu.org; Mon, 04 May 2009 09:21:37 -0400 Received: from mail-gx0-f176.google.com ([209.85.217.176]:48195) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M0y6z-0004fH-J6 for qemu-devel@nongnu.org; Mon, 04 May 2009 09:21:37 -0400 Received: by gxk24 with SMTP id 24so8036881gxk.10 for ; Mon, 04 May 2009 06:21:37 -0700 (PDT) Message-ID: <49FEEBDD.3090102@codemonkey.ws> Date: Mon, 04 May 2009 08:21:33 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <49FE0E97.30602@codemonkey.ws> <200905041329.30824.arnd@arndb.de> In-Reply-To: <200905041329.30824.arnd@arndb.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFC] Bring in all the Linux headers we depend on in QEMU List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Arnd Bergmann Cc: "qemu-devel@nongnu.org" , kvm-devel , Avi Kivity Arnd Bergmann wrote: > On Sunday 03 May 2009, Anthony Liguori wrote: > >> A classic example is linux/compiler.h and the broken usbdevice_fs.h >> header that depends on it. There are still distributions today that >> QEMU doesn't compile on because of this. >> > > Can you clarify this? I can't find any version of usbdevice_fs.h that > ever included linux/compiler.h (make headers_check would warn about that), > and the only construct used in there that comes from compiler.h is > the __user annotation, which gets stripped in 'make headers_install', > and has been since 2006. > Distros that were released before 2006 certainly had this problem. The issue is that usbdevice_fs.h depends on __user. >> +CORE_HDRS=linux/types.h linux/posix_types.h linux/stddef.h linux/compiler.h >> +CORE_HDRS+=linux/byteorder/little_endian.h linux/byteorder/big_endian.h >> +CORE_HDRS+=linux/swab.h linux/ioctl.h >> + >> +CORE_HDRS+=asm-generic/int-ll64.h asm-generic/int-l64.h asm-generic/ioctl.h >> + >> +CORE_HDRS+=asm-x86/types.h asm-x86/posix_types.h >> +CORE_HDRS+=asm-x86/posix_types_32.h asm-x86/posix_types_64.h >> +CORE_HDRS+=asm-x86/byteorder.h asm-x86/swab.h asm-x86/ioctl.h >> + >> +CORE_HDRS+=asm-powerpc/types.h asm-powerpc/posix_types.h >> +CORE_HDRS+=asm-powerpc/byteorder.h asm-powerpc/swab.h asm-powerpc/ioctl.h >> + >> +CORE_HDRS+=asm-sparc/types.h asm-sparc/posix_types.h >> +CORE_HDRS+=asm-sparc/byteorder.h asm-sparc/swab.h asm-sparc/ioctl.h >> +CORE_HDRS+=asm-sparc/asi.h >> + >> +CORE_HDRS+=asm-arm/types.h asm-arm/posix_types.h >> +CORE_HDRS+=asm-arm/byteorder.h asm-arm/swab.h asm-arm/ioctl.h >> + >> +CORE_HDRS+=asm-parisc/types.h asm-parisc/posix_types.h >> +CORE_HDRS+=asm-parisc/byteorder.h asm-parisc/swab.h asm-parisc/ioctl.h >> > > I don't see the need to copy all the core headers. These should have > been working for ages, and hardly ever see changes that are relevant > to kvm. > If we want to use virtio_*.h instead of duplicating the copies as we are now, then we need all of the core headers too or else it won't be able to compile on systems that do not have Linux libc headers (like win32). >> +# Kernel Virtual Machine interface >> +KVM_HDRS=linux/kvm.h linux/kvm_para.h >> +KVM_HDRS+=asm-x86/kvm.h asm-x86/kvm_para.h >> +KVM_HDRS+=asm-powerpc/kvm.h asm-powerpc/kvm_para.h >> + >> +# VirtIO paravirtual IO framework >> +VIRTIO_HDRS=linux/virtio_config.h linux/virtio_net.h linux/virtio_blk.h >> +VIRTIO_HDRS+=linux/virtio_console.h linux/virtio_balloon.h >> > > These should be copied into the qemu source tree, but not at configure > time. They should just reflect the latest upstream version. Qemu already > needs to handle older kernel versions at run time, and by having the > very latest version in the source tree, you can make sure that qemu > will run on any kernel version. > Yes, if it isn't clear, this Makefile is meant to be used by the maintainers to bring the headers into git. I didn't post the headers because it would have made the note annoyingly long. Regards, Anthony Liguori