qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 00/53] Misc patches for QEMU 5.1 soft freeze


From: Claudio Fontana
Subject: Re: [PULL 00/53] Misc patches for QEMU 5.1 soft freeze
Date: Thu, 9 Jul 2020 08:59:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 7/8/20 8:41 PM, Paolo Bonzini wrote:
> 
> 
> Il mer 8 lug 2020, 20:25 Claudio Fontana <cfontana@suse.de 
> <mailto:cfontana@suse.de>> ha scritto:
> 
>     What I did notice is that all the code that directly or indirectly uses 
> the functions is under an
> 
>     if (0) (
>     )
> 
>     since tcg_enabled is the constant 0.
> 
>     By "indirectly" I mean that the static void qemu_tcg_cpu_thread_fn() 
> function that calls those is referenced only by static void 
> qemu_tcg_init_vcpu(), which is called only under an if (0),
>     ie if (tcg_enabled()).
> 
> 
> Maybe my compiler is older.
> 
>     I admit I am not familiar with the rationale of why the stubs are all 
> built regardless, could we have that icount.o from stubs/ is replacing 
> softmmu/icount.o to cause this?
> 
> 
> No, stubs are in a static library and therefore are always overridden by 
> symbols in the executable's .o files.
> 
> Paolo
> 
> 

Hi Paolo,

which compiler, linker, binutils etc are you using?

I am using

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper
OFFLOAD_TARGET_NAMES=hsa:nvptx-none
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info 
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 
--enable-languages=c,c++,objc,fortran,obj-c++,ada,go 
--enable-offload-targets=hsa,nvptx-none=/usr/nvptx-none, --without-cuda-driver 
--enable-checking=release --disable-werror 
--with-gxx-include-dir=/usr/include/c++/7 --enable-ssp --disable-libssp 
--disable-libvtv --disable-libcc1 --disable-plugin 
--with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' 
--with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new 
--disable-libstdcxx-pch --enable-version-specific-runtime-libs 
--with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex 
--enable-gnu-indirect-function --program-suffix=-7 --without-system-libunwind 
--enable-multilib --with-arch-32=x86-64 --with-tune=generic 
--build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 7.5.0 (SUSE Linux) 


$ ld -v
GNU ld (GNU Binutils; openSUSE Leap 15.1) 2.32.0.20190909-lp151.3.3

anything else that we could use to find the real problem?

Of course I can try a blind fix, where I suggest to explicitly provide the 
stubs,
or you can apply the workaround you already suggested if you want,
but currently I do not have any way to ensure that what I build is ok,
since apparently the local build or any of the CI (travis, cirrus) is not 
sufficient to capture this.

So getting to the bottom of the issue would be important going forward I think 
so I can ensure better input from my side.

In general, the way current code is relying on the compiler to (maybe) compile 
out code that calls undefined symbols,
using #define tcg_enabled 0 , and then having the undefined function calls in 
the code, seems less preferable than solving the problem explicitly
with proper refactoring or with explicit stubs until proper refactoring is 
complete..

Thanks,

Claudio

 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]