[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/29] tcg/module: add tcg-module.[ch] infrastructure
From: |
Gerd Hoffmann |
Subject: |
[PATCH 09/29] tcg/module: add tcg-module.[ch] infrastructure |
Date: |
Tue, 31 Aug 2021 14:15:25 +0200 |
Add TCGModuleOps struct, empty for now, followup patches will fill it.
This struct has pointers for tcg functions which are called by core
qemu.
The struct is initialized (at compile time) with pointers to stub
functions. When the tcg module loads it will update the function
pointers to point to the real functions instead.
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 ec74e17a8285..93cbbf9f3926 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 00/29] [RFC] build more i386 tcg code modular., Gerd Hoffmann, 2021/08/31
- [PATCH 01/29] build: temporarily disable modular tcg, Gerd Hoffmann, 2021/08/31
- [PATCH 02/29] plugins: register qemu_plugin_opts using opts_init(), Gerd Hoffmann, 2021/08/31
- [PATCH 03/29] tcg/module: move hmp.c to module, Gerd Hoffmann, 2021/08/31
- [PATCH 04/29] tcg/module: move cputlb.c to module, Gerd Hoffmann, 2021/08/31
- [PATCH 05/29] tcg/module: move tcg_ss to module [accel/tcg], Gerd Hoffmann, 2021/08/31
- [PATCH 06/29] tcg/module: move tcg_ss to module [tcg], Gerd Hoffmann, 2021/08/31
- [PATCH 07/29] tcg/module: move files to module [target/i386/tcg], Gerd Hoffmann, 2021/08/31
- [PATCH 08/29] move cpu-exec-common.c from tcg module to core qemu [accel/tcg], Gerd Hoffmann, 2021/08/31
- [PATCH 09/29] tcg/module: add tcg-module.[ch] infrastructure,
Gerd Hoffmann <=
- [PATCH 10/29] tcg_funcs: Add tlb_flush to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 11/29] tcg_funcs: Add tlb_flush_page to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 12/29] tcg_funcs: Add tlb_reset_dirty to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 14/29] tcg_funcs:Add tcg_exec_{realizefn, unrealizefn} to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 13/29] tcg_funcs: Add tlb_plugin_lookup to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 15/29] tcg_funcs: Add tb_flush to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 17/29] tcg: drop tb_invalidate_phys_page_range(), Gerd Hoffmann, 2021/08/31
- [PATCH 16/29] tcg: use tb_page_addr_t for tb_invalidate_phys_range(), Gerd Hoffmann, 2021/08/31
- [PATCH 18/29] tcg_funcs: Add tb_invalidate_phys_range to TCGModuleOps, Gerd Hoffmann, 2021/08/31
- [PATCH 19/29] tcg_funcs: Add tb_check_watchpoint to TCGModuleOps, Gerd Hoffmann, 2021/08/31