[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/7] tcg/module: add some infrastructure for modular tcg.
From: |
Gerd Hoffmann |
Subject: |
[PATCH 4/7] tcg/module: add some infrastructure for modular tcg. |
Date: |
Wed, 4 Aug 2021 16:38:23 +0200 |
Create tcg-module.[ch] files, with struct TCGModuleOps, empty for now.
Followup patches will add function pointers to the struct and stub
functions to tcg-module.c. That will effectively will switch stubs from
compile-time to runtime, which is needed to build tcg as module.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
include/tcg/tcg-module.h | 8 ++++++++
accel/tcg/tcg-module.c | 5 +++++
accel/tcg/meson.build | 4 ++++
3 files changed, 17 insertions(+)
create mode 100644 include/tcg/tcg-module.h
create mode 100644 accel/tcg/tcg-module.c
diff --git a/include/tcg/tcg-module.h b/include/tcg/tcg-module.h
new file mode 100644
index 000000000000..7e87aecb2357
--- /dev/null
+++ b/include/tcg/tcg-module.h
@@ -0,0 +1,8 @@
+#ifndef TCG_MODULE_H
+#define TCG_MODULE_H
+
+struct TCGModuleOps {
+};
+extern struct TCGModuleOps tcg;
+
+#endif /* TCG_MODULE_H */
diff --git a/accel/tcg/tcg-module.c b/accel/tcg/tcg-module.c
new file mode 100644
index 000000000000..e864fb20c141
--- /dev/null
+++ b/accel/tcg/tcg-module.c
@@ -0,0 +1,5 @@
+#include "qemu/osdep.h"
+#include "tcg/tcg-module.h"
+
+struct TCGModuleOps tcg = {
+};
diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build
index c1ee9dcaed1f..eaaf7168ffb6 100644
--- a/accel/tcg/meson.build
+++ b/accel/tcg/meson.build
@@ -1,3 +1,7 @@
+specific_ss.add(files(
+ 'tcg-module.c',
+))
+
specific_ss.add(when: 'CONFIG_TCG', if_true: files(
'cpu-exec-common.c',
))
--
2.31.1
- [PATCH 0/7] tcg: some small towards more modular tcg, Gerd Hoffmann, 2021/08/04
- [PATCH 1/7] plugins: register qemu_plugin_opts using opts_init(), Gerd Hoffmann, 2021/08/04
- [PATCH 2/7] tcg/module: move hmp.c to tcg module, Gerd Hoffmann, 2021/08/04
- [PATCH 3/7] tcg/module: move cpu-exec-common.c from tcg_ss to specific_ss, Gerd Hoffmann, 2021/08/04
- [PATCH 5/7] tcg/module: Add tlb_flush to TCGModuleOps, Gerd Hoffmann, 2021/08/04
- [PATCH 6/7] tcg/module: Add tlb_flush_page to TCGModuleOps, Gerd Hoffmann, 2021/08/04
- [PATCH 4/7] tcg/module: add some infrastructure for modular tcg.,
Gerd Hoffmann <=
- [PATCH 7/7] tcg/module: Add tlb_reset_dirty to TCGModuleOps, Gerd Hoffmann, 2021/08/04