* [PATCH 0/1]
@ 2021-07-20 22:13 Jose R. Ziviani
2021-07-20 22:13 ` [PATCH 1/1] modules: Option to build native TCG with --enable-modules Jose R. Ziviani
2021-07-21 5:24 ` [PATCH 0/1] Thomas Huth
0 siblings, 2 replies; 4+ messages in thread
From: Jose R. Ziviani @ 2021-07-20 22:13 UTC (permalink / raw)
To: qemu-devel
Cc: thuth, Jose R. Ziviani, richard.henderson, kraxel, pbonzini, cfontana
Hello!
This patch gives the ability to build TCG builtin even if
--enable-modules is selected. This is useful to have a base
QEMU with TCG native product but still using the benefits of
modules.
Thank you!
Jose R. Ziviani (1):
modules: Option to build native TCG with --enable-modules
configure | 12 ++++++++++--
meson.build | 11 ++++++++++-
meson_options.txt | 2 ++
3 files changed, 22 insertions(+), 3 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] modules: Option to build native TCG with --enable-modules
2021-07-20 22:13 [PATCH 0/1] Jose R. Ziviani
@ 2021-07-20 22:13 ` Jose R. Ziviani
2021-07-21 5:24 ` [PATCH 0/1] Thomas Huth
1 sibling, 0 replies; 4+ messages in thread
From: Jose R. Ziviani @ 2021-07-20 22:13 UTC (permalink / raw)
To: qemu-devel
Cc: thuth, Jose R. Ziviani, richard.henderson, kraxel, pbonzini, cfontana
Adds an option (--enable-tcg-builtin) to build TCG natively when
--enable-modules argument is passed to the build system. It gives
the opportunity to have this important accelerator built-in and
still take advantage of the new modular system.
Signed-off-by: Jose R. Ziviani <jziviani@suse.de>
---
configure | 12 ++++++++++--
meson.build | 11 ++++++++++-
meson_options.txt | 2 ++
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 232c54dcc1..64d7a909ce 100755
--- a/configure
+++ b/configure
@@ -345,6 +345,7 @@ tsan="no"
fortify_source="$default_feature"
strip_opt="yes"
tcg_interpreter="false"
+tcg_builtin="false"
bigendian="no"
mingw32="no"
gcov="no"
@@ -1120,6 +1121,8 @@ for opt do
;;
--enable-tcg) tcg="enabled"
;;
+ --enable-tcg-builtin) tcg_builtin="true"
+ ;;
--disable-malloc-trim) malloc_trim="disabled"
;;
--enable-malloc-trim) malloc_trim="enabled"
@@ -1817,6 +1820,7 @@ Advanced options (experts only):
Default:trace-<pid>
--disable-slirp disable SLIRP userspace network connectivity
--enable-tcg-interpreter enable TCI (TCG with bytecode interpreter, experimental and slow)
+ --enable-tcg-builtin force TCG builtin even with --enable-modules
--enable-malloc-trim enable libc malloc_trim() for memory optimization
--oss-lib path to OSS library
--cpu=CPU Build for host CPU [$cpu]
@@ -2318,7 +2322,11 @@ if test "$solaris" = "yes" ; then
fi
fi
-if test "$tcg" = "enabled"; then
+if test "$tcg" = "disabled"; then
+ debug_tcg="no"
+ tcg_interpreter="false"
+ tcg_builtin="false"
+else
git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
fi
@@ -5229,7 +5237,7 @@ if test "$skip_meson" = no; then
-Dvhost_user_blk_server=$vhost_user_blk_server -Dmultiprocess=$multiprocess \
-Dfuse=$fuse -Dfuse_lseek=$fuse_lseek -Dguest_agent_msi=$guest_agent_msi -Dbpf=$bpf\
$(if test "$default_features" = no; then echo "-Dauto_features=disabled"; fi) \
- -Dtcg_interpreter=$tcg_interpreter \
+ -Dtcg_interpreter=$tcg_interpreter -Dtcg_builtin=$tcg_builtin \
$cross_arg \
"$PWD" "$source_path"
diff --git a/meson.build b/meson.build
index 2f377098d7..2909043aab 100644
--- a/meson.build
+++ b/meson.build
@@ -93,9 +93,13 @@ if cpu in ['x86', 'x86_64']
endif
modular_tcg = []
+is_tcg_modular = false
# Darwin does not support references to thread-local variables in modules
if targetos != 'darwin'
modular_tcg = ['i386-softmmu', 'x86_64-softmmu']
+ is_tcg_modular = config_host.has_key('CONFIG_MODULES') \
+ and get_option('tcg').enabled() \
+ and not get_option('tcg_builtin')
endif
edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu' ]
@@ -279,6 +283,9 @@ if not get_option('tcg').disabled()
accelerators += 'CONFIG_TCG'
config_host += { 'CONFIG_TCG': 'y' }
+ if is_tcg_modular
+ config_host += { 'CONFIG_TCG_MODULAR': 'y' }
+ endif
endif
if 'CONFIG_KVM' not in accelerators and get_option('kvm').enabled()
@@ -1567,7 +1574,7 @@ 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
+ if target in modular_tcg and is_tcg_modular
config_target += { 'CONFIG_TCG_MODULAR': 'y' }
else
config_target += { 'CONFIG_TCG_BUILTIN': 'y' }
@@ -2976,6 +2983,8 @@ summary_info += {'TCG support': config_all.has_key('CONFIG_TCG')}
if config_all.has_key('CONFIG_TCG')
if get_option('tcg_interpreter')
summary_info += {'TCG backend': 'TCI (TCG with bytecode interpreter, experimental and slow)'}
+ elif is_tcg_modular
+ summary_info += {'TCG backend': 'module (@0@)'.format(cpu)}
else
summary_info += {'TCG backend': 'native (@0@)'.format(cpu)}
endif
diff --git a/meson_options.txt b/meson_options.txt
index a9a9b8f4c6..c27749b864 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -43,6 +43,8 @@ option('tcg', type: 'feature', value: 'auto',
description: 'TCG support')
option('tcg_interpreter', type: 'boolean', value: false,
description: 'TCG with bytecode interpreter (experimental and slow)')
+option('tcg_builtin', type: 'boolean', value: 'false',
+ description: 'Force TCG builtin')
option('cfi', type: 'boolean', value: 'false',
description: 'Control-Flow Integrity (CFI)')
option('cfi_debug', type: 'boolean', value: 'false',
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/1]
2021-07-20 22:13 [PATCH 0/1] Jose R. Ziviani
2021-07-20 22:13 ` [PATCH 1/1] modules: Option to build native TCG with --enable-modules Jose R. Ziviani
@ 2021-07-21 5:24 ` Thomas Huth
2021-07-21 13:34 ` Jose R. Ziviani
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2021-07-21 5:24 UTC (permalink / raw)
To: Jose R. Ziviani, qemu-devel; +Cc: pbonzini, richard.henderson, kraxel, cfontana
On 21/07/2021 00.13, Jose R. Ziviani wrote:
> Hello!
>
> This patch gives the ability to build TCG builtin even if
> --enable-modules is selected. This is useful to have a base
> QEMU with TCG native product but still using the benefits of
> modules.
Could you please elaborate why this is required? Did you see a performance
improvement? Or is there another problem?
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/1]
2021-07-21 5:24 ` [PATCH 0/1] Thomas Huth
@ 2021-07-21 13:34 ` Jose R. Ziviani
0 siblings, 0 replies; 4+ messages in thread
From: Jose R. Ziviani @ 2021-07-21 13:34 UTC (permalink / raw)
To: Thomas Huth; +Cc: pbonzini, cfontana, richard.henderson, qemu-devel, kraxel
[-- Attachment #1: Type: text/plain, Size: 903 bytes --]
On Wed, Jul 21, 2021 at 07:24:02AM +0200, Thomas Huth wrote:
> On 21/07/2021 00.13, Jose R. Ziviani wrote:
> > Hello!
> >
> > This patch gives the ability to build TCG builtin even if
> > --enable-modules is selected. This is useful to have a base
> > QEMU with TCG native product but still using the benefits of
> > modules.
>
> Could you please elaborate why this is required? Did you see a performance
> improvement? Or is there another problem?
Hello Thomas,
Please, disconsider this patch. There's a more general discussion about
modules happening here:
https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg00632.html
A more general solution may be required to actually give us a
fine-grained control on modules.
The case is to allow us to generate customized QEMU packages attending
different user needs.
Thank you very much!!
Jose
>
> Thomas
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-21 13:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 22:13 [PATCH 0/1] Jose R. Ziviani
2021-07-20 22:13 ` [PATCH 1/1] modules: Option to build native TCG with --enable-modules Jose R. Ziviani
2021-07-21 5:24 ` [PATCH 0/1] Thomas Huth
2021-07-21 13:34 ` Jose R. Ziviani
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.