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

2020-07-09 Thread Paolo Bonzini
On 09/07/20 08:59, Claudio Fontana wrote:
> anything else that we could use to find the real problem?

I'm using

$ gcc -v
...
gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)
$ ld -v
GNU ld version 2.30-68.el8

> 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.

No problem, I can test it myself on my machine when applying the patch.

Paolo




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

2020-07-09 Thread Claudio Fontana
On 7/8/20 8:41 PM, Paolo Bonzini wrote:
> 
> 
> Il mer 8 lug 2020, 20:25 Claudio Fontana  > 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

 



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

2020-07-08 Thread Philippe Mathieu-Daudé
On 7/7/20 8:37 PM, Peter Maydell wrote:
> On Mon, 6 Jul 2020 at 17:48, Paolo Bonzini  wrote:
>>
>> The following changes since commit fc1bff958998910ec8d25db86cd2f53ff125f7ab:
>>
>>   hw/misc/pca9552: Add missing TypeInfo::class_size field (2020-06-29 
>> 21:16:10 +0100)
>>
>> are available in the Git repository at:
>>
>>   git://github.com/bonzini/qemu.git tags/for-upstream
>>
>> for you to fetch changes up to 80270507070ec73ea82741ce24cb7909a9258ea3:
>>
>>   scripts: improve message when TAP based tests fail (2020-07-06 12:14:25 
>> -0400)
>>
>> 
>> * Make checkpatch say 'qemu' instead of 'kernel' (Aleksandar)
>> * Fix PSE guests with emulated NPT (Alexander B. #1)
>> * Fix leak (Alexander B. #2)
>> * HVF fixes (Roman, Cameron)
>> * New Sapphire Rapids CPUID bits (Cathy)
>> * cpus.c and softmmu/ cleanups (Claudio)
>> * TAP driver tweaks (Daniel, Havard)
>> * object-add bugfix and testcases (Eric A.)
>> * Fix Coverity MIN_CONST and MAX_CONST (Eric B.)
>> * SSE fixes (Joseph)
>> * "-msg guest-name" option (Mario)
>> * support for AMD nested live migration (myself)
>> * Small i386 TCG fixes (myself)
>> * improved error reporting for Xen (myself)
>> * fix "-cpu host -overcommit cpu-pm=on" (myself)
>> * Add accel/Kconfig (Philippe)
>> * KVM API cleanup (Philippe)
>> * iscsi sense handling fixes (Yongji)
>> * Misc bugfixes
> 
> Hi; various build or test failures (5 total):

> 2) aarch64 and aarch32 linux:
> 
> /home/pm/qemu/target/arm/kvm.c: In function ‘kvm_arch_init’:
> /home/pm/qemu/target/arm/kvm.c:248:29: error: passing argument 1 of
> ‘kvm_check_extension’ makes integer from pointer without a cast
>  [-Werror=int-conversion]
>   248 | if (kvm_check_extension(s, KVM_CAP_ARM_NISV_TO_USER)) {
>   | ^
>   | |
>   | KVMState * {aka struct KVMState *}

I was sure I tested that on ARM hosts, so I double checked and
this code is new, merged last Saturday in 1711bfa5f5 ("target/arm: kvm:
Handle misconfigured dabt injection"), so an unfortunate merge race
problem.

> 3) PPC64 had a failure on iotest 030 (though I think this may
> be an intermittent in master):
> 
>   TESTiotest-qcow2: 030 [fail]
[...]
> +AssertionError: failed path traversal for "return" in "{'error':
> {'class': 'DeviceNotActive', 'desc': "Block job 'stream-node8' not
> found"}}"

So this is now more intermittent, and this has been reported on:
- Linux/x86
- FreeBSD/x86
- Linux/ppc64




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

2020-07-08 Thread Paolo Bonzini
On 08/07/20 18:13, Claudio Fontana wrote:
> so I don't get any tcg_get_icount_limit() compiled in, and no
> errors.
> 
> I think that having comparable configure command line and compiler
> version/flags would help me pin down any related issue.

Are you using link-time optimization by chance?

Paolo




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

2020-07-08 Thread Paolo Bonzini
On 08/07/20 18:45, Claudio Fontana wrote:
> C++ is used to link the final qemu-system binary and on my system c++ has LTO:
> 
> c++ -v
> Using built-in specs.
> COLLECT_GCC=c++
> 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) 
> 
> 
> I checked cc but did not think to check c++ . I will find a way to disable 
> this thing and will correct the patch accordingly.

Having LTO support is not the same thing as having it enabled.  Are you
compiling and linking with "-flto"?

Paolo




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

2020-07-08 Thread Paolo Bonzini
Il mer 8 lug 2020, 20:25 Claudio Fontana  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


> Thanks,
>
> Claudio
>
>
>
>


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

2020-07-08 Thread Claudio Fontana
On 7/8/20 8:25 PM, Claudio Fontana wrote:
> On 7/8/20 7:03 PM, Claudio Fontana wrote:
>> On 7/8/20 6:55 PM, Paolo Bonzini wrote:
>>> On 08/07/20 18:45, Claudio Fontana wrote:
 C++ is used to link the final qemu-system binary and on my system c++ has 
 LTO:

 c++ -v
 Using built-in specs.
 COLLECT_GCC=c++
 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) 


 I checked cc but did not think to check c++ . I will find a way to disable 
 this thing and will correct the patch accordingly.
>>>
>>> Having LTO support is not the same thing as having it enabled.  Are you
>>> compiling and linking with "-flto"?
>>>
>>> Paolo
>>>
>>
>> no, the compilation and link stage do not show this explicit parameter. I am 
>> puzzled.
>>
>> C
>>
> 
> This is really weird, as I cannot reproduce it.
> 
> 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()).
> 
> For me this builds with --disable-tcg and with --enable-tcg .
> 
> Maybe the issue is actually the name clash of the stub and the module?
> 
> 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?
> 
> Thanks,
> 
> Claudio
> 
> 

