aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2012-01-23 19:59:14 +0000
committerBlue Swirl <blauwirbel@gmail.com>2012-01-23 20:04:51 +0000
commit61eb1f38c10ef73220e862313b792c56646495a6 (patch)
treec914abe87fcd85fd59e412fdb1c9c5d6191aa544
parent5b4448d27d7c6ff6e18a1edc8245cb1db783e37c (diff)
hyperv: fix build on non-KVM hosts
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r--Makefile.target2
-rw-r--r--target-i386/hyperv.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/Makefile.target b/Makefile.target
index 092565a1e8..69193d4938 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -201,7 +201,7 @@ obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o
obj-y += memory.o savevm.o
LIBS+=-lz
-obj-i386-y +=hyperv.o
+obj-i386-$(CONFIG_KVM) += hyperv.o
QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
diff --git a/target-i386/hyperv.h b/target-i386/hyperv.h
index 15467bf397..bacb1d4373 100644
--- a/target-i386/hyperv.h
+++ b/target-i386/hyperv.h
@@ -14,7 +14,9 @@
#define QEMU_HW_HYPERV_H 1
#include "qemu-common.h"
+#ifdef CONFIG_KVM
#include <asm/hyperv.h>
+#endif
#ifndef HYPERV_SPINLOCK_NEVER_RETRY
#define HYPERV_SPINLOCK_NEVER_RETRY 0xFFFFFFFF
@@ -24,7 +26,7 @@
#define KVM_CPUID_SIGNATURE_NEXT 0x40000100
#endif
-#ifndef CONFIG_USER_ONLY
+#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_KVM)
void hyperv_enable_vapic_recommended(bool val);
void hyperv_enable_relaxed_timing(bool val);
void hyperv_set_spinlock_retries(int val);