Fix fallouts from Linux header inclusion

This is an all-in-one fix for the smaller and bigger mistakes of the
build system changes for accompanied Linux headers:
 - only enable KVM and vhost on Linux hosts
 - fix powerpc asm header symlink
 - do not use Linux headers on non-Linux hosts
 - fix kvmclock for !CONFIG_KVM
 - fix s390 build on non-Linux hosts

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Tested-by: Andreas Färber <andreas.faerber@web.de>
Tested-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Jan Kiszka 2011-06-23 10:05:12 +02:00 committed by Blue Swirl
parent 744d364418
commit af2be20777
4 changed files with 40 additions and 18 deletions

View file

@ -23,8 +23,10 @@
#include "helpers.h"
#include <string.h>
#include "kvm.h"
#include <linux/kvm.h>
#include "qemu-timer.h"
#ifdef CONFIG_KVM
#include <linux/kvm.h>
#endif
/*****************************************************************************/
/* Softmmu support */
@ -2332,7 +2334,9 @@ static void program_interrupt(CPUState *env, uint32_t code, int ilc)
qemu_log("program interrupt at %#" PRIx64 "\n", env->psw.addr);
if (kvm_enabled()) {
#ifdef CONFIG_KVM
kvm_s390_interrupt(env, KVM_S390_PROGRAM_INT, code);
#endif
} else {
env->int_pgm_code = code;
env->int_pgm_ilc = ilc;