[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 29/34] accel: build tcg modular
From: |
Gerd Hoffmann |
Subject: |
[PATCH v4 29/34] accel: build tcg modular |
Date: |
Thu, 24 Jun 2021 12:38:31 +0200 |
Build tcg accel ops as module.
Which is only a small fraction of tcg.
Also only x86 for now.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
accel/tcg/meson.build | 5 ++++-
meson.build | 14 +++++++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build
index 1236ac7b910b..0ae9180282e3 100644
--- a/accel/tcg/meson.build
+++ b/accel/tcg/meson.build
@@ -15,8 +15,11 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)
specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files(
'cputlb.c',
+))
+
+tcg_module_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files(
'tcg-accel-ops.c',
'tcg-accel-ops-mttcg.c',
'tcg-accel-ops-icount.c',
- 'tcg-accel-ops-rr.c'
+ 'tcg-accel-ops-rr.c',
))
diff --git a/meson.build b/meson.build
index d2cacc145a91..9f1ca4177073 100644
--- a/meson.build
+++ b/meson.build
@@ -92,6 +92,8 @@ if cpu in ['x86', 'x86_64']
}
endif
+modular_tcg = ['i386-softmmu', 'x86_64-softmmu']
+
edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu',
'x86_64-softmmu' ]
install_edk2_blobs = false
if get_option('install_blobs')
@@ -1311,6 +1313,11 @@ foreach target : target_dirs
elif sym == 'CONFIG_XEN' and have_xen_pci_passthrough
config_target += { 'CONFIG_XEN_PCI_PASSTHROUGH': 'y' }
endif
+ if target in modular_tcg
+ config_target += { 'CONFIG_TCG_MODULAR': 'y' }
+ else
+ config_target += { 'CONFIG_TCG_BUILTIN': 'y' }
+ endif
accel_kconfig += [ sym + '=y' ]
endif
endforeach
@@ -1782,6 +1789,7 @@ util_ss = ss.source_set()
# accel modules
qtest_module_ss = ss.source_set()
+tcg_module_ss = ss.source_set()
modules = {}
target_modules = {}
@@ -2022,7 +2030,11 @@ subdir('tests/qtest/libqos')
subdir('tests/qtest/fuzz')
# accel modules
-target_modules += { 'accel' : { 'qtest': qtest_module_ss }}
+tcg_real_module_ss = ss.source_set()
+tcg_real_module_ss.add_all(when: 'CONFIG_TCG_MODULAR', if_true: tcg_module_ss)
+specific_ss.add_all(when: 'CONFIG_TCG_BUILTIN', if_true: tcg_module_ss)
+target_modules += { 'accel' : { 'qtest': qtest_module_ss,
+ 'tcg': tcg_real_module_ss }}
########################
# Library dependencies #
--
2.31.1
- [PATCH v4 19/34] modules: check arch on qom lookup, (continued)
- [PATCH v4 19/34] modules: check arch on qom lookup, Gerd Hoffmann, 2021/06/24
- [PATCH v4 18/34] modules: check arch and block load on mismatch, Gerd Hoffmann, 2021/06/24
- [PATCH v4 20/34] modules: target-specific module build infrastructure, Gerd Hoffmann, 2021/06/24
- [PATCH v4 21/34] modules: add documentation for module sourcesets, Gerd Hoffmann, 2021/06/24
- [PATCH v4 23/34] modules: module.h kerneldoc annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 22/34] modules: add module_obj() note to QOM docs, Gerd Hoffmann, 2021/06/24
- [PATCH v4 24/34] modules: hook up modules.h to docs build, Gerd Hoffmann, 2021/06/24
- [PATCH v4 25/34] accel: autoload modules, Gerd Hoffmann, 2021/06/24
- [PATCH v4 26/34] accel: add qtest module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 27/34] accel: build qtest modular, Gerd Hoffmann, 2021/06/24
- [PATCH v4 29/34] accel: build tcg modular,
Gerd Hoffmann <=
- [PATCH v4 28/34] accel: add tcg module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 31/34] usb: drop usb_host_dev_is_scsi_storage hook, Gerd Hoffmann, 2021/06/24
- [PATCH v4 30/34] monitor: allow register hmp commands, Gerd Hoffmann, 2021/06/24
- [PATCH v4 33/34] usb: build usb-host as module, Gerd Hoffmann, 2021/06/24
- [PATCH v4 32/34] monitor/usb: register 'info usbhost' dynamically, Gerd Hoffmann, 2021/06/24
- [PATCH v4 34/34] monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically, Gerd Hoffmann, 2021/06/24
- Re: [PATCH v4 00/34] modules: add meta-data database, Jose R. Ziviani, 2021/06/24