[PULL 06/13] semihosting: Don't return negative values on qemu_semihosting_console_write() failure

2022-07-29 Thread Alex Bennée
From: Peter Maydell The documentation comment for qemu_semihosting_console_write() says * Returns: number of bytes written -- this should only ever be short * on some sort of i/o error. and the callsites rely on this. However, the implementation code path which sends console output to a

Re: virtio: why no full reset on virtio_set_status 0 ?

2022-07-29 Thread Claudio Fontana
On 7/29/22 12:13, Michael S. Tsirkin wrote: > On Fri, Jul 29, 2022 at 11:46:05AM +0200, Claudio Fontana wrote: @@ -2025,7 +2031,6 @@ void virtio_reset(void *opaque) VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); int i; -virtio_set_status(vdev, 0);

[PULL 05/13] .gitlab-ci.d/windows.yml: Enable native Windows symlink

2022-07-29 Thread Alex Bennée
From: Bin Meng The following error message was seen during the configure: "ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory" By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if does not

[PULL 01/13] tests: refresh to latest libvirt-ci module

2022-07-29 Thread Alex Bennée
From: Daniel P. Berrangé Notable changes: - libvirt-ci source tree was re-arranged, so the script we run now lives in a bin/ sub-dir - opensuse 15.2 is replaced by opensuse 15.3 - libslirp is temporarily dropped on opensuse as the libslirp-version.h is broken

[PATCH v1 2/2] hw/loongarch: Change macro name 'LS7A_XXX' to 'VIRT_XXX'

2022-07-29 Thread Xiaojuan Yang
Change macro name 'LS7A_XXX' to 'VIRT_XXX', as the loongarch virt machinue use the GPEX bridge instead of LS7A bridge. So the macro name should keep consistency. Signed-off-by: Xiaojuan Yang --- hw/loongarch/acpi-build.c | 18 ++-- hw/loongarch/virt.c | 56

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-07-29 Thread Igor Mammedov
On Thu, 28 Jul 2022 16:04:58 +0100 Peter Maydell wrote: > On Thu, 28 Jul 2022 at 15:44, Dr. David Alan Gilbert > wrote: > > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > QEMU crashes trying to save VMSTATE when only MIPS target are compiled in > > > $ qemu-system-mips -monitor

Re: [PATCH 1/1] block: add missed block_acct_setup with new block device init procedure

2022-07-29 Thread Kevin Wolf
Am 28.07.2022 um 21:27 hat Denis V. Lunev geschrieben: > On 28.07.2022 16:42, Vladimir Sementsov-Ogievskiy wrote: > > On 7/11/22 14:07, Denis V. Lunev wrote: > > > Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from > > > the first glance, but it has changed things a lot.

[PULL 13/13] qemu-options: bring the kernel and image options together

2022-07-29 Thread Alex Bennée
How to control the booting of QEMU is often a source of confusion for users. Bring the options that control this together in the manual pages and add some verbiage to describe when each option is appropriate. This attempts to codify some of the knowledge expressed in:

[PULL 11/13] tests/tcg/s390x: Test unaligned accesses to lowcore

2022-07-29 Thread Alex Bennée
From: Ilya Leoshkevich Add a small test to avoid regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Richard Henderson Acked-by: Thomas Huth Message-Id: <20220725223746.227063-3-...@linux.ibm.com> Signed-off-by: Alex Bennée diff --git a/tests/tcg/s390x/Makefile.softmmu-target

[PULL 09/13] semihosting: Fix handling of buffer in TARGET_SYS_TMPNAM

2022-07-29 Thread Alex Bennée
From: Peter Maydell The TARGET_SYS_TMPNAM implementation has two bugs spotted by Coverity: * confusion about whether 'len' has the length of the string including or excluding the terminating NUL means we lock_user() len bytes of memory but memcpy() len + 1 bytes * In the error-exit cases

Re: [RFC PATCH v4 18/36] i386/tdx: Skip BIOS shadowing setup

2022-07-29 Thread Xiaoyao Li
On 5/30/2022 7:49 PM, Gerd Hoffmann wrote: On Thu, May 26, 2022 at 10:48:56AM +0800, Xiaoyao Li wrote: On 5/24/2022 3:08 PM, Gerd Hoffmann wrote: On Thu, May 12, 2022 at 11:17:45AM +0800, Xiaoyao Li wrote: TDX guest cannot go to real mode, so just skip the setup of isa-bios. Does isa-bios

[PATCH v1 0/2] Change 'loongson3.XXX' file name and 'LS7A_XXX' macro name

2022-07-29 Thread Xiaojuan Yang
This series change 'loongson3.XXX' file name and 'LS7A_XXX' macro name. Changes for v1: 1. Rename 'loongson3.c' to 'virt.c' and change the meson.build file. 2. Rename 'loongson3.rst' to 'virt.rst'. 3. Change macro name 'LS7A_XXX' to 'VIRT_XXX'. Xiaojuan Yang (2): hw/loongarch: Rename file

[PULL 02/13] gitlab: show testlog.txt contents when cirrus/custom-runner jobs fail

