Re: [PATCH v17 00/13] Support blob memory and venus on qemu

2024-09-01 Thread Dmitry Osipenko
On 8/27/24 12:57, Alex Bennée wrote: > Dmitry Osipenko writes: > >> Hello, >> >> This series enables Vulkan Venus context support on virtio-gpu. >> >> All virglrender and almost all Linux kernel prerequisite changes >> needed by Venus are already in upstream. For kernel there is a pending >> KVM

Re: [PATCH 11/13] pnv/xive: Update PIPR when updating CPPR

2024-09-01 Thread Cédric Le Goater
On 8/30/24 19:06, Mike Kowal wrote: On 8/30/2024 3:25 AM, Cédric Le Goater wrote: On 8/29/24 22:35, Mike Kowal wrote: On 8/29/2024 7:29 AM, Cédric Le Goater wrote: On 8/1/24 22:30, Michael Kowal wrote: From: Glenn Miles Current code was updating the PIPR inside the xive_tctx_accept() func

Re: [PATCH v3 0/7] vfio/igd: add passthrough support for IGDs of gen 11 and later

2024-09-01 Thread Cédric Le Goater
On 8/28/24 15:43, Corvin Köhne wrote: Hi, Qemu has experimental support for GPU passthrough of Intels integrated graphic devices. Unfortunately, Intel has changed some bits for their gen 11 devices and later. To support these devices, we have to account for those changes. This patch series adds

Re: [PATCH RESEND v9 7/9] rust: add crate to expose bindings and interfaces

2024-09-01 Thread Junjie Mao
On 8/31/2024 4:25 PM, Manos Pitsidianakis wrote: On Fri, 30 Aug 2024 14:03, Alex Bennée wrote: [.snip.] It is there:  /usr/lib/llvm-14/lib/clang/14.0.6/include/stdatomic.h in the search path:  clang -E -Wp,-v -  clang -cc1 version 14.0.6 based upon LLVM 14.0.6 default target x86_64-pc-linu

Re: [PATCH for-9.2] hw/vfio/pci.c: Use correct type in trace_vfio_msix_early_setup()

2024-09-01 Thread Cédric Le Goater
On 8/15/24 15:52, Peter Maydell wrote: The tracepoint trace_vfio_msix_early_setup() uses "int" for the type of the table_bar argument, but we use this to print a uint32_t. Coverity warns that this means that we could end up treating it as a negative number. We only use this in printing the value

Re: [PATCH] hw/gpio/aspeed_gpio: Avoid shift into sign bit

2024-09-01 Thread Cédric Le Goater
On 8/30/24 20:05, Peter Maydell wrote: In aspeed_gpio_update() we calculate "mask = 1 << gpio", where gpio can be between 0 and 31. Coverity complains about this because 1 << 31 won't fit in a signed integer. For QEMU this isn't an error because we enable -fwrapv, but we can keep Coverity happy

Re: [PATCH v6 RESEND 0/5] Power11 support for QEMU [PSeries]

2024-09-01 Thread Amit Machhiwal
On 2024/07/31 11:20 AM, Aditya Gupta wrote: > Overview > > > Split "Power11 support for QEMU" into 2 patch series: pseries & powernv. > > This patch series is for pseries support for Power11. > > As Power11 core is same as Power10, hence much of the code has been reused > from > Po

Re: [PATCH v5 4/5] target/riscv: Add Smrnmi mnret instruction.

2024-09-01 Thread Tommy Wu
On Fri, Aug 30, 2024 at 7:42 AM Alistair Francis wrote: > > On Fri, Aug 30, 2024 at 2:12 AM Tommy Wu wrote: > > > > On Mon, Aug 19, 2024 at 11:49 AM Alistair Francis > > wrote: > > > > > > On Fri, Aug 9, 2024 at 6:12 PM Tommy Wu wrote: > > > > > > > > This patch adds a new instruction `mnret`.

Re: [PATCH v2 07/14] tcg/riscv: Add support for basic vector opcodes

