From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWRgr-0002t9-4P for qemu-devel@nongnu.org; Tue, 14 Jun 2011 07:21:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWRgl-0006ny-UB for qemu-devel@nongnu.org; Tue, 14 Jun 2011 07:21:48 -0400 Received: from goliath.siemens.de ([192.35.17.28]:26362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWRgl-0006nr-Eg for qemu-devel@nongnu.org; Tue, 14 Jun 2011 07:21:43 -0400 Message-ID: <4DF74444.1050007@siemens.com> Date: Tue, 14 Jun 2011 13:21:40 +0200 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/12] Switch build system to accompanied kernel headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Marcelo Tosatti , Avi Kivity , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" On 2011-06-14 13:11, Alexander Graf wrote: > > On 08.06.2011, at 16:10, Jan Kiszka wrote: > > This helps reducing our build-time checks for feature support in the > available Linux kernel headers. And it helps users that do not have > sufficiently recent headers installed on their build machine. > > Consequently, the patch removes and build-time checks for kvm and vhost > in configure, the --kerneldir switch, and KVM_CFLAGS. Kernel headers are > supposed to be provided by QEMU only. > > s390 needs some extra love as it carries redefinitions from kernel > headers. > > Yes. I was wondering if we should unconditionally include the kernel headers there. The problem I'm seeing there is that I don't know if that would work fine on non-Linux hosts, as that code definitely gets compiled there, while KVM code is not. > > > > [...] > > diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h > index 4e5c391..b5e587f 100644 > --- a/target-s390x/cpu.h > +++ b/target-s390x/cpu.h > @@ -313,16 +313,6 @@ CPUState *s390_cpu_addr2state(uint16_t cpu_addr); > /* from s390-virtio-bus */ > extern const target_phys_addr_t virtio_size; > > -#ifndef KVM_S390_SIGP_STOP > -#define KVM_S390_SIGP_STOP 0 > -#define KVM_S390_PROGRAM_INT 0 > -#define KVM_S390_SIGP_SET_PREFIX 0 > -#define KVM_S390_RESTART 0 > -#define KVM_S390_INT_VIRTIO 0 > -#define KVM_S390_INT_SERVICE 0 > -#define KVM_S390_INT_EMERGENCY 0 > -#endif > - > #endif > void cpu_lock(void); > void cpu_unlock(void); > diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c > index db03a79..9429698 100644 > --- a/target-s390x/op_helper.c > +++ b/target-s390x/op_helper.c > @@ -23,6 +23,7 @@ > #include "helpers.h" > #include > #include "kvm.h" > +#include > > Have you tried to compile this on non-Linux? Sorry, I don't have "non-Linux" around. :) Do you expect build problems with that header? Why? BTW, if you depend on KVM_* constants for non-KVM builds, that looks a bit fishy to me. Why is that code built at all in that setup? Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux