]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tcg: add CONFIG_TCG guards in headers
authorYang Zhong <yang.zhong@intel.com>
Mon, 3 Jul 2017 10:12:21 +0000 (18:12 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 5 Jul 2017 07:11:08 +0000 (09:11 +0200)
Add CONFIG_TCG around TLB-related functions and structure declarations.
Some of these functions are defined in ./accel/tcg/cputlb.c, which will
not be linked in if TCG is disabled, and have no stubs; therefore, their
callers will also be compiled out for --disable-tcg.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/exec/cpu-defs.h
include/exec/exec-all.h

index 5f4e303635f87fa67950ab8b102a8b4f024545c5..bc8e7f848d9142f866fc99bcd379ac31307aefd6 100644 (file)
@@ -25,7 +25,9 @@
 
 #include "qemu/host-utils.h"
 #include "qemu/queue.h"
+#ifdef CONFIG_TCG
 #include "tcg-target.h"
+#endif
 #ifndef CONFIG_USER_ONLY
 #include "exec/hwaddr.h"
 #endif
@@ -54,7 +56,7 @@ typedef uint64_t target_ulong;
 #error TARGET_LONG_SIZE undefined
 #endif
 
-#if !defined(CONFIG_USER_ONLY)
+#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
 /* use a fully associative victim tlb of 8 entries */
 #define CPU_VTLB_SIZE 8
 
index 0b56432a3a0616bf9a21cad91b5608aedcf3a2ea..8096d64a1d32bdcca6d69ef10062b7ca34fa92ac 100644 (file)
@@ -82,6 +82,9 @@ void cpu_reloading_memory_map(void);
  * Note that with KVM only one address space is supported.
  */
 void cpu_address_space_init(CPUState *cpu, AddressSpace *as, int asidx);
+#endif
+
+#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
 /* cputlb.c */
 /**
  * tlb_flush_page: