On 4/20/21 2:54 PM, David Hildenbrand wrote: > On 20.04.21 12:36, Claudio Fontana wrote: >> now that we protect all calls to the tcg-specific functions >> with if (tcg_enabled()), we do not need the TCG stub anymore. > > You need compile-time checks, not runtime checks. Any calls have to be > protected by #ifdef, otherwise the compiler might bail out.
This is not true though, tcg_enabled() is #defined as 0 if tcg is not enabled. #define kvm_enabled() (0) Compiler will elide the code if after the preprocessor pass the code is: if (0) { } It adds the benefit of actually checking the syntax of the code inside. As long as the prototypes are in sight, we rely on this for i386 and ARM already, to avoid accumulating stubs. > > Maybe you just wanted to state it differently in this patch description. > Thanks, Claudio