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 <string.h>
> #include "kvm.h"
> +#include <linux/kvm.h>

Have you tried to compile this on non-Linux?


Alex

Reply via email to