Branch: refs/heads/staging-8.2
  Home:   https://github.com/qemu/qemu
  Commit: bbdcc89678daa5cb131ef22a6cd41a5f7f9dcea9
      
https://github.com/qemu/qemu/commit/bbdcc89678daa5cb131ef22a6cd41a5f7f9dcea9
  Author: Daniel Henrique Barboza <dbarb...@ventanamicro.com>
  Date:   2024-04-27 (Sat, 27 Apr 2024)

  Changed paths:
    M target/riscv/kvm/kvm-cpu.c

  Log Message:
  -----------
  target/riscv/kvm: change KVM_REG_RISCV_FP_F to u32

KVM_REG_RISCV_FP_F regs have u32 size according to the API, but by using
kvm_riscv_reg_id() in RISCV_FP_F_REG() we're returning u64 sizes when
running with TARGET_RISCV64. The most likely reason why no one noticed
this is because we're not implementing kvm_cpu_synchronize_state() in
RISC-V yet.

Create a new helper that returns a KVM ID with u32 size and use it in
RISCV_FP_F_REG().

Reported-by: Andrew Jones <ajo...@ventanamicro.com>
Signed-off-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com>
Reviewed-by: Andrew Jones <ajo...@ventanamicro.com>
Message-ID: <20231208183835.2411523-2-dbarb...@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.fran...@wdc.com>
(cherry picked from commit 49c211ffca00fdf7c0c29072c224e88527a14838)
Signed-off-by: Michael Tokarev <m...@tls.msk.ru>


  Commit: 125b95d79e746cbab6b72683b3382dd372e38c61
      
https://github.com/qemu/qemu/commit/125b95d79e746cbab6b72683b3382dd372e38c61
  Author: Daniel Henrique Barboza <dbarb...@ventanamicro.com>
  Date:   2024-04-27 (Sat, 27 Apr 2024)

  Changed paths:
    M target/riscv/kvm/kvm-cpu.c

  Log Message:
  -----------
  target/riscv/kvm: change KVM_REG_RISCV_FP_D to u64

KVM_REG_RISCV_FP_D regs are always u64 size. Using kvm_riscv_reg_id() in
RISCV_FP_D_REG() ends up encoding the wrong size if we're running with
TARGET_RISCV32.

Create a new helper that returns a KVM ID with u64 size and use it with
RISCV_FP_D_REG().

Reported-by: Andrew Jones <ajo...@ventanamicro.com>
Signed-off-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com>
Reviewed-by: Andrew Jones <ajo...@ventanamicro.com>
Message-ID: <20231208183835.2411523-3-dbarb...@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.fran...@wdc.com>
(cherry picked from commit 450bd6618fda3d2e2ab02b2fce1c79efd5b66084)
Signed-off-by: Michael Tokarev <m...@tls.msk.ru>


  Commit: cbae1080988e0f1af0fb4c816205f7647f6de16f
      
https://github.com/qemu/qemu/commit/cbae1080988e0f1af0fb4c816205f7647f6de16f
  Author: Daniel Henrique Barboza <dbarb...@ventanamicro.com>
  Date:   2024-04-27 (Sat, 27 Apr 2024)

  Changed paths:
    M target/riscv/kvm/kvm-cpu.c

  Log Message:
  -----------
  target/riscv/kvm: change timer regs size to u64

KVM_REG_RISCV_TIMER regs are always u64 according to the KVM API, but at
this moment we'll return u32 regs if we're running a RISCV32 target.

Use the kvm_riscv_reg_id_u64() helper in RISCV_TIMER_REG() to fix it.

Reported-by: Andrew Jones <ajo...@ventanamicro.com>
Signed-off-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com>
Reviewed-by: Andrew Jones <ajo...@ventanamicro.com>
Message-ID: <20231208183835.2411523-4-dbarb...@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.fran...@wdc.com>
(cherry picked from commit 10f86d1b845087d14b58d65dd2a6e3411d1b6529)
Signed-off-by: Michael Tokarev <m...@tls.msk.ru>


  Commit: 55b88e61edcd472ad8e1222acacaf7ded0f18c20
      
https://github.com/qemu/qemu/commit/55b88e61edcd472ad8e1222acacaf7ded0f18c20
  Author: Li Zhijian <lizhij...@fujitsu.com>
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
    M migration/colo.c

  Log Message:
  -----------
  migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion 
`!qemu_in_coroutine()' failed.

bdrv_activate_all() should not be called from the coroutine context, move
it to the QEMU thread colo_process_incoming_thread() with the bql_lock
protected.

The backtrace is as follows:
 #4  0x0000561af7948362 in bdrv_graph_rdlock_main_loop () at 
../block/graph-lock.c:260
 #5  0x0000561af7907a68 in graph_lockable_auto_lock_mainloop (x=0x7fd29810be7b) 
at /patch/to/qemu/include/block/graph-lock.h:259
 #6  0x0000561af79167d1 in bdrv_activate_all (errp=0x7fd29810bed0) at 
../block.c:6906
 #7  0x0000561af762b4af in colo_incoming_co () at ../migration/colo.c:935
 #8  0x0000561af7607e57 in process_incoming_migration_co (opaque=0x0) at 
../migration/migration.c:793
 #9  0x0000561af7adbeeb in coroutine_trampoline (i0=-106876144, i1=22042) at 
../util/coroutine-ucontext.c:175
 #10 0x00007fd2a5cf21c0 in  () at /lib64/libc.so.6

Cc: qemu-sta...@nongnu.org
Cc: Fabiano Rosas <faro...@suse.de>
Closes: https://gitlab.com/qemu-project/qemu/-/issues/2277
Fixes: 2b3912f135 ("block: Mark bdrv_first_blk() and bdrv_is_root_node() 
GRAPH_RDLOCK")
Signed-off-by: Li Zhijian <lizhij...@fujitsu.com>
Reviewed-by: Zhang Chen <chen.zh...@intel.com>
Tested-by: Zhang Chen <chen.zh...@intel.com>
Reviewed-by: Fabiano Rosas <faro...@suse.de>
Link: https://lore.kernel.org/r/20240417025634.1014582-1-lizhij...@fujitsu.com
Signed-off-by: Peter Xu <pet...@redhat.com>
(cherry picked from commit 2cc637f1ea08d2a1b19fc5b1a30bc609f948de93)
Signed-off-by: Michael Tokarev <m...@tls.msk.ru>
(Mjt: fixup bql_lock() => qemu_mutex_lock_iothread() for 
v8.2.0-444-g195801d700c0
 "system/cpus: rename qemu_mutex_lock_iothread() to bql_lock()")


  Commit: 6fee9efc2e9e3e32c080462b02e9f69f7060316d
      
https://github.com/qemu/qemu/commit/6fee9efc2e9e3e32c080462b02e9f69f7060316d
  Author: Michael Tokarev <m...@tls.msk.ru>
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY

This setsockopt accepts zero-lengh optlen (current qemu implementation
does not allow this).  Also, there's no need to make a copy of the key,
it is enough to use lock_user() (which accepts zero length already).

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2197
Fixes: f31dddd2fc "linux-user: Add support for setsockopt() option SOL_ALG"
Signed-off-by: Michael Tokarev <m...@tls.msk.ru>
Message-Id: <20240331100737.2724186-2-...@tls.msk.ru>
Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
(cherry picked from commit 04f6fb897a5aeb3e356a7b889869c9962f9c16c7)
Signed-off-by: Michael Tokarev <m...@tls.msk.ru>


  Commit: cb4c222add20b00ec0b41ba8ea106a592ee9b899
      
https://github.com/qemu/qemu/commit/cb4c222add20b00ec0b41ba8ea106a592ee9b899
  Author: Zhu Yangyang <zhuyangyan...@huawei.com>
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
    M nbd/client.c
    M nbd/common.c
    M nbd/nbd-internal.h
    M nbd/server.c

  Log Message:
  -----------
  nbd/server: do not poll within a coroutine context

Coroutines are not supposed to block. Instead, they should yield.

The client performs TLS upgrade outside of an AIOContext, during
synchronous handshake; this still requires g_main_loop.  But the
server responds to TLS upgrade inside a coroutine, so a nested
g_main_loop is wrong.  Since the two callbacks no longer share more
than the setting of data.complete and data.error, it's just as easy to
use static helpers instead of trying to share a common code path.  It
is also possible to add assertions that no other code is interfering
with the eventual path to qio reaching the callback, whether or not it
required a yield or main loop.

Fixes: f95910f ("nbd: implement TLS support in the protocol negotiation")
Signed-off-by: Zhu Yangyang <zhuyangyan...@huawei.com>
[eblake: move callbacks to their use point, add assertions]
Signed-off-by: Eric Blake <ebl...@redhat.com>
Message-ID: <20240408160214.1200629-5-ebl...@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
(cherry picked from commit ae6d91a7e9b77abb029ed3fa9fad461422286942)
Signed-off-by: Michael Tokarev <m...@tls.msk.ru>


  Commit: 37751067b175afc3ba3cc970a7c9d90f595c61c0
      
https://github.com/qemu/qemu/commit/37751067b175afc3ba3cc970a7c9d90f595c61c0
  Author: Eric Blake <ebl...@redhat.com>
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
    M nbd/server.c

  Log Message:
  -----------
  nbd/server: Mark negotiation functions as coroutine_fn

nbd_negotiate() is already marked coroutine_fn.  And given the fix in
the previous patch to have nbd_negotiate_handle_starttls not create
and wait on a g_main_loop (as that would violate coroutine
constraints), it is worth marking the rest of the related static
functions reachable only during option negotiation as also being
coroutine_fn.

Suggested-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
Signed-off-by: Eric Blake <ebl...@redhat.com>
Message-ID: <20240408160214.1200629-6-ebl...@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
[eblake: drop one spurious coroutine_fn marking]
Signed-off-by: Eric Blake <ebl...@redhat.com>
(cherry picked from commit 4fa333e08dd96395a99ea8dd9e4c73a29dd23344)
Signed-off-by: Michael Tokarev <m...@tls.msk.ru>


Compare: https://github.com/qemu/qemu/compare/8216663a5c88...37751067b175

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications

Reply via email to