qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Import KVM headers including Makefile andimport


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] Import KVM headers including Makefile andimport script
Date: Sun, 03 May 2009 18:19:31 +0300
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

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.


I also suggest using arch/*/include/asm as a way of avoiding the symlink, instead of the extra hack in fixup.sed.


I did it the current way to avoid deep directory layouts. We would end up with an extra level of directories via linux/arch-x86/asm/foo.h as opposed to linux/asm-x86/foo.h.

Did you have a reason for wanting to avoid the sed hacks verses a layout like this other than to avoid the hack?

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...).

I don't see a problem with the extra directory level, especially as tab completion expands it immediately.


The fixup certainly can be made more readable.  For instance:

# Expand asm/ includes to avoid having to do symlink trickery
s:^#include <asm/kvm\(.*\)>$:\
#if defined(__x86_64__) || defined(__i386__)            \
#include <asm-x86/kvm\1>                                \
#elif defined(__powerpc__)                              \
#include <asm-powerpc/kvm\1>                            \
#endif\
:g

Let's avoid it altogether (we can avoid the compiler.h hack by adding a dummy <linux/compiler.h>).

--
error compiling committee.c: too many arguments to function





reply via email to

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