So I guess if you could Peter, are you building there with --disable-tcg or 
with --enable-tcg  when you got that error?

Ciao,

Claudio




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

2020-07-08 Thread Claudio Fontana
On 7/8/20 7:03 PM, Claudio Fontana wrote:
> On 7/8/20 6:55 PM, Paolo Bonzini wrote:
>> On 08/07/20 18:45, Claudio Fontana wrote:
>>> C++ is used to link the final qemu-system binary and on my system c++ has 
>>> LTO:
>>>
>>> c++ -v
>>> Using built-in specs.
>>> COLLECT_GCC=c++
>>> 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) 
>>>
>>>
>>> I checked cc but did not think to check c++ . I will find a way to disable 
>>> this thing and will correct the patch accordingly.
>>
>> Having LTO support is not the same thing as having it enabled.  Are you
>> compiling and linking with "-flto"?
>>
>> Paolo
>>
> 
> no, the compilation and link stage do not show this explicit parameter. I am 
> puzzled.
> 
> C
> 

This is really weird, as I cannot reproduce it.

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()).

For me this builds with --disable-tcg and with --enable-tcg .

Maybe the issue is actually the name clash of the stub and the module?

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?

Thanks,

Claudio






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

2020-07-08 Thread Claudio Fontana
On 7/8/20 6:55 PM, Paolo Bonzini wrote:
> On 08/07/20 18:45, Claudio Fontana wrote:
>> C++ is used to link the final qemu-system binary and on my system c++ has 
>> LTO:
>>
>> c++ -v
>> Using built-in specs.
>> COLLECT_GCC=c++
>> 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) 
>>
>>
>> I checked cc but did not think to check c++ . I will find a way to disable 
>> this thing and will correct the patch accordingly.
> 
> Having LTO support is not the same thing as having it enabled.  Are you
> compiling and linking with "-flto"?
> 
> Paolo
> 

no, the compilation and link stage do not show this explicit parameter. I am 
puzzled.

C






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

