Message ID | 20240503091657.26468-2-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | accel/tcg: Call tcg_flush_jmp_cache() again when creating user-mode cpu | expand |
On Fri, May 3, 2024 at 11:17 AM Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > > If CONFIG_TCG is not defined, skip this directory calling > subdir_done(). Then since we know CONFIG_TCG is defined, > we don't need to check for it. You can only remove the check if you assume that TCG (unlike e.g. KVM) is enabled for all targets. Of course this assumption is true right now, but in principle it does not have to be - a long time ago, qemu-kvm had ia64 as a KVM-only target for example. So I'm not sure this patch is a good idea. A lot of it is just replacing tcg_specific_ss with specific_ss. Paolo
On 3/5/24 13:16, Paolo Bonzini wrote: > On Fri, May 3, 2024 at 11:17 AM Philippe Mathieu-Daudé > <philmd@linaro.org> wrote: >> >> If CONFIG_TCG is not defined, skip this directory calling >> subdir_done(). Then since we know CONFIG_TCG is defined, >> we don't need to check for it. > > You can only remove the check if you assume that TCG (unlike e.g. KVM) > is enabled for all targets. Of course this assumption is true right > now, but in principle it does not have to be - a long time ago, > qemu-kvm had ia64 as a KVM-only target for example. Got it, thanks. > So I'm not sure this patch is a good idea. A lot of it is just > replacing tcg_specific_ss with specific_ss. > > Paolo >
diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index aef80de967..f40959436e 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -1,8 +1,11 @@ -common_ss.add(when: 'CONFIG_TCG', if_true: files( +if not config_all_accel.has_key('CONFIG_TCG') + subdir_done() +endif + +common_ss.add(files( 'cpu-exec-common.c', )) -tcg_specific_ss = ss.source_set() -tcg_specific_ss.add(files( +specific_ss.add(files( 'tcg-all.c', 'cpu-exec.c', 'tb-maint.c', @@ -11,24 +14,23 @@ tcg_specific_ss.add(files( 'translate-all.c', 'translator.c', )) -tcg_specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) -tcg_specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c')) +specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) +specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c')) if get_option('plugins') - tcg_specific_ss.add(files('plugin-gen.c')) + specific_ss.add(files('plugin-gen.c')) endif -specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss) -specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( +specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files( 'cputlb.c', 'watchpoint.c', )) -system_ss.add(when: ['CONFIG_TCG'], if_true: files( +system_ss.add(files( 'icount-common.c', 'monitor.c', )) -tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( +tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files( 'tcg-accel-ops.c', 'tcg-accel-ops-mttcg.c', 'tcg-accel-ops-icount.c',
If CONFIG_TCG is not defined, skip this directory calling subdir_done(). Then since we know CONFIG_TCG is defined, we don't need to check for it. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- accel/tcg/meson.build | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)