Re: modular tcg (was: Re: [PATCH v2 1/1] modules: Improve error message when module is not) found

2022-09-02 Thread Claudio Fontana
Hi all, modularization of TCG is still incomplete in my view: we need to handle the error case better. If we configure --enable-modules --enable-tcg --enable-kvm , but for some reason the .so is not present or is not loaded successfully, and kvm fails to be enabled (for example, /dev/kvm not av

[PATCH 29/29] Revert "build: temporarily disable modular tcg"

2021-08-31 Thread Gerd Hoffmann
Everything is in place now, so re-enable modular tcg builds, with alot more code actually being built modular now. Signed-off-by: Gerd Hoffmann --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index e83aa4f5c3c9..bf6378481250 100644

[PATCH 01/29] build: temporarily disable modular tcg

2021-08-31 Thread Gerd Hoffmann
Allows more fine-grained patches without breaking bisecting. Signed-off-by: Gerd Hoffmann --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index bf6378481250..e83aa4f5c3c9 100644 --- a/meson.build +++ b/meson.build @@ -94,7 +94,7 @@ en

[PATCH 4/7] tcg/module: add some infrastructure for modular tcg.

2021-08-04 Thread Gerd Hoffmann
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 H

[PATCH 0/7] tcg: some small towards more modular tcg

2021-08-04 Thread Gerd Hoffmann
Gerd Hoffmann (7): plugins: register qemu_plugin_opts using opts_init() tcg/module: move hmp.c to tcg module tcg/module: move cpu-exec-common.c from tcg_ss to specific_ss tcg/module: add some infrastructure for modular tcg. tcg/module: Add tlb_flush to TCGModuleOps tcg/module: Add

Re: modular tcg

2021-07-30 Thread Claudio Fontana
On 7/30/21 11:05 AM, Gerd Hoffmann wrote: > Hi, > > On Thu, Jul 29, 2021 at 06:40:17PM +0200, Paolo Bonzini wrote: >> On 29/07/21 11:14, Gerd Hoffmann wrote: >>> The common functions could be added TCGCPUOps to allow them being called via >>> CPUClass->tcg_ops->$name instead of a direct symbol r

Re: modular tcg

2021-07-30 Thread Gerd Hoffmann
Hi, On Thu, Jul 29, 2021 at 06:40:17PM +0200, Paolo Bonzini wrote: > On 29/07/21 11:14, Gerd Hoffmann wrote: > > The common functions could be added TCGCPUOps to allow them being called via > > CPUClass->tcg_ops->$name instead of a direct symbol reference. Not sure > > this > > is a good idea

Re: modular tcg (was: Re: [PATCH v2 1/1] modules: Improve error message when module is not) found

2021-07-29 Thread Paolo Bonzini
On 29/07/21 11:14, Gerd Hoffmann wrote: The common functions could be added TCGCPUOps to allow them being called via CPUClass->tcg_ops->$name instead of a direct symbol reference. Not sure this is a good idea though. Experimental patch covering tcg_exec_realizefn + tcg_exec_unrealizefn below.

Re: modular tcg

2021-07-29 Thread Claudio Fontana
Hi, >>>>> >>>>>> And another comment: I think we should have some progress on ARM with >>>>>> the kvm/tcg split and with the KConfig of boards, before we continue >>>>>> here. >>>>> >>>>> Why? Thi

Re: modular tcg

2021-07-29 Thread Philippe Mathieu-Daudé
e should have some progress on ARM with >>>>> the kvm/tcg split and with the KConfig of boards, before we continue >>>>> here. >>>> >>>> Why? This can easily be tacked in parallel. We can flip the switch >>>> for modular tcg per tar

Re: modular tcg

2021-07-29 Thread Claudio Fontana
tcg split and with the KConfig of boards, before we continue >>>> here. >>> >>> Why? This can easily be tacked in parallel. We can flip the switch >>> for modular tcg per target in meson.build. >>> >>> take care, >>> Gerd >>&

Re: modular tcg

2021-07-29 Thread Claudio Fontana
tcg split and with the KConfig of boards, before we continue >>>> here. >>> >>> Why? This can easily be tacked in parallel. We can flip the switch >>> for modular tcg per target in meson.build. >>> >>> take care, >>> Gerd >>&

Re: modular tcg

2021-07-29 Thread Philippe Mathieu-Daudé
. >> >> Why? This can easily be tacked in parallel. We can flip the switch >> for modular tcg per target in meson.build. >> >> take care, >> Gerd >> > > Because in the end we need to do this for ARM too and for the other archs too > (s390 is al

Re: modular tcg

2021-07-29 Thread Claudio Fontana
On 7/29/21 12:29 PM, Gerd Hoffmann wrote: > Hi, > >> And another comment: I think we should have some progress on ARM with >> the kvm/tcg split and with the KConfig of boards, before we continue >> here. > > Why? This can easily be tacked in parallel. We can fli

Re: modular tcg

2021-07-29 Thread Claudio Fontana
ic parts in my view. So you have a big >> tcg-arm module, a tcg-i386 module etc. >> >> I think I sketched already the idea in the Makefile I shared before? > > We have target-specific modules in master branch. > Used for qtest (all archs) and tcg (i386/x86_64 only, ac

Re: modular tcg

2021-07-29 Thread Gerd Hoffmann
Hi, > And another comment: I think we should have some progress on ARM with > the kvm/tcg split and with the KConfig of boards, before we continue > here. Why? This can easily be tacked in parallel. We can flip the switch for modular tcg per target in meson.build. take care, Gerd

Re: modular tcg

2021-07-29 Thread Gerd Hoffmann
86/x86_64 only, accel ops only). The build system changes to build more tcg bits modular are here: https://git.kraxel.org/cgit/qemu/log/?h=sirius/modules-tcg-meson Doesn't build due unresolved symbols, but shows which code changes/cleanups/reorganizations are needed for (more) modular tcg. take care, Gerd

Re: modular tcg

2021-07-29 Thread Claudio Fontana
On 7/29/21 11:14 AM, Gerd Hoffmann wrote: > Hi, > >>> So we need more work to make this actually work right. >> >> Yes. I want have all of tcg in the tcg accel module, not only parts of >> it, but that needs some more refactoring. I'll go start looking at this >> once I managed to wade through

Re: modular tcg

2021-07-29 Thread Claudio Fontana
On 7/29/21 11:14 AM, Gerd Hoffmann wrote: > Hi, > >>> So we need more work to make this actually work right. >> >> Yes. I want have all of tcg in the tcg accel module, not only parts of >> it, but that needs some more refactoring. I'll go start looking at this >> once I managed to wade through

modular tcg (was: Re: [PATCH v2 1/1] modules: Improve error message when module is not) found

2021-07-29 Thread Gerd Hoffmann
Hi, > > So we need more work to make this actually work right. > > Yes. I want have all of tcg in the tcg accel module, not only parts of > it, but that needs some more refactoring. I'll go start looking at this > once I managed to wade through my vacation backlog. So, changed the meson.buil

[PULL v5 07/44] disable modular TCG on Darwin

2021-07-14 Thread Alex Bennée
From: Paolo Bonzini Accelerator modularity does not work on Darwin: ld: illegal thread local variable reference to regular symbol _current_cpu for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Fix by avoiding modular TCG builds. Signed

[PATCH v2] disable modular TCG on Darwin

2021-07-12 Thread Paolo Bonzini
Accelerator modularity does not work on Darwin: ld: illegal thread local variable reference to regular symbol _current_cpu for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Fix by avoiding modular TCG builds. Signed-off-by: Paolo Bonzini

Re: [PATCH] disable modular TCG on Darwin

2021-07-12 Thread Alex Bennée
Paolo Bonzini writes: > Accelerator modularity does not work on Darwin: > > ld: illegal thread local variable reference to regular symbol _current_cpu > for architecture x86_64 > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > > Fix

[PATCH] disable modular TCG on Darwin

2021-07-12 Thread Paolo Bonzini
Accelerator modularity does not work on Darwin: ld: illegal thread local variable reference to regular symbol _current_cpu for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Fix by avoiding modular TCG builds. Signed-off-by: Paolo Bonzini