2020-07-08 Thread Claudio Fontana
On 7/8/20 6:16 PM, Paolo Bonzini wrote:
> On 08/07/20 18:13, Claudio Fontana wrote:
>> so I don't get any tcg_get_icount_limit() compiled in, and no
>> errors.
>>
>> I think that having comparable configure command line and compiler
>> version/flags would help me pin down any related issue.
> 
> Are you using link-time optimization by chance?
> 
> Paolo
> 

Yes unfortunately, nothing I have willingly enabled, but I found traces of LTO 
in C++.

C++ is used to link the final qemu-system binary and on my system c++ has LTO:

c++ -v
Using built-in specs.
COLLECT_GCC=c++
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) 


I checked cc but did not think to check c++ . I will find a way to disable this 
thing and will correct the patch accordingly.

Thanks a lot, and sorry for the inconvenience!

Claudio





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

2020-07-08 Thread Claudio Fontana
On 7/7/20 8:37 PM, Peter Maydell wrote:
> On Mon, 6 Jul 2020 at 17:48, Paolo Bonzini  wrote:
>>
>> The following changes since commit fc1bff958998910ec8d25db86cd2f53ff125f7ab:
>>
>>   hw/misc/pca9552: Add missing TypeInfo::class_size field (2020-06-29 
>> 21:16:10 +0100)
>>
>> are available in the Git repository at:
>>
>>   git://github.com/bonzini/qemu.git tags/for-upstream
>>
>> for you to fetch changes up to 80270507070ec73ea82741ce24cb7909a9258ea3:
>>
>>   scripts: improve message when TAP based tests fail (2020-07-06 12:14:25 
>> -0400)
>>
>> 
>> * Make checkpatch say 'qemu' instead of 'kernel' (Aleksandar)
>> * Fix PSE guests with emulated NPT (Alexander B. #1)
>> * Fix leak (Alexander B. #2)
>> * HVF fixes (Roman, Cameron)
>> * New Sapphire Rapids CPUID bits (Cathy)
>> * cpus.c and softmmu/ cleanups (Claudio)
>> * TAP driver tweaks (Daniel, Havard)
>> * object-add bugfix and testcases (Eric A.)
>> * Fix Coverity MIN_CONST and MAX_CONST (Eric B.)
>> * SSE fixes (Joseph)
>> * "-msg guest-name" option (Mario)
>> * support for AMD nested live migration (myself)
>> * Small i386 TCG fixes (myself)
>> * improved error reporting for Xen (myself)
>> * fix "-cpu host -overcommit cpu-pm=on" (myself)
>> * Add accel/Kconfig (Philippe)
>> * KVM API cleanup (Philippe)
>> * iscsi sense handling fixes (Yongji)
>> * Misc bugfixes
> 
> Hi; various build or test failures (5 total):
> 
> 1) OSX:
> 
> /Users/pm215/src/qemu-for-merges/ui/cocoa.m:1478:9: error: implicit
> declaration of function 'cpu_throttle_set' is invalid in C99 [-
> Werror,-Wimplicit-function-declaration]
> cpu_throttle_set(throttle_pct);
> ^
> 
> 2) aarch64 and aarch32 linux:
> 
> /home/pm/qemu/target/arm/kvm.c: In function ‘kvm_arch_init’:
> /home/pm/qemu/target/arm/kvm.c:248:29: error: passing argument 1 of
> ‘kvm_check_extension’ makes integer from pointer without a cast
>  [-Werror=int-conversion]
>   248 | if (kvm_check_extension(s, KVM_CAP_ARM_NISV_TO_USER)) {
>   | ^
>   | |
>   | KVMState * {aka struct KVMState *}
> In file included from /home/pm/qemu/target/arm/kvm.c:23:
> /home/pm/qemu/include/sysemu/kvm.h:439:38: note: expected ‘unsigned
> int’ but argument is of type ‘KVMState *’ {aka ‘struct KVMState
>  *’}
>   439 | int kvm_check_extension(unsigned int extension);
>   | ~^
> /home/pm/qemu/target/arm/kvm.c:248:9: error: too many arguments to
> function ‘kvm_check_extension’
>   248 | if (kvm_check_extension(s, KVM_CAP_ARM_NISV_TO_USER)) {
>   | ^~~
> In file included from /home/pm/qemu/target/arm/kvm.c:23:
> /home/pm/qemu/include/sysemu/kvm.h:439:5: note: declared here
>   439 | int kvm_check_extension(unsigned int extension);
>   | ^~~
> /home/pm/qemu/target/arm/kvm.c:253:59: error: passing argument 1 of
> ‘kvm_check_extension’ makes integer from pointer without a cast
>  [-Werror=int-conversion]
>   253 | cap_has_inject_ext_dabt = kvm_check_extension(s,
>   |   ^
>   |   |
>   |
> KVMState * {aka struct KVMState *}
> In file included from /home/pm/qemu/target/arm/kvm.c:23:
> /home/pm/qemu/include/sysemu/kvm.h:439:38: note: expected ‘unsigned
> int’ but argument is of type ‘KVMState *’ {aka ‘struct KVMState
>  *’}
>   439 | int kvm_check_extension(unsigned int extension);
>   | ~^
> /home/pm/qemu/target/arm/kvm.c:253:39: error: too many arguments to
> function ‘kvm_check_extension’
>   253 | cap_has_inject_ext_dabt = kvm_check_extension(s,
>   |   ^~~
> In file included from /home/pm/qemu/target/arm/kvm.c:23:
> /home/pm/qemu/include/sysemu/kvm.h:439:5: note: declared here
>   439 | int kvm_check_extension(unsigned int extension);
>   | ^~~
> 
> 3) PPC64 had a failure on iotest 030 (though I think this may
> be an intermittent in master):
> 
>   TESTiotest-qcow2: 030 [fail]
> QEMU  --
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../ppc64-softmmu/qemu-system-ppc64"
> -nodefaults -display none -accel qtest
> QEMU_IMG  -- 
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-img"
> QEMU_IO   --
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-io"  --cache
> writeback --aio threads -f qcow2
> QEMU_NBD  -- 
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT-- qcow2 (compat=1.1)
> IMGPROTO  -- file
> PLATFORM  -- Linux/ppc64 gcc1-power7 3.10.0-862.14.4.el7.ppc64
> TEST_DIR  -- /home/pm215/qemu/build/all/tests/qemu-iotests/scratch
> SOCK_DIR  -- /tmp/tmp.icAW30swbG
> SOCKET_SCM_HELPER --
> 

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

2020-07-07 Thread Paolo Bonzini
Il mar 7 lug 2020, 20:42 Peter Maydell  ha
scritto:

> Also it broke my working tree, in the sense that when I
> rolled back to current master incremental-rebuild didn't
> work but instead failed with:
>
> make: *** No rule to make target '/home/ubuntu/qemu/Kconfig', needed
> by 'aarch64-softmmu/config-devices.mak'.  Stop.
>

The latter is unfortunately expected. I am curious about the s390 failure
and especially the x86 link failure which might be a semantic conflict. I
will try to reproduce them locally.

Paolo

>
> thanks
> -- PMM
>
>


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

2020-07-07 Thread Peter Maydell
On Tue, 7 Jul 2020 at 19:37, Peter Maydell  wrote:
>
> On Mon, 6 Jul 2020 at 17:48, Paolo Bonzini  wrote:
> >
> > The following changes since commit fc1bff958998910ec8d25db86cd2f53ff125f7ab:
> >
> >   hw/misc/pca9552: Add missing TypeInfo::class_size field (2020-06-29 
> > 21:16:10 +0100)
> >
> > are available in the Git repository at:
> >
> >   git://github.com/bonzini/qemu.git tags/for-upstream
> >
> > for you to fetch changes up to 80270507070ec73ea82741ce24cb7909a9258ea3:
> >
> >   scripts: improve message when TAP based tests fail (2020-07-06 12:14:25 
> > -0400)
> >
> > 
> > * Make checkpatch say 'qemu' instead of 'kernel' (Aleksandar)
> > * Fix PSE guests with emulated NPT (Alexander B. #1)
> > * Fix leak (Alexander B. #2)
> > * HVF fixes (Roman, Cameron)
> > * New Sapphire Rapids CPUID bits (Cathy)
> > * cpus.c and softmmu/ cleanups (Claudio)
> > * TAP driver tweaks (Daniel, Havard)
> > * object-add bugfix and testcases (Eric A.)
> > * Fix Coverity MIN_CONST and MAX_CONST (Eric B.)
> > * SSE fixes (Joseph)
> > * "-msg guest-name" option (Mario)
> > * support for AMD nested live migration (myself)
> > * Small i386 TCG fixes (myself)
> > * improved error reporting for Xen (myself)
> > * fix "-cpu host -overcommit cpu-pm=on" (myself)
> > * Add accel/Kconfig (Philippe)
> > * KVM API cleanup (Philippe)
> > * iscsi sense handling fixes (Yongji)
> > * Misc bugfixes
>
> Hi; various build or test failures (5 total):

Also it broke my working tree, in the sense that when I
rolled back to current master incremental-rebuild didn't
work but instead failed with:

make: *** No rule to make target '/home/ubuntu/qemu/Kconfig', needed
by 'aarch64-softmmu/config-devices.mak'.  Stop.

thanks
-- PMM



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

2020-07-07 Thread Peter Maydell
On Mon, 6 Jul 2020 at 17:48, Paolo Bonzini  wrote:
>
> The following changes since commit fc1bff958998910ec8d25db86cd2f53ff125f7ab:
>
>   hw/misc/pca9552: Add missing TypeInfo::class_size field (2020-06-29 
> 21:16:10 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 80270507070ec73ea82741ce24cb7909a9258ea3:
>
>   scripts: improve message when TAP based tests fail (2020-07-06 12:14:25 
> -0400)
>
> 
> * Make checkpatch say 'qemu' instead of 'kernel' (Aleksandar)
> * Fix PSE guests with emulated NPT (Alexander B. #1)
> * Fix leak (Alexander B. #2)
> * HVF fixes (Roman, Cameron)
> * New Sapphire Rapids CPUID bits (Cathy)
> * cpus.c and softmmu/ cleanups (Claudio)
> * TAP driver tweaks (Daniel, Havard)
> * object-add bugfix and testcases (Eric A.)
> * Fix Coverity MIN_CONST and MAX_CONST (Eric B.)
> * SSE fixes (Joseph)
> * "-msg guest-name" option (Mario)
> * support for AMD nested live migration (myself)
> * Small i386 TCG fixes (myself)
> * improved error reporting for Xen (myself)
> * fix "-cpu host -overcommit cpu-pm=on" (myself)
> * Add accel/Kconfig (Philippe)
> * KVM API cleanup (Philippe)
> * iscsi sense handling fixes (Yongji)
> * Misc bugfixes

Hi; various build or test failures (5 total):

1) OSX:

/Users/pm215/src/qemu-for-merges/ui/cocoa.m:1478:9: error: implicit
declaration of function 'cpu_throttle_set' is invalid in C99 [-
Werror,-Wimplicit-function-declaration]
cpu_throttle_set(throttle_pct);
^

2) aarch64 and aarch32 linux:

/home/pm/qemu/target/arm/kvm.c: In function ‘kvm_arch_init’:
/home/pm/qemu/target/arm/kvm.c:248:29: error: passing argument 1 of
‘kvm_check_extension’ makes integer from pointer without a cast
 [-Werror=int-conversion]
  248 | if (kvm_check_extension(s, KVM_CAP_ARM_NISV_TO_USER)) {
  | ^
  | |
  | KVMState * {aka struct KVMState *}
In file included from /home/pm/qemu/target/arm/kvm.c:23:
/home/pm/qemu/include/sysemu/kvm.h:439:38: note: expected ‘unsigned
int’ but argument is of type ‘KVMState *’ {aka ‘struct KVMState
 *’}
  439 | int kvm_check_extension(unsigned int extension);
  | ~^
/home/pm/qemu/target/arm/kvm.c:248:9: error: too many arguments to
function ‘kvm_check_extension’
  248 | if (kvm_check_extension(s, KVM_CAP_ARM_NISV_TO_USER)) {
  | ^~~
In file included from /home/pm/qemu/target/arm/kvm.c:23:
/home/pm/qemu/include/sysemu/kvm.h:439:5: note: declared here
  439 | int kvm_check_extension(unsigned int extension);
  | ^~~
/home/pm/qemu/target/arm/kvm.c:253:59: error: passing argument 1 of
‘kvm_check_extension’ makes integer from pointer without a cast
 [-Werror=int-conversion]
  253 | cap_has_inject_ext_dabt = kvm_check_extension(s,
  |   ^
  |   |
  |
KVMState * {aka struct KVMState *}
In file included from /home/pm/qemu/target/arm/kvm.c:23:
/home/pm/qemu/include/sysemu/kvm.h:439:38: note: expected ‘unsigned
int’ but argument is of type ‘KVMState *’ {aka ‘struct KVMState
 *’}
  439 | int kvm_check_extension(unsigned int extension);
  | ~^
/home/pm/qemu/target/arm/kvm.c:253:39: error: too many arguments to
function ‘kvm_check_extension’
  253 | cap_has_inject_ext_dabt = kvm_check_extension(s,
  |   ^~~
In file included from /home/pm/qemu/target/arm/kvm.c:23:
/home/pm/qemu/include/sysemu/kvm.h:439:5: note: declared here
  439 | int kvm_check_extension(unsigned int extension);
  | ^~~

3) PPC64 had a failure on iotest 030 (though I think this may
be an intermittent in master):

  TESTiotest-qcow2: 030 [fail]
QEMU  --
"/home/pm215/qemu/build/all/tests/qemu-iotests/../../ppc64-softmmu/qemu-system-ppc64"
-nodefaults -display none -accel qtest
QEMU_IMG  -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-img"
QEMU_IO   --
"/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-io"  --cache
writeback --aio threads -f qcow2
QEMU_NBD  -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-nbd"
IMGFMT-- qcow2 (compat=1.1)
IMGPROTO  -- file
PLATFORM  -- Linux/ppc64 gcc1-power7 3.10.0-862.14.4.el7.ppc64
TEST_DIR  -- /home/pm215/qemu/build/all/tests/qemu-iotests/scratch
SOCK_DIR  -- /tmp/tmp.icAW30swbG
SOCKET_SCM_HELPER --
/home/pm215/qemu/build/all/tests/qemu-iotests/socket_scm_helper

--- /home/pm215/qemu/tests/qemu-iotests/030.out 2019-07-15
15:12:04.941863802 +
+++ /home/pm215/qemu/build/all/tests/qemu-iotests/030.out.bad
2020-07-07 18:01:06.975652394 +

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

2020-07-06 Thread no-reply
Patchew URL: 
https://patchew.org/QEMU/20200706164155.24696-1-pbonz...@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PULL 00/53] Misc patches for QEMU 5.1 soft freeze
Type: series
Message-id: 20200706164155.24696-1-pbonz...@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]  patchew/20200630133912.9428-1-f4...@amsat.org -> 
patchew/20200630133912.9428-1-f4...@amsat.org
 - [tag update]  patchew/20200704144943.18292-1-f4...@amsat.org -> 
patchew/20200704144943.18292-1-f4...@amsat.org
 * [new tag] patchew/20200706164155.24696-1-pbonz...@redhat.com -> 
patchew/20200706164155.24696-1-pbonz...@redhat.com
Switched to a new branch 'test'
7f86007 scripts: improve message when TAP based tests fail
7248fcd target/i386: Enable TSX Suspend Load Address Tracking feature
866c9c9 target/i386: Add SERIALIZE cpu feature
167c040 target/i386/kvm: Simplify kvm_get_supported_[feature]_msrs()
c84e280 target/i386/kvm: Simplify kvm_get_mce_cap_supported()
4307708 target/i386/kvm: Simplify get_para_features()
35ba753 accel/kvm: Simplify kvm_check_extension_list()
658563b accel/kvm: Simplify kvm_check_extension()
7c2d8c7 accel/kvm: Let kvm_check_extension use global KVM state
4f09921 softmmu/vl: Remove the check for colons in -accel parameters
aae19bd cpu-timers, icount: new modules
d4c3bd1 cpu-throttle: new module, extracted from cpus.c
3f0a1ca softmmu: move softmmu only files from root
0f5f394 pc: fix leak in pc_system_flash_cleanup_unused
d14fbbb cpus: Move CPU code from exec.c to cpus-common.c
6b5e15e target/i386: Correct the warning message of Intel PT
06d34e2 checkpatch: Change occurences of 'kernel' to 'qemu' in user messages
a797e70 iscsi: return -EIO when sense fields are meaningless
483b353 iscsi: handle check condition status in retry loop
45968d9 target/i386: sev: fail query-sev-capabilities if QEMU cannot use SEV
3991cda target/i386: sev: provide proper error reporting for 
query-sev-capabilities
56fee26 KVM: x86: believe what KVM says about WAITPKG
c2cad97 target/i386: implement undocumented "smsw r32" behavior
0820d30 target/i386: remove gen_io_end
a808c08e Makefile: simplify MINIKCONF rules
492710d accel/tcg: Add stub for probe_access()
9968331 accel/Kconfig: Add the TCG selector
15af609 accel/Kconfig: Extract accel selectors into their own config
f2c9a72 Makefile: Write MINIKCONF variables as one entry per line
e34b354 Makefile: Remove dangerous EOL trailing backslash
e8ca3d5 MAINTAINERS: Cover the HAX accelerator stub
5cf8ecc MAINTAINERS: Add an 'overall' entry for accelerators
828b5c8 MAINTAINERS: Fix KVM path expansion glob
2b33834 MAINTAINERS: Add Cameron as HVF co-maintainer
f83bafe i386: hvf: Clean up synchronize functions
5546118 i386: hvf: Don't duplicate register reset
0100693 i386: hvf: Move Guest LMA reset to macvm_set_cr0()
50ad1f9 i386: hvf: Make long mode enter and exit clearer
7391fcc i386: hvf: Add hvf_cpu_synchronize_pre_loadvm()
d9b7a7b i386: hvf: Move synchronize functions to sysemu
76f44ff i386: hvf: Set env->eip in macvm_set_rip()
4a75f22 coverity: provide Coverity-friendly MIN_CONST and MAX_CONST
8928cb9 KVM: add support for AMD nested live migration
89f8144 target/i386: fix IEEE SSE floating-point exception raising
9140f0b target/i386: set SSE FTZ in correct floating-point state
d38f9f1 hw/core/null-machine: Do not initialize unused chardev backends
c9a48de tests/qmp-cmd-test: Add qmp/object-add-failure-modes
704157d tests/qmp-cmd-test: Add qmp/object-add-duplicate-id
ddc8b9c qom: Introduce object_property_try_add_child()
82cfec7 util/qemu-error: prepend guest name to error message to identify 
affected VM owner
af648d9 tests: Inject test name also when the test fails
033c1b7 tcg/svm: use host cr4 during NPT page table walk

=== OUTPUT BEGIN ===
1/52 Checking commit 033c1b717196 (tcg/svm: use host cr4 during NPT page table 
walk)
2/52 Checking commit af648d9d91aa (tests: Inject test name also when the test 
fails)
3/52 Checking commit 82cfec7d2eab (util/qemu-error: prepend guest name to error 
message to identify affected VM owner)
4/52 Checking commit ddc8b9c5389f (qom: Introduce 
object_property_try_add_child())
5/52 Checking commit 704157dd905c (tests/qmp-cmd-test: Add 
qmp/object-add-duplicate-id)
6/52 Checking commit c9a48de829c1 (tests/qmp-cmd-test: Add 
qmp/object-add-failure-modes)
7/52 Checking commit d38f9f107573 (hw/core/null-machine: Do not initialize 
unused chardev backends)
8/52 Checking commit 9140f0b9bb43 (target/i386: set SSE FTZ in correct 
floating-point state)
9/52 Checking commit 89f8144f4e84 (target/i386: fix IEEE SSE floating-point 
exception