tcg: add the tcg-stub.c file into accel/stubs/
authorYang Zhong <yang.zhong@intel.com>
Mon, 3 Jul 2017 10:12:17 +0000 (18:12 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 4 Jul 2017 14:01:16 +0000 (16:01 +0200)
If tcg is disabled, the functions in tcg-stub.c file will be called.
This file is target-independent file, do not include any platform
related stub functions into this file.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/stubs/Makefile.objs
accel/stubs/tcg-stub.c [new file with mode: 0644]

index bd5794f222978e02d17c5b89882809c7ab96d717..fdfbf7332c37cac0e36144af028d9ba2d1c2904c 100644 (file)
@@ -1 +1,2 @@
 obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
+obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
new file mode 100644 (file)
index 0000000..5dd480b
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * QEMU TCG accelerator stub
+ *
+ * Copyright Red Hat, Inc. 2013
+ *
+ * Author: Paolo Bonzini     <pbonzini@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
+#include "tcg/tcg.h"
+#include "exec/cpu-common.h"
+#include "exec/exec-all.h"
+
+void tb_flush(CPUState *cpu)
+{
+}