bb630d92 | 16-Sep-2024 |
Alex Bennée <alex.bennee@linaro.org> |
util/timer: avoid deadlock when shutting down
When we shut down a guest we disable the timers. However this can cause deadlock if the guest has queued some async work that is trying to advance syste
util/timer: avoid deadlock when shutting down
When we shut down a guest we disable the timers. However this can cause deadlock if the guest has queued some async work that is trying to advance system time and spins forever trying to wind time forward. Pay attention to the return code and bail early if we can't wind time forward.
Reported-by: Elisha Hollander <just4now666666@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240916085400.1046925-15-alex.bennee@linaro.org> (cherry picked from commit bc02be4508d8753d1f6071b77d10f4661587df6f) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
show more ...
|
940d802b | 09-Aug-2024 |
Alexander Ivanov <alexander.ivanov@virtuozzo.com> |
module: Prevent crash by resetting local_err in module_load_qom_all()
Set local_err to NULL after it has been freed in error_report_err(). This avoids triggering assert(*errp == NULL) failure in err
module: Prevent crash by resetting local_err in module_load_qom_all()
Set local_err to NULL after it has been freed in error_report_err(). This avoids triggering assert(*errp == NULL) failure in error_setv() when local_err is reused in the loop.
Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com> Reviewed-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Denis V. Lunev <den@openvz.org> Link: https://lore.kernel.org/r/20240809121340.992049-2-alexander.ivanov@virtuozzo.com [Do the same by moving the declaration instead. - Paolo] Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
7532ca57 | 02-Aug-2024 |
Clément Léger <cleger@rivosinc.com> |
qemu/osdep: Add excluded fd parameter to qemu_close_all_open_fd()
In order for this function to be usable by tap.c code, add a list of file descriptors that should not be closed.
Signed-off-by: Clé
qemu/osdep: Add excluded fd parameter to qemu_close_all_open_fd()
In order for this function to be usable by tap.c code, add a list of file descriptors that should not be closed.
Signed-off-by: Clément Léger <cleger@rivosinc.com> Message-ID: <20240802145423.3232974-5-cleger@rivosinc.com> [rth: Use max_fd in qemu_close_all_open_fd_close_range] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
ffa28f9c | 02-Aug-2024 |
Clément Léger <cleger@rivosinc.com> |
qemu/osdep: Split qemu_close_all_open_fd() and add fallback
In order to make it cleaner, split qemu_close_all_open_fd() logic into multiple subfunctions (close with close_range(), with /proc/self/fd
qemu/osdep: Split qemu_close_all_open_fd() and add fallback
In order to make it cleaner, split qemu_close_all_open_fd() logic into multiple subfunctions (close with close_range(), with /proc/self/fd and fallback).
Signed-off-by: Clément Léger <cleger@rivosinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240802145423.3232974-3-cleger@rivosinc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
4ec5ebea | 02-Aug-2024 |
Clément Léger <cleger@rivosinc.com> |
qemu/osdep: Move close_all_open_fds() to oslib-posix
Move close_all_open_fds() in oslib-posix, rename it qemu_close_all_open_fds() and export it.
Signed-off-by: Clément Léger <cleger@rivosinc.com>
qemu/osdep: Move close_all_open_fds() to oslib-posix
Move close_all_open_fds() in oslib-posix, rename it qemu_close_all_open_fds() and export it.
Signed-off-by: Clément Léger <cleger@rivosinc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240802145423.3232974-2-cleger@rivosinc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
27fca0a0 | 27-Jul-2024 |
Brad Smith <brad@comstyle.com> |
util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD
Signed-off-by: Brad Smith <brad@comstyle.com> Message-ID: <ZqXB_zz0fR1CpA7k@humpty.home.comstyle.com> Signed-off-by: Richard Henderson <richard.h
util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD
Signed-off-by: Brad Smith <brad@comstyle.com> Message-ID: <ZqXB_zz0fR1CpA7k@humpty.home.comstyle.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
22531d8c | 23-Jul-2024 |
Vivian Wang <uwu@dram.page> |
util/getauxval: Ensure setting errno if not found
Sometimes zero is a valid value for getauxval (e.g. AT_EXECFD). Make sure that we can distinguish between a valid zero value and a not found entry b
util/getauxval: Ensure setting errno if not found
Sometimes zero is a valid value for getauxval (e.g. AT_EXECFD). Make sure that we can distinguish between a valid zero value and a not found entry by setting errno.
Assumes that getauxval from sys/auxv.h sets errno correctly.
Signed-off-by: Vivian Wang <uwu@dram.page> Message-ID: <20240723100545.405476-2-uwu@dram.page> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
85149557 | 23-Jul-2024 |
Peter Maydell <peter.maydell@linaro.org> |
util/async.c: Forbid negative min/max in aio_context_set_thread_pool_params()
aio_context_set_thread_pool_params() takes two int64_t arguments to set the minimum and maximum number of threads in the
util/async.c: Forbid negative min/max in aio_context_set_thread_pool_params()
aio_context_set_thread_pool_params() takes two int64_t arguments to set the minimum and maximum number of threads in the pool. We do some bounds checking on these, but we don't catch the case where the inputs are negative. This means that later in the function when we assign these inputs to the AioContext::thread_pool_min and ::thread_pool_max fields, which are of type int, the values might overflow the smaller type.
A negative number of threads is meaningless, so make aio_context_set_thread_pool_params() return an error if either min or max are negative.
Resolves: Coverity CID 1547605 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20240723150927.1396456-1-peter.maydell@linaro.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
e4e9db25 | 22-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
util/fifo8: Introduce fifo8_drop()
Add the fifo8_drop() helper for clarity. It is a simple wrapper over fifo8_pop_buf().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierr
util/fifo8: Introduce fifo8_drop()
Add the fifo8_drop() helper for clarity. It is a simple wrapper over fifo8_pop_buf().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20240722160745.67904-8-philmd@linaro.org>
show more ...
|
23ad5711 | 22-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
util/fifo8: Expose fifo8_pop_buf()
Extract fifo8_pop_buf() from hw/scsi/esp.c and expose it as part of the <qemu/fifo8.h> API. This function takes care of non-contiguous (wrapped) FIFO buffer (which
util/fifo8: Expose fifo8_pop_buf()
Extract fifo8_pop_buf() from hw/scsi/esp.c and expose it as part of the <qemu/fifo8.h> API. This function takes care of non-contiguous (wrapped) FIFO buffer (which is an implementation detail).
Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20240722160745.67904-7-philmd@linaro.org>
show more ...
|
06252bf5 | 22-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
util/fifo8: Rename fifo8_pop_buf() -> fifo8_pop_bufptr()
Since fifo8_pop_buf() return a const buffer (which points directly into the FIFO backing store). Rename it using the 'bufptr' suffix to bette
util/fifo8: Rename fifo8_pop_buf() -> fifo8_pop_bufptr()
Since fifo8_pop_buf() return a const buffer (which points directly into the FIFO backing store). Rename it using the 'bufptr' suffix to better reflect that it is a pointer to the internal buffer that is being returned. This will help differentiate with methods *copying* the FIFO data.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20240722160745.67904-6-philmd@linaro.org>
show more ...
|
06a16e7b | 22-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
util/fifo8: Rename fifo8_peek_buf() -> fifo8_peek_bufptr()
Since fifo8_peek_buf() return a const buffer (which points directly into the FIFO backing store). Rename it using the 'bufptr' suffix to be
util/fifo8: Rename fifo8_peek_buf() -> fifo8_peek_bufptr()
Since fifo8_peek_buf() return a const buffer (which points directly into the FIFO backing store). Rename it using the 'bufptr' suffix to better reflect that it is a pointer to the internal buffer that is being returned. This will help differentiate with methods *copying* the FIFO data.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20240722160745.67904-5-philmd@linaro.org>
show more ...
|
b81bc8dc | 10-Nov-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
util/fifo8: Use fifo8_reset() in fifo8_create()
Avoid open-coding fifo8_reset() in fifo8_create().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Mark Cave-Ayland <mark.cave
util/fifo8: Use fifo8_reset() in fifo8_create()
Avoid open-coding fifo8_reset() in fifo8_create().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240722160745.67904-4-philmd@linaro.org>
show more ...
|
083c4e71 | 04-Jul-2024 |
Zhao Liu <zhao1.liu@intel.com> |
util/oslib-posix: Fix superfluous trailing semicolon
Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.
util/oslib-posix: Fix superfluous trailing semicolon
Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
show more ...
|
e5717308 | 27-Jun-2024 |
Richard Henderson <richard.henderson@linaro.org> |
util/cpuinfo-riscv: Use linux __riscv_hwprobe syscall
With recent linux kernels, there is a syscall to probe for various ISA extensions. These bits were phased in over several kernel releases, so w
util/cpuinfo-riscv: Use linux __riscv_hwprobe syscall
With recent linux kernels, there is a syscall to probe for various ISA extensions. These bits were phased in over several kernel releases, so we still require checks for symbol availability.
Acked-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
adc02842 | 27-Jun-2024 |
Richard Henderson <richard.henderson@linaro.org> |
util/cpuinfo-riscv: Support OpenBSD signal frame
Reported-by: Brad Smith <brad@comstyle.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Daniel Henrique Barboza <dbarboza@venta
util/cpuinfo-riscv: Support OpenBSD signal frame
Reported-by: Brad Smith <brad@comstyle.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
b86c6ba6 | 26-Jun-2024 |
Richard Henderson <richard.henderson@linaro.org> |
util/cpuinfo-riscv: Support host/cpuinfo.h for riscv
Move detection code out of tcg, similar to other hosts.
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <al
util/cpuinfo-riscv: Support host/cpuinfo.h for riscv
Move detection code out of tcg, similar to other hosts.
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
ab089908 | 22-Jun-2024 |
Brad Smith <brad@comstyle.com> |
util/cpuinfo-aarch64: Add OpenBSD support
Signed-off-by: Brad Smith <brad@comstyle.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <ZneEh51XKhxgZKpp@humpty.home.comsty
util/cpuinfo-aarch64: Add OpenBSD support
Signed-off-by: Brad Smith <brad@comstyle.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <ZneEh51XKhxgZKpp@humpty.home.comstyle.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
6527cee2 | 28-Jun-2024 |
Brad Smith <brad@comstyle.com> |
util/cpuinfo-ppc: Add FreeBSD support
Signed-off-by: Brad Smith <brad@comstyle.com> Message-Id: <Zn9cJ3puWr5lIgsg@humpty.home.comstyle.com> Signed-off-by: Richard Henderson <richard.henderson@linaro
util/cpuinfo-ppc: Add FreeBSD support
Signed-off-by: Brad Smith <brad@comstyle.com> Message-Id: <Zn9cJ3puWr5lIgsg@humpty.home.comstyle.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
272d3dec | 26-Jun-2024 |
Brad Smith <brad@comstyle.com> |
util/cpuinfo-ppc: Fix building on OpenBSD
OpenBSD does not support AT_HWCAP.
Signed-off-by: Brad Smith <brad@comstyle.com> Message-Id: <ZnzM1T6Vo1Q0yAH-@humpty.home.comstyle.com> Signed-off-by: Ric
util/cpuinfo-ppc: Fix building on OpenBSD
OpenBSD does not support AT_HWCAP.
Signed-off-by: Brad Smith <brad@comstyle.com> Message-Id: <ZnzM1T6Vo1Q0yAH-@humpty.home.comstyle.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
4c58843e | 18-Jun-2024 |
Stefano Garzarella <sgarzare@redhat.com> |
vhost-user-server: do not set memory fd non-blocking
In vhost-user-server we set all fd received from the other peer in non-blocking mode. For some of them (e.g. memfd, shm_open, etc.) it's not real
vhost-user-server: do not set memory fd non-blocking
In vhost-user-server we set all fd received from the other peer in non-blocking mode. For some of them (e.g. memfd, shm_open, etc.) it's not really needed, because we don't use these fd with blocking operations, but only to map memory.
In addition, in some systems this operation can fail (e.g. in macOS setting an fd returned by shm_open() non-blocking fails with errno = ENOTTY).
So, let's avoid setting fd non-blocking for those messages that we know carry memory fd (e.g. VHOST_USER_ADD_MEM_REG, VHOST_USER_SET_MEM_TABLE).
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20240618100043.144657-6-sgarzare@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
87b8bde5 | 18-Jun-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
Revert "host/i386: assume presence of SSE2"
This reverts commit b18236897ca15c3db1506d8edb9a191dfe51429c. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro.
Signed-o
Revert "host/i386: assume presence of SSE2"
This reverts commit b18236897ca15c3db1506d8edb9a191dfe51429c. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
39a367a4 | 18-Jun-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
Revert "host/i386: assume presence of SSSE3"
This reverts commit 433cd6d94a8256af70a5200f236dc8047c3c1468. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro.
Signed-
Revert "host/i386: assume presence of SSSE3"
This reverts commit 433cd6d94a8256af70a5200f236dc8047c3c1468. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
fe721c19 | 18-Jun-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
Revert "host/i386: assume presence of POPCNT"
This reverts commit 45ccdbcb24baf99667997fac5cf60318e5e7db51. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro.
Signed
Revert "host/i386: assume presence of POPCNT"
This reverts commit 45ccdbcb24baf99667997fac5cf60318e5e7db51. The x86-64 instruction set can now be tuned down to x86-64 v1 or i386 Pentium Pro.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
ffbc3949 | 20-Jun-2024 |
Alex Bennée <alex.bennee@linaro.org> |
sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time
Move the key functionality of moving time forward into the clock sub-system itself. This will allow us to plumb in time control
sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time
Move the key functionality of moving time forward into the clock sub-system itself. This will allow us to plumb in time control into plugins.
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240620152220.2192768-7-alex.bennee@linaro.org>
show more ...
|