2024-09-01 Thread Richard Henderson
On 8/30/24 16:16, LIU Zhiwei wrote: From: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei --- tcg/riscv/tcg-target-con-set.h | 2 ++ tcg/riscv/tcg-target-con-str.h | 1 + tcg/riscv/tcg-target.c.inc | 54 ++ tcg/riscv/tcg-target.h

Re: [PATCH v2 06/14] tcg/riscv: Implement vector mov/dup{m/i}

2024-09-01 Thread Richard Henderson
On 8/30/24 16:15, LIU Zhiwei wrote: From: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei --- tcg/riscv/tcg-target.c.inc | 54 ++ 1 file changed, 54 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 05/14] tcg/riscv: Implement vector load/store

2024-09-01 Thread Richard Henderson
On 8/30/24 16:15, LIU Zhiwei wrote: @@ -799,6 +834,17 @@ static void tcg_out_ldst(TCGContext *s, RISCVInsn opc, TCGReg data, case OPC_SD: tcg_out_opc_store(s, opc, addr, data, imm12); break; +case OPC_VSE8_V: +case OPC_VSE16_V: +case OPC_VSE32_V: +case O

Re: [PATCH v2 04/14] tcg/riscv: Add riscv vset{i}vli support

2024-09-01 Thread Richard Henderson
On 8/30/24 16:15, LIU Zhiwei wrote: From: TANG Tiancheng In RISC-V, vector operations require initial configuration using the vset{i}vl{i} instruction. This instruction: 1. Sets the vector length (vl) in bytes 2. Configures the vtype register, which includes: SEW (Single Element Wid

Re: [PATCH v2 03/14] tcg/riscv: Add basic support for vector

2024-09-01 Thread Richard Henderson
On 8/30/24 16:15, LIU Zhiwei wrote: From: Swung0x48 The RISC-V vector instruction set utilizes the LMUL field to group multiple registers, enabling variable-length vector registers. This implementation uses only the first register number of each group while reserving the other register numbers

Re: [PATCH v2 02/14] util: Add RISC-V vector extension probe in cpuinfo

2024-09-01 Thread Richard Henderson
On 8/30/24 16:15, LIU Zhiwei wrote: +extern unsigned riscv_vlen; Do you really want to store vlen and not vlenb? It seems that would simplify some of your computation in the tcg backend. @@ -49,6 +50,9 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) #endif #if defined(__riscv

[PATCH] tests/unit: remove block layer code from test-nested-aio-poll

2024-09-01 Thread Paolo Bonzini
GCC is reporting a NULL pointer dereference when compiling aio_wait_kick() with LTO. The issue is that test-nested-aio-poll.c does not call qemu_init_main_loop(). It doesn't _need_ to because it never calls AIO_WAIT_WHILE(), but it seems that LTO does not do enough dead-code elimination to catch t

Re: [PATCH 1/3] hw/m68k/mcf5208: Avoid shifting off end of integer

2024-09-01 Thread Richard Henderson
On 9/2/24 07:34, Richard Henderson wrote: @@ -158,7 +158,7 @@ static uint64_t m5208_sys_read(void *opaque, hwaddr addr,   {   int n;   for (n = 0; n < 32; n++) { -    if (current_machine->ram_size < (2u << n)) { +    if (current_machine->ram

Re: [PATCH 1/3] hw/m68k/mcf5208: Avoid shifting off end of integer

2024-09-01 Thread Richard Henderson
On 8/31/24 03:34, Peter Maydell wrote: In m5208_sys_read(), we have a loop of n from 0 to 31, and we calculate (2u << n). For the n == 31 iteration this will shift off the top of the unsigned 32 bit integer. This is harmless, because we're going to stop the loop with n == 31 anyway, but we can

[PATCH] plugins: add two events for cpu_restore_state_from_tb() and cpu_io_recompile()

2024-09-01 Thread Xingran Wang
Currently, the instruction count obtained by plugins using the translation block execution callback is larger than the actual value. Adding callbacks in cpu_restore_state_from_tb() and cpu_io_recompile() allows plugins to correct the instruction count when exiting a translation block mid-execution,

[PATCH v3 4/5] block: allow commit to unmap zero blocks

2024-09-01 Thread Vincent Vanlaer
Non-active block commits do not discard blocks only containing zeros, causing images to lose sparseness after the commit. This commit fixes that by writing zero blocks using blk_co_pwrite_zeroes rather than writing them out as any other arbitrary data. Signed-off-by: Vincent Vanlaer --- block/co

[PATCH v3 2/5] block: move commit_run loop to separate function

2024-09-01 Thread Vincent Vanlaer
Signed-off-by: Vincent Vanlaer --- block/commit.c | 85 -- 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/block/commit.c b/block/commit.c index 8dee25b313..9eedd1fa47 100644 --- a/block/commit.c +++ b/block/commit.c @@ -128,6 +128,5

[PATCH v3 1/5] block: get type of block allocation in commit_run

2024-09-01 Thread Vincent Vanlaer
bdrv_co_common_block_status_above not only returns whether the block is allocated, but also if it contains zeroes. Signed-off-by: Vincent Vanlaer Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/commit.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/block/c

[PATCH v3 0/5] block: allow commit to unmap zero blocks

2024-09-01 Thread Vincent Vanlaer
This patch series adds support for zero blocks in non-active commits. The first three patches in the series contains the actual changes to the commit code, the last patch adds a test for the new functionality. --- Changes since v2: - moved main loop of commit_run to a separate function and refact

[PATCH v3 5/5] block: add test non-active commit with zeroed data

2024-09-01 Thread Vincent Vanlaer
Signed-off-by: Vincent Vanlaer --- tests/qemu-iotests/315 | 95 ++ tests/qemu-iotests/315.out | 54 ++ 2 files changed, 149 insertions(+) create mode 100755 tests/qemu-iotests/315 create mode 100644 tests/qemu-iotests/315.out diff --g

[PATCH v3 3/5] block: refactor error handling of commit_iteration

2024-09-01 Thread Vincent Vanlaer
Signed-off-by: Vincent Vanlaer --- block/commit.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/block/commit.c b/block/commit.c index 9eedd1fa47..288e413be3 100644 --- a/block/commit.c +++ b/block/commit.c @@ -130,7 +130,6 @@ static vo

Re: [PATCH v1 0/4] virtio_snd_set_config: Fix #2296

2024-09-01 Thread Volker Rümelin
Am 22.04.24 um 14:52 schrieb Manos Pitsidianakis: > Changing the number of streams via virtio_snd_set_config() did not > re-configure the audio card, leaving it in an invalid state. > > Reported in https://gitlab.com/qemu-project/qemu/-/issues/2296 > > Manos Pitsidianakis (4): > virtio-snd: add v

[PATCH] hw/audio/virtio-sound: fix heap buffer overflow

2024-09-01 Thread Volker Rümelin
Currently, the guest may write to the device configuration space, whereas the virtio sound device specification in chapter 5.14.4 clearly states that the fields in the device configuration space are driver-read-only. Remove the set_config function from the virtio_snd class. This also prevents a h

Re: [PATCH 3/3] hw/nubus/nubus-device: Range check 'slot' property

2024-09-01 Thread Mark Cave-Ayland
On 30/08/2024 18:34, Peter Maydell wrote: The TYPE_NUBUS_DEVICE class lets the user specify the nubus slot using an int32 "slot" QOM property. Its realize method doesn't do any range checking on this value, which Coverity notices by way of the possibility that 'nd->slot * NUBUS_SUPER_SLOT_SIZE'

Re: [PATCH v2 3/4] block: allow commit to unmap zero blocks

2024-09-01 Thread Vincent Vanlaer
On 2/08/2024 12:58, Vladimir Sementsov-Ogievskiy wrote: On 14.07.24 00:56, Vincent Vanlaer wrote: Non-active block commits do not discard blocks only containing zeros, causing images to lose sparseness after the commit. This commit fixes that by writing zero blocks using blk_co_pwrite_zeroes rat