From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M0jjI-0008Fw-30 for qemu-devel@nongnu.org; Sun, 03 May 2009 18:00:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M0jjE-0008A3-0E for qemu-devel@nongnu.org; Sun, 03 May 2009 18:00:11 -0400 Received: from [199.232.76.173] (port=60365 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0jjC-00089l-Mc for qemu-devel@nongnu.org; Sun, 03 May 2009 18:00:06 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:41075) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M0jjC-0004dn-Bn for qemu-devel@nongnu.org; Sun, 03 May 2009 18:00:06 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e32.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n43Lulq9019770 for ; Sun, 3 May 2009 15:56:47 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n43M011b204026 for ; Sun, 3 May 2009 16:00:01 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n43M00DL007005 for ; Sun, 3 May 2009 16:00:00 -0600 Message-ID: <49FE13DF.4010205@us.ibm.com> Date: Sun, 03 May 2009 16:59:59 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Import KVM headers including Makefile andimportscript References: <1241298173-20668-1-git-send-email-aliguori@us.ibm.com> <49FD341C.8030205@redhat.com> <49FDB2FF.3060001@us.ibm.com> <49FDB603.6010603@redhat.com> In-Reply-To: <49FDB603.6010603@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org, Hollis Blanchard Avi Kivity wrote: > Anthony Liguori wrote: >>> Can we put them under kvm/, as include/ looks like a generic include >>> directory, which this isn't. Also, this generates a gratuitous >>> conflict with qemu-kvm.git, and we have enough of those already. >> >> I'd rather put them under linux/ because right now, we depend on a >> number of Linux headers (for USB pass through, for instance). >> >> The qemu-kvm.git layout is kvm/kernel/include. That doesn't seem to >> make a lot of sense for QEMU. > > linux/ makes sense. But let's coordinate the change. BTW, the next logic step for qemu-kvm.git is to move /libkvm/libkvm.c to /libkvm-all.c, then move /libkvm/libkvm-.c to /target-/libkvm.c. Then make each target that supports kvm depend on libkvm-all.o and libkvm.o. kvmctl can be moved to the top-level too and treated like another qemu tool. The trick is to build a kvmctl-libkvm.o or something like that but it should be too difficult. > Hacks are not good. I'd avoid them whenever possible. Just as an > example, we'll need to hack the hack whenever we add an architecture > (ia64, s390, arm...). It's purely aesthetic for me and I don't mind changing it. >> >> The fixup certainly can be made more readable. For instance: >> >> # Expand asm/ includes to avoid having to do symlink trickery >> s:^#include $:\ >> #if defined(__x86_64__) || defined(__i386__) \ >> #include \ >> #elif defined(__powerpc__) \ >> #include \ >> #endif\ >> :g >> > Let's avoid it altogether (we can avoid the compiler.h hack by adding > a dummy ). I still think a fixup is needed because once concern I have is that it's far too brittle in its current state. It's too easy to not pull in a header and end up using /usr/include/linux/foo.h. This could lead to very subtle build errors that would be host OS dependent. So I'm thinking that a common prefix to avoid confusion is warranted. So the fixup would become: s:^#include :#include "host/linux/\1":g s:^#include :#include "host/asm/\1":g And we'd change all the existing #includes to use "host/foo". I think that would make it much more robust. -- Regards, Anthony Liguori