From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 03/12] Switch build system to accompanied kernel headers Date: Tue, 14 Jun 2011 13:21:40 +0200 Message-ID: <4DF74444.1050007@siemens.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" To: Alexander Graf Return-path: Received: from goliath.siemens.de ([192.35.17.28]:16593 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754362Ab1FNLVs (ORCPT ); Tue, 14 Jun 2011 07:21:48 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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