2022-07-29 Thread Alex Bennée
From: Daniel P. Berrangé When tests fail meson just displays a summary and tells you to look at the testlog.txt file for details. The native jobs on shared runners publish testlog.txt as an artifact. For the Cirrus jobs and custom runner jobs this is not currently possible. The best we can do is

[PULL 10/13] qapi: Add exit-failure PanicAction

2022-07-29 Thread Alex Bennée
From: Ilya Leoshkevich Currently QEMU exits with code 0 on both panic an shutdown. For tests it is useful to return 1 on panic, so that it counts as a test failure. Introduce a new exit-failure PanicAction that makes main() return EXIT_FAILURE. Tests can use -action panic=exit-failure option to

[PULL 07/13] semihosting: Don't copy buffer after console_write()

2022-07-29 Thread Alex Bennée
From: Peter Maydell The console_write() semihosting function outputs guest data from a buffer; it doesn't update that buffer. It therefore doesn't need to pass a length value to unlock_user(), but can pass 0, meaning "do not copy any data back to the guest memory". Signed-off-by: Peter Maydell

Re: virtio: why no full reset on virtio_set_status 0 ?

2022-07-29 Thread Michael S. Tsirkin
On Fri, Jul 29, 2022 at 11:46:05AM +0200, Claudio Fontana wrote: > >> @@ -2025,7 +2031,6 @@ void virtio_reset(void *opaque) > >> VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); > >> int i; > >> > >> -virtio_set_status(vdev, 0); > >> if (current_cpu) { > >> /*

[PATCH v1 1/2] hw/loongarch: Rename file 'loongson3.XXX' to 'virt.XXX'

2022-07-29 Thread Xiaojuan Yang
1. Rename 'loongson3.c' to 'virt.c' and change the meson.build file. 2. Rename 'loongson3.rst' to 'virt.rst'. Signed-off-by: Xiaojuan Yang --- MAINTAINERS | 2 +- hw/loongarch/meson.build | 2 +- hw/loongarch/{loongson3.c => virt.c} | 0

[PULL 04/13] .cirrus.yml: Change winsymlinks to 'native'

2022-07-29 Thread Alex Bennée
From: Bin Meng At present winsymlinks is set to 'nativestrict', and its behavior is: a) if native symlinks are enabled and exists, creates as a native Windows symlink; b) else if native symlinks are not enabled or if does not exist, 'ln -s' fails. This causes the following

[PULL 03/13] gitlab: drop 'containers-layer2' stage

2022-07-29 Thread Alex Bennée
From: Daniel P. Berrangé Since we express dependencies via a 'needs' clause, we don't need to split container builds into separate stages. GitLab happily lets jobs depend on other jobs in the same stage and will run them when possible. Acked-by: Thomas Huth Signed-off-by: Daniel P. Berrangé

Re: virtio: why no full reset on virtio_set_status 0 ?

2022-07-29 Thread Claudio Fontana
On 7/28/22 15:39, Michael S. Tsirkin wrote: > On Thu, Jul 28, 2022 at 11:09:15AM +0200, Claudio Fontana wrote: >> On 7/28/22 09:43, Claudio Fontana wrote: >>> On 7/28/22 03:27, Jason Wang wrote: On Wed, Jul 27, 2022 at 11:32 PM Michael S. Tsirkin wrote: > > On Wed, Jul 27, 2022

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-07-29 Thread Peter Maydell
On Fri, 29 Jul 2022 at 10:57, Igor Mammedov wrote: > > On Thu, 28 Jul 2022 16:12:34 +0100 > Peter Maydell wrote: > > > On Thu, 28 Jul 2022 at 16:09, Dr. David Alan Gilbert > > wrote: > > > > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > > On Thu, 28 Jul 2022 15:44:20 +0100 > > > > "Dr.

[PULL 08/13] semihosting: Check for errors on SET_ARG()

2022-07-29 Thread Alex Bennée
From: Peter Maydell The SET_ARG() macro returns an error indication; we check this in the TARGET_SYS_GET_CMDLINE case but not when we use it in implementing TARGET_SYS_ELAPSED. Check for and handle the errors via the do_fault codepath, and update the comment documenting the SET_ARG() and

[PULL 00/13] testing, semihosting and doc fixes

2022-07-29 Thread Alex Bennée
The following changes since commit cc42559ab129a15554cc485ea9265e34dde7ab5b: Merge tag 'pull-ppc-20220728' of https://gitlab.com/danielhb/qemu into staging (2022-07-28 15:06:42 -0700) are available in the Git repository at: https://github.com/stsquad/qemu.git

[PULL 12/13] docs/devel: fix description of OBJECT_DECLARE_SIMPLE_TYPE

2022-07-29 Thread Alex Bennée
Since 30b5707c26 (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) we don't need the additional two parameters. Fix the documentation. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id:

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-07-29 Thread Igor Mammedov
On Thu, 28 Jul 2022 16:12:34 +0100 Peter Maydell wrote: > On Thu, 28 Jul 2022 at 16:09, Dr. David Alan Gilbert > wrote: > > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > On Thu, 28 Jul 2022 15:44:20 +0100 > > > "Dr. David Alan Gilbert" wrote: > > > > > > > * Igor Mammedov

Re: [PATCH] linux-user: Don't assume 0 is not a valid host timer_t value

2022-07-29 Thread Peter Maydell
On Tue, 26 Jul 2022 at 23:13, Jon Alduan wrote: > > Hello Peter, > > I can say so far, your patch solved the issue! Great thanks for that! > > Regarding the libc version: > From my WSL2 Ubuntu 21.04 x86_64: > $ ls -l /lib32/libc* > -rwxr-xr-x 1 root root 2042632 Mar 31 2021 /lib32/libc-2.33.so >

[RFC v2 03/10] static-analyzer: Support adding tests to checks

2022-07-29 Thread Alberto Faria
Introduce an add_check_tests() method to add output-comparison tests to checks, and add some tests to the "return-value-never-used" check. Signed-off-by: Alberto Faria --- static-analyzer.py | 133 - static_analyzer/__init__.py| 39

[RFC v2 09/10] block: Add no_coroutine_fn marker

2022-07-29 Thread Alberto Faria
When applied to a function, it advertises that it should not be called from coroutine_fn functions. Make generated_co_wrapper evaluate to no_coroutine_fn, as coroutine_fn functions should instead directly call the coroutine_fn that backs the generated_co_wrapper. Add a "no_coroutine_fn" check to

Re: [PATCH v2] ci: Upgrade msys2 release to 20220603

2022-07-29 Thread Alex Bennée
Yonggang Luo writes: > Signed-off-by: Yonggang Luo > --- > .cirrus.yml | 2 +- > .gitlab-ci.d/windows.yml | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Queued to testing/next, thanks. -- Alex Bennée

Re: [PATCH] linux-user: Do not treat madvise()'s advice as a bitmask

2022-07-29 Thread Laurent Vivier
Le 25/07/2022 à 15:41, Ilya Leoshkevich a écrit : Advice is enum, not flags. Doing (advice & MADV_DONTNEED) also matches e.g. MADV_MERGEABLE. Signed-off-by: Ilya Leoshkevich --- linux-user/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/mmap.c

[Bug 1921664] Re: Coroutines are racy for risc64 emu on arm64 - crash on Assertion

2022-07-29 Thread Paride Legovini
I am consistently hitting this when trying to install the Ubuntu arm64 ISO image in a VM. A minimal command line that reproduces the problem is (host system is jammy arm64): qemu-system-aarch64 -enable-kvm -m 2048 -M virt -cpu host -nographic -drive file=flash0.img,if=pflash,format=raw -drive

Re: [PATCH v10 02/21] job.h: categorize fields in struct Job

2022-07-29 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Categorize the fields in struct Job to understand which ones > need to be protected by the job mutex and which don't. > > Signed-off-by: Emanuele Giuseppe Esposito > Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by:

[RFC v2 00/10] Introduce an extensible static analyzer

2022-07-29 Thread Alberto Faria
This series introduces a static analyzer for QEMU. It consists of a single static-analyzer.py script that relies on libclang's Python bindings, and provides a common framework on which arbitrary static analysis checks can be developed and run against QEMU's code base. Summary of the series: -

[RFC v2 05/10] static-analyzer: Enforce coroutine_fn restrictions for direct calls

2022-07-29 Thread Alberto Faria
Add a "coroutine_fn" check to static-analyzer.py that ensures that non-coroutine_fn functions don't perform direct calls to coroutine_fn functions. For the few cases where this must happen, introduce an __allow_coroutine_fn_call() macro that wraps offending calls and overrides the static

[RFC v2 06/10] Fix some direct calls from non-coroutine_fn to coroutine_fn

2022-07-29 Thread Alberto Faria
In some cases we need to use a different function, in others we need to make the caller a coroutine_fn, and in others still we need to wrap calls to coroutines in __allow_coroutine_fn_call(). Also fix coroutine_fn annotation disagreements between several declarations of the same function. These

[Bug 1921664] Re: Coroutines are racy for risc64 emu on arm64 - crash on Assertion

2022-07-29 Thread Thomas Huth
Upstream QEMU bugs are now tracked on https://gitlab.com/qemu- project/qemu/-/issues - so if you can reproduce it with the latest version from upstream QEMU, please report it there. ** No longer affects: qemu -- You received this bug notification because you are a member of qemu- devel-ml,

Re: [PULL 06/30] softmmu/dirtylimit: Implement virtual CPU throttle

2022-07-29 Thread Peter Maydell
On Wed, 20 Jul 2022 at 12:30, Dr. David Alan Gilbert (git) wrote: > > From: Hyman Huang(黄勇) > > Setup a negative feedback system when vCPU thread > handling KVM_EXIT_DIRTY_RING_FULL exit by introducing > throttle_us_per_full field in struct CPUState. Sleep > throttle_us_per_full microseconds to

Re: [PULL V2 25/25] net/colo.c: fix segmentation fault when packet is not parsed correctly

2022-07-29 Thread Peter Maydell
On Wed, 20 Jul 2022 at 10:04, Jason Wang wrote: > > From: Zhang Chen > > When COLO use only one vnet_hdr_support parameter between > filter-redirector and filter-mirror(or colo-compare), COLO will crash > with segmentation fault. Back track as follow: > > Thread 1 "qemu-system-x86" received

Re: [PULL 02/60] semihosting: Return failure from softmmu-uaccess.h functions

2022-07-29 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:54, Richard Henderson wrote: > > We were reporting unconditional success for these functions; > pass on any failure from cpu_memory_rw_debug. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson So, this commit makes us check the cpu_memory_rw_debug()

Re: [RFC 0/3] Add Generic SPI GPIO model

2022-07-29 Thread Patrick Williams
On Fri, Jul 29, 2022 at 03:25:55PM +0200, Cédric Le Goater wrote: > Hello Iris, > > On 7/29/22 01:23, Iris Chen wrote: > > MOSI pin in spi_gpio: the mosi pin is not included and we poll the realtime > > value > > of the gpio for input bits to prevent bugs with caching the mosi value. It > >

[RFC v2 02/10] Drop unused static function return values

2022-07-29 Thread Alberto Faria
Make non-void static functions whose return values are ignored by all callers return void instead. These functions were found by static-analyzer.py. Not all occurrences of this problem were fixed. Signed-off-by: Alberto Faria --- accel/kvm/kvm-all.c | 12 ++---

[RFC v2 01/10] Add an extensible static analyzer

2022-07-29 Thread Alberto Faria
Add a static-analyzer.py script that uses libclang's Python bindings to provide a common framework on which arbitrary static analysis checks can be developed and run against QEMU's code base. As an example, a simple "return-value-never-used" check is included that verifies that the return value

[RFC v2 07/10] static-analyzer: Enforce coroutine_fn restrictions on function pointers

2022-07-29 Thread Alberto Faria
Extend static-analyzer.py's "coroutine_fn" check to enforce coroutine_fn restrictions on function pointer operations. Invalid operations include assigning a coroutine_fn value to a non-coroutine_fn function pointer, and invoking a coroutine_fn function pointer from a non-coroutine_fn function.

[PATCH] virtiofsd: Disable killpriv_v2 by default

2022-07-29 Thread Vivek Goyal
We are having bunch of issues with killpriv_v2 enabled by default. First of all it relies on clearing suid/sgid bits as needed by dropping capability CAP_FSETID. This does not work for remote filesystems like NFS (and possibly others). Secondly, we are noticing other issues related to clearing

Re: virtio: why no full reset on virtio_set_status 0 ?

2022-07-29 Thread Alex Bennée
Claudio Fontana writes: > On 7/29/22 12:13, Michael S. Tsirkin wrote: >> On Fri, Jul 29, 2022 at 11:46:05AM +0200, Claudio Fontana wrote: > @@ -2025,7 +2031,6 @@ void virtio_reset(void *opaque) > VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); > int i; > >

Re: [RFC 0/3] Add Generic SPI GPIO model

2022-07-29 Thread Cédric Le Goater
Hello Iris, On 7/29/22 01:23, Iris Chen wrote: Hey everyone, I have been working on a project to add support for SPI-based TPMs in QEMU. Currently, most of our vboot platforms using a SPI-based TPM use the Linux SPI-GPIO driver to "bit-bang" the SPI protocol. This is because the Aspeed SPI

Re: [PATCH v10 05/21] job.c: add job_lock/unlock while keeping job.h intact

2022-07-29 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > With "intact" we mean that all job.h functions implicitly > take the lock. Therefore API callers are unmodified. > > This means that: > - many static functions that will be always called with job lock held > become _locked,

Re: virtio: why no full reset on virtio_set_status 0 ?

2022-07-29 Thread Claudio Fontana
On 7/29/22 15:21, Alex Bennée wrote: > > Claudio Fontana writes: > >> On 7/29/22 12:13, Michael S. Tsirkin wrote: >>> On Fri, Jul 29, 2022 at 11:46:05AM +0200, Claudio Fontana wrote: >> @@ -2025,7 +2031,6 @@ void virtio_reset(void *opaque) >> VirtioDeviceClass *k =

Re: [PATCH v6 3/5] target/riscv: smstateen check for fcsr

2022-07-29 Thread Mayuresh Chitale
On Thu, 2022-07-28 at 09:09 +0100, Ben Dooks wrote: > On 28/07/2022 07:15, Mayuresh Chitale wrote: > > On Mon, 2022-07-25 at 15:23 +0800, Weiwei Li wrote: > > > 在 2022/7/24 下午11:49, Mayuresh Chitale 写道: > > > > On Fri, 2022-07-22 at 09:42 +0800, Weiwei Li wrote: > > > > > 在 2022/7/21 下午11:31,

Re: [PATCH 1/1] block: add missed block_acct_setup with new block device init procedure

2022-07-29 Thread Denis V. Lunev
On 29.07.2022 11:13, Kevin Wolf wrote: Am 28.07.2022 um 21:27 hat Denis V. Lunev geschrieben: On 28.07.2022 16:42, Vladimir Sementsov-Ogievskiy wrote: On 7/11/22 14:07, Denis V. Lunev wrote: Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from the first glance, but it has

Bluetooth System Application

2022-07-29 Thread HuoAnbang/霍安帮
HI: At present, I need to use QEMU to virtualize the Bluetooth system. May I ask how to deal with it? Thanks

[RFC v2 08/10] Fix some bad coroutine_fn indirect calls and pointer assignments

2022-07-29 Thread Alberto Faria
These problems were found by static-analyzer.py. Not all occurrences of these problems were fixed. Signed-off-by: Alberto Faria --- block/backup.c | 2 +- include/block/block_int-common.h | 12 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git

[RFC v2 10/10] Fix some calls from coroutine_fn to no_coroutine_fn

2022-07-29 Thread Alberto Faria
These calls were found by static-analyzer.py. Not all occurrences of this problem were fixed. Signed-off-by: Alberto Faria --- block/commit.c | 2 +- block/io.c | 4 ++-- block/mirror.c | 4 ++-- block/parallels.c | 28 ++--

Re: [PULL V2 19/25] vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs

2022-07-29 Thread Peter Maydell
On Wed, 20 Jul 2022 at 10:04, Jason Wang wrote: > > From: Eugenio Pérez > > To know the device features is needed for CVQ SVQ, so SVQ knows if it > can handle all commands or not. Extract from > vhost_vdpa_get_max_queue_pairs so we can reuse it. > > Signed-off-by: Eugenio Pérez > Acked-by:

Re: [PULL 06/30] softmmu/dirtylimit: Implement virtual CPU throttle

2022-07-29 Thread Richard Henderson
On 7/29/22 06:31, Peter Maydell wrote: On Wed, 20 Jul 2022 at 12:30, Dr. David Alan Gilbert (git) wrote: From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep

Re: [PATCH] disas/nanomips: Convert nanoMIPS disassembler to C

2022-07-29 Thread Peter Maydell
On Fri, 29 Jul 2022 at 15:13, Milica Lazarevic wrote: > > C++ features like class, exception handling and function overloading > have been removed and replaced with equivalent C code. > > Signed-off-by: Milica Lazarevic > --- > Please see the discussion about why converting it here: >

Re: [RFC 0/3] Add Generic SPI GPIO model

2022-07-29 Thread Patrick Williams
On Fri, Jul 29, 2022 at 03:25:55PM +0200, Cédric Le Goater wrote: > Hello Iris, > > On 7/29/22 01:23, Iris Chen wrote: > > Currently, most of our vboot platforms using a SPI-based TPM use the Linux > > SPI-GPIO driver to "bit-bang" the SPI protocol. This is because the Aspeed > > SPI controller

Re: [PATCH v10 04/21] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED

2022-07-29 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Same as AIO_WAIT_WHILE macro, but if we are in the Main loop > do not release and then acquire ctx_ 's aiocontext. > > Once all Aiocontext locks go away, this macro will replace > AIO_WAIT_WHILE. > > Signed-off-by: Emanuele

Re: [PATCH v10 03/21] job.c: API functions not used outside should be static

2022-07-29 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > job_event_* functions can all be static, as they are not used > outside job.c. > > Same applies for job_txn_add_job(). > > Signed-off-by: Emanuele Giuseppe Esposito > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Vladimir

[RFC v2 04/10] static-analyzer: Avoid reanalyzing unmodified translation units

2022-07-29 Thread Alberto Faria
For each translation unit, run each check only if any of the translation unit's files has been modified since the last time the check ran and passed without reporting problems. Signed-off-by: Alberto Faria --- static-analyzer.py | 240 - 1 file

[PULL 0/6] Fixes for QEMU 7.1-rc1

2022-07-29 Thread Paolo Bonzini
The following changes since commit 7b17a1a841fc2336eba53afade9cadb14bd3dd9a: Update version for v7.1.0-rc0 release (2022-07-26 18:03:16 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to

Re: [RFC 0/3] Add Generic SPI GPIO model

2022-07-29 Thread Cédric Le Goater
On 7/29/22 16:38, Patrick Williams wrote: On Fri, Jul 29, 2022 at 03:25:55PM +0200, Cédric Le Goater wrote: Hello Iris, On 7/29/22 01:23, Iris Chen wrote: Currently, most of our vboot platforms using a SPI-based TPM use the Linux SPI-GPIO driver to "bit-bang" the SPI protocol. This is because

Re: [PATCH v2 0/3] Fix some coverity issues on VDUSE

2022-07-29 Thread Peter Maydell
On Wed, 6 Jul 2022 at 11:18, Xie Yongji wrote: > > This series fixes some issues reported by coverity. > > Patch 1 fixes a incorrect function name. > > Patch 2 fixes Coverity CID 1490224. > > Patch 3 fixes Coverity CID 1490226, 1490223. > > V1 to V2: > - Drop the patch to fix Coverity CID

[PATCH v1] dirtylimit: Fix overflow when computing MB

2022-07-29 Thread huangy81
From: Hyman Huang(黄勇) Coverity points out a overflow problem when computing MB, dirty_ring_size and TARGET_PAGE_SIZE are both 32 bits, multiplication will be done as a 32-bit operation, which could overflow. Simplify the formula. Meanwhile, fix spelling mistake of variable name. Reported-by:

[PATCH] hw/net/rocker: Avoid undefined shifts with more than 31 ports

2022-07-29 Thread Peter Maydell
In rocker_port_phys_link_status() and rocker_port_phys_enable_read() we construct a 64-bit value with one bit per front-panel port. However we accidentally do the shift as 32-bit arithmetic, which means that if there are more than 31 front-panel ports this is undefined behaviour. Fix the problem

Re: [PATCH 12/15] ipmi: Add an SMBus IPMI interface

2022-07-29 Thread Peter Maydell
On Fri, 29 Jul 2022 at 16:56, Corey Minyard wrote: > > On Tue, Jun 28, 2022 at 05:21:44PM +0100, Peter Maydell wrote: > > On Thu, 19 Sept 2019 at 22:39, wrote: > > > > > > From: Corey Minyard > > > > > > Signed-off-by: Corey Minyard > > > --- > > > > Thank you for the ping. Comments inline...

[PULL 1/6] ui: dbus-display requires CONFIG_GBM

2022-07-29 Thread Paolo Bonzini
Without CONFIG_GBM, compiling dbus-display fails with ../ui/dbus.c: In function ‘dbus_create_context’: ../ui/dbus.c:47:20: error: ‘qemu_egl_rn_ctx’ undeclared (first use in this function); did you mean ‘qemu_egl_init_ctx’? 47 |qemu_egl_rn_ctx); |

[PULL 2/6] vga: fix incorrect line height in 640x200x2 mode

2022-07-29 Thread Paolo Bonzini
When in CGA modes, QEMU wants to ignore the maximum scan field (bits 0..4) of the maximum scan length register in the CRTC. It is not clear why this is needed---for example, Bochs ignores bit 7 instead. The issue is that the CGA modes are not detected correctly, and in particular mode 6 results

[PULL 3/6] stubs: update replay-tools to match replay.h types

2022-07-29 Thread Paolo Bonzini
From: Claudio Fontana detected with GCC 13 [-Werror=enum-int-mismatch] Solves Issue #1096. Signed-off-by: Claudio Fontana Cc: Pavel Dovgalyuk Reviewed-by: Thomas Huth Message-Id: <20220704075832.31537-1-cfont...@suse.de> Signed-off-by: Paolo Bonzini --- stubs/replay-tools.c | 9 +

[PULL 5/6] kvm: don't use perror() without useful errno

2022-07-29 Thread Paolo Bonzini
From: Cornelia Huck perror() is designed to append the decoded errno value to a string. This, however, only makes sense if we called something that actually sets errno prior to that. For the callers that check for split irqchip support that is not the case, and we end up with confusing error

Re: [PATCH 12/15] ipmi: Add an SMBus IPMI interface

2022-07-29 Thread Peter Maydell
On Tue, 28 Jun 2022 at 17:21, Peter Maydell wrote: > > On Thu, 19 Sept 2019 at 22:39, wrote: > > > > From: Corey Minyard > > > > Signed-off-by: Corey Minyard > > --- > > Very old patch, but Coverity has decided it doesn't like something > in this function that's still basically the same in the

Re: [PATCH 12/15] ipmi: Add an SMBus IPMI interface

2022-07-29 Thread Corey Minyard
On Tue, Jun 28, 2022 at 05:21:44PM +0100, Peter Maydell wrote: > On Thu, 19 Sept 2019 at 22:39, wrote: > > > > From: Corey Minyard > > > > Signed-off-by: Corey Minyard > > --- > Thank you for the ping. Comments inline... > Very old patch, but Coverity has decided it doesn't like something >

Re: [PATCH v2] linux-user: Use memfd for open syscall emulation

2022-07-29 Thread Richard Henderson
On 7/29/22 08:49, Rainer Müller wrote: +/* create temporary file to map stat to */ +tmpdir = getenv("TMPDIR"); +if (!tmpdir) +tmpdir = "/tmp"; +snprintf(filename, sizeof(filename), "%s/qemu-open.XX", tmpdir); +fd =

[PATCH] hyperv: fix SynIC SINT assertion failure on guest reset

2022-07-29 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" Resetting a guest that has Hyper-V VMBus support enabled triggers a QEMU assertion failure: hw/hyperv/hyperv.c:131: synic_reset: Assertion `QLIST_EMPTY(>sint_routes)' failed. This happens both on normal guest reboot or when using "system_reset" HMP command. The

Re: [PATCH 2/3] Hexagon (tests/tcg/hexagon) Fix alignment in load_unpack.c

2022-07-29 Thread Richard Henderson
On 7/18/22 16:03, Taylor Simpson wrote: The increment used in :brev tests was causing unaligned addresses Change the increment and the relevant expected values Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/load_unpack.c | 14 +++--- 1 file changed, 7 insertions(+), 7

Re: [PATCH 3/3] Hexagon (tests/tcg/hexagon) reference file for float_convd

2022-07-29 Thread Richard Henderson
On 7/18/22 16:03, Taylor Simpson wrote: The test is in tests/tcg/multiarch/float_convd.c Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/float_convd.ref | 988 ++ 1 file changed, 988 insertions(+) create mode 100644 tests/tcg/hexagon/float_convd.ref

Re: [PATCH] hw/intc: Handle software disabling of APIC correctly

2022-07-29 Thread Peter Maydell
On Tue, 12 Jul 2022 at 19:38, Jay Khandkar wrote: > > When the local APIC is in a software disabled state, all local interrupt > sources must be masked and all attempts to unmask them should be > ignored. Currently, we don't do either. Fix this by handling it > correctly in apic_mem_write(). > >

[PULL 4/6] configure: Fix ppc container_cross_cc substitution

2022-07-29 Thread Paolo Bonzini
From: Richard Henderson When moving this code out of probe_target_compiler(), we failed to adjust the variable in which the target is located, resulting in e.g. powerpc64-linux-user-linux-gnu-gcc-10 Fixes: cd362defbbd ("tests/tcg: merge configure.sh back into main configure script")

Re: [PULL 06/30] softmmu/dirtylimit: Implement virtual CPU throttle

2022-07-29 Thread Hyman
在 2022/7/29 22:14, Richard Henderson 写道: On 7/29/22 06:31, Peter Maydell wrote: On Wed, 20 Jul 2022 at 12:30, Dr. David Alan Gilbert (git) wrote: From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing

[PATCH] dirtylimit: Fix overflow when computing MB

2022-07-29 Thread huangy81
From: Hyman Huang(黄勇) Coverity points out a overflow problem when computing MB, dirty_ring_size and TARGET_PAGE_SIZE are both 32 bits, multiplication will be done as a 32-bit operation, which could overflow. Simplify the formula. Meanwhile, fix spelling mistake of variable name. Reported-by:

Re: [PATCH] dirtylimit: Fix overflow when computing MB

2022-07-29 Thread Peter Maydell
On Fri, 29 Jul 2022 at 16:17, wrote: > > From: Hyman Huang(黄勇) > > Coverity points out a overflow problem when computing MB, > dirty_ring_size and TARGET_PAGE_SIZE are both 32 bits, > multiplication will be done as a 32-bit operation, which > could overflow. Simplify the formula. > > Meanwhile,

[PATCH v2] linux-user: Use memfd for open syscall emulation

2022-07-29 Thread Rainer Müller
For certain paths in /proc, the open syscall is intercepted and the returned file descriptor points to a temporary file with emulated contents. If TMPDIR is not accessible or writable for the current user (for example in a read-only mounted chroot or container) tools such as ps from procps may

Re: [PATCH 1/3] Hexagon (target/hexagon) make VyV operands use a unique temp

2022-07-29 Thread Richard Henderson
On 7/18/22 16:03, Taylor Simpson wrote: VyV operand is only used in the vshuff and vdeal instructions. These instructions write to both VyV and VxV operands. In the case where both operands are the same register, we need a separate location for VyV. We use the existing vtmp field in

Re: [PATCH v4 08/17] dump: Split write of section headers and data and add a prepare step

2022-07-29 Thread Janis Schoetterl-Glausch
On 7/26/22 11:22, Janosch Frank wrote: > By splitting the writing of the section headers and (future) section > data we prepare for the addition of a string table section and > architecture sections. > > At the same time we move the writing of the section to the end of the > dump process. This

[PATCH 2/2] linux-user: Implment host/ppc/host-signal.h

2022-07-29 Thread Richard Henderson
This commit re-enables ppc32 as a linux-user host, as existance of the directory is noted by configure. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1097 Signed-off-by: Richard Henderson --- linux-user/include/host/ppc/host-signal.h | 39 +++ 1 file changed, 39

Re: [PATCH v4 09/17] dump: Reorder struct DumpState

2022-07-29 Thread Janis Schoetterl-Glausch
On 7/26/22 11:22, Janosch Frank wrote: > Let's move ELF related members into one block and guest memory related > ones into another to improve readability. > > Signed-off-by: Janosch Frank > Reviewed-by: Richard Henderson > Reviewed-by: Marc-André Lureau > --- > include/sysemu/dump.h | 16

[PATCH for-7.1? 0/2] Re-enable ppc32 as a linux-user host

2022-07-29 Thread Richard Henderson
This is, technically, a regression from 6.2, so it's not implausible to apply before rc1. Thoughts? r~ Richard Henderson (2): common-user/host/ppc: Implement safe-syscall.inc.S linux-user: Implment host/ppc/host-signal.h linux-user/include/host/ppc/host-signal.h | 39

Re: [PATCH] hw/intc: Handle software disabling of APIC correctly

2022-07-29 Thread Jay Khandkar
On Fri, Jul 29, 2022 at 06:09:01PM +0100, Peter Maydell wrote: > On Tue, 12 Jul 2022 at 19:38, Jay Khandkar wrote: > > > > When the local APIC is in a software disabled state, all local interrupt > > sources must be masked and all attempts to unmask them should be > > ignored. Currently, we don't

[PULL 6/6] configure: pass correct cflags to container-based cross compilers

2022-07-29 Thread Paolo Bonzini
probe_target_compiler returns nonempty $target_cc for installed toolchains and $container_cross_cc for container-based toolchains. In both cases however the flags (coming from $cross_cc_cflags_${target_arch}) must be in $target_cflags. Therefore, do not clear them prior to returning from

Re: [PATCH v4 08/17] dump: Split write of section headers and data and add a prepare step

2022-07-29 Thread Janis Schoetterl-Glausch
On 7/26/22 11:22, Janosch Frank wrote: > By splitting the writing of the section headers and (future) section > data we prepare for the addition of a string table section and > architecture sections. > > At the same time we move the writing of the section to the end of the > dump process. This

Re: [PULL 00/13] testing, semihosting and doc fixes

2022-07-29 Thread Richard Henderson
On 7/29/22 02:19, Alex Bennée wrote: The following changes since commit cc42559ab129a15554cc485ea9265e34dde7ab5b: Merge tag 'pull-ppc-20220728' of https://gitlab.com/danielhb/qemu into staging (2022-07-28 15:06:42 -0700) are available in the Git repository at:

Re: [PULL 02/60] semihosting: Return failure from softmmu-uaccess.h functions

2022-07-29 Thread Richard Henderson
On 7/29/22 07:31, Peter Maydell wrote: On Tue, 28 Jun 2022 at 05:54, Richard Henderson wrote: We were reporting unconditional success for these functions; pass on any failure from cpu_memory_rw_debug. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson So, this commit makes us

Re: [PATCH RESEND] tests/tcg/linux-test: Fix random hangs in test_socket

2022-07-29 Thread Thomas Huth
On 25/07/2022 16.42, Ilya Leoshkevich wrote: test_socket hangs randomly in connect(), especially when run without qemu. Apparently the reason is that linux started treating backlog value of 0 literally instead of rounding it up since v4.4 (commit ef547f2ac16b). So set it to 1 instead.

Re: [PATCH] hw/intc: Handle software disabling of APIC correctly

2022-07-29 Thread Jay Khandkar
Ping? On Tue, 12 Jul 2022, 19:49 Jay Khandkar, wrote: > When the local APIC is in a software disabled state, all local interrupt > sources must be masked and all attempts to unmask them should be > ignored. Currently, we don't do either. Fix this by handling it > correctly in apic_mem_write().

[PATCH 1/2] common-user/host/ppc: Implement safe-syscall.inc.S

2022-07-29 Thread Richard Henderson
Signed-off-by: Richard Henderson --- common-user/host/ppc/safe-syscall.inc.S | 107 1 file changed, 107 insertions(+) create mode 100644 common-user/host/ppc/safe-syscall.inc.S diff --git a/common-user/host/ppc/safe-syscall.inc.S

Re: [RFC 0/3] Add Generic SPI GPIO model

2022-07-29 Thread Peter Delevoryas
On Fri, Jul 29, 2022 at 03:25:55PM +0200, Cédric Le Goater wrote: > Hello Iris, > > On 7/29/22 01:23, Iris Chen wrote: > > Hey everyone, > > > > I have been working on a project to add support for SPI-based TPMs in QEMU. > > Currently, most of our vboot platforms using a SPI-based TPM use the

Re: [PULL 0/6] Fixes for QEMU 7.1-rc1

2022-07-29 Thread Richard Henderson
On 7/29/22 08:04, Paolo Bonzini wrote: The following changes since commit 7b17a1a841fc2336eba53afade9cadb14bd3dd9a: Update version for v7.1.0-rc0 release (2022-07-26 18:03:16 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to

Re: [PATCH v4 11/17] dump/dump: Add section string table support

2022-07-29 Thread Janis Schoetterl-Glausch
On 7/26/22 11:22, Janosch Frank wrote: > As sections don't have a type like the notes do we need another way to Having a string table seems like a good idea to me, as we don't know the requirements any architecture might have, but sections do have sh_type. Could we use one of those, e.g. one of

[PATCH] linux-user: Implement faccessat2

2022-07-29 Thread Richard Henderson
Split out do_faccessat2 helper, and use it for accessat and faccessat as well. Signed-off-by: Richard Henderson --- Will we ever have a system libc for which __NR_faccessat2 is present, but faccessat() does not try faccessat2 first? r~ --- linux-user/syscall.c | 44

Re: [PATCH 1/1] block: add missed block_acct_setup with new block device init procedure

2022-07-29 Thread Kevin Wolf
Am 29.07.2022 um 14:36 hat Denis V. Lunev geschrieben: > On 29.07.2022 11:13, Kevin Wolf wrote: > > Am 28.07.2022 um 21:27 hat Denis V. Lunev geschrieben: > > > On 28.07.2022 16:42, Vladimir Sementsov-Ogievskiy wrote: > > > > On 7/11/22 14:07, Denis V. Lunev wrote: > > > > > Commit

  1   2   >