[Qemu-commits] [qemu/qemu] bbdcc8: target/riscv/kvm: change KVM_REG_RISCV_FP_F to u32

2024-04-28 Thread Eric Blake via Qemu-commits
  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 
  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 
Signed-off-by: Daniel Henrique Barboza 
Reviewed-by: Andrew Jones 
Message-ID: <20231208183835.2411523-2-dbarb...@ventanamicro.com>
Signed-off-by: Alistair Francis 
(cherry picked from commit 49c211ffca00fdf7c0c29072c224e88527a14838)
Signed-off-by: Michael Tokarev 


  Commit: 125b95d79e746cbab6b72683b3382dd372e38c61
  
https://github.com/qemu/qemu/commit/125b95d79e746cbab6b72683b3382dd372e38c61
  Author: Daniel Henrique Barboza 
  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 
Signed-off-by: Daniel Henrique Barboza 
Reviewed-by: Andrew Jones 
Message-ID: <20231208183835.2411523-3-dbarb...@ventanamicro.com>
Signed-off-by: Alistair Francis 
(cherry picked from commit 450bd6618fda3d2e2ab02b2fce1c79efd5b66084)
Signed-off-by: Michael Tokarev 


  Commit: cbae1080988e0f1af0fb4c816205f7647f6de16f
  
https://github.com/qemu/qemu/commit/cbae1080988e0f1af0fb4c816205f7647f6de16f
  Author: Daniel Henrique Barboza 
  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 
Signed-off-by: Daniel Henrique Barboza 
Reviewed-by: Andrew Jones 
Message-ID: <20231208183835.2411523-4-dbarb...@ventanamicro.com>
Signed-off-by: Alistair Francis 
(cherry picked from commit 10f86d1b845087d14b58d65dd2a6e3411d1b6529)
Signed-off-by: Michael Tokarev 


  Commit: 55b88e61edcd472ad8e1222acacaf7ded0f18c20
  
https://github.com/qemu/qemu/commit/55b88e61edcd472ad8e1222acacaf7ded0f18c20
  Author: Li Zhijian 
  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  0x561af7948362 in bdrv_graph_rdlock_main_loop () at 
../block/graph-lock.c:260
 #5  0x561af7907a68 in graph_lockable_auto_lock_mainloop (x=0x7fd29810be7b) 
at /patch/to/qemu/include/block/graph-lock.h:259
 #6  0x561af79167d1 in bdrv_activate_all (errp=0x7fd29810bed0) at 
../block.c:6906
 #7  0x561af762b4af in colo_incoming_co () at ../migration/colo.c:935
 #8  0x561af7607e57 in process_incoming_migration_co (opaque=0x0) at 
../migration/migration.c:793
 #9  0x561af7adbeeb in coroutine_trampoline (i0=-106876144, i1=22042) at 
../util/coroutine-ucontext.c:175
 #10 0x7fd2a5cf21c0 in  () at /lib64/libc.so.6

Cc: qemu-sta...@nongnu.org
Cc: Fabiano Rosas 
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 
Reviewed-by: Zhang Chen 
Tested-by: Zhang Chen 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240417025634.1014582-1-lizhij...@fujitsu.com
Signed-off-by: Peter Xu 
(cherry picked from commit 2cc637f1ea08d2a1b19fc5b1a30bc609f948de93)
Signed-off-by: Michael Tokarev 
(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 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: do_setsockopt: fix SOL

[Qemu-commits] [qemu/qemu] b7084b: hw/loongarch: Move boot functions to boot.c

2024-04-28 Thread Richard Henderson via Qemu-commits
.@loongson.cn>


  Commit: b93e2e34d53160926991d0764f1d2f7f03935ce0
  
https://github.com/qemu/qemu/commit/b93e2e34d53160926991d0764f1d2f7f03935ce0
  Author: Richard Henderson 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
A hw/loongarch/boot.c
M hw/loongarch/meson.build
M hw/loongarch/virt.c
M include/hw/intc/loongarch_extioi.h
A include/hw/loongarch/boot.h
M include/hw/loongarch/virt.h
M include/hw/pci-host/ls7a.h
M target/loongarch/cpu.h

  Log Message:
  ---
  Merge tag 'pull-loongarch-20240428' of https://gitlab.com/gaosong/qemu into 
staging

Add boot LoongArch elf kernel with FDT

# -BEGIN PGP SIGNATURE-
#
# iLMEAAEKAB0WIQS4/x2g0v3LLaCcbCxAov/yOSY+3wUCZi4PygAKCRBAov/yOSY+
# 3zawBACxXN/3Ifz+v8xNMCB1A1YuBQI4VtVtmmZxUUchia1zEFfnk78PZagrWrme
# VcYAqVgm9ll5QQvE9+ihmVYuqXli9b81jk4JF3zJNmxzHjm/iDYoDp6OUrYu1sNO
# +4bueDkcgyl6b5V6d30MF94OrSef9pdw5rN1lVJGO76mz64h6g==
# =7mMW
# -END PGP SIGNATURE-
# gpg: Signature made Sun 28 Apr 2024 01:58:50 AM PDT
# gpg:using RSA key B8FF1DA0D2FDCB2DA09C6C2C40A2FFF239263EDF
# gpg: Good signature from "Song Gao " [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:  There is no indication that the signature belongs to the owner.
# Primary key fingerprint: B8FF 1DA0 D2FD CB2D A09C  6C2C 40A2 FFF2 3926 3EDF

* tag 'pull-loongarch-20240428' of https://gitlab.com/gaosong/qemu:
  hw/loongarch: Add cells missing from rtc node
  hw/loongarch: Add cells missing from uart node
  hw/loongarch: fdt remove unused irqchip node
  hw/loongarch: fdt adds pcie irq_map node
  hw/loongarch: fdt adds pch_msi Controller
  hw/loongarch: fdt adds pch_pic Controller
  hw/loongarch: fdt adds Extend I/O Interrupt Controller
  hw/loongarch: fdt adds cpu interrupt controller node
  hw/loongarch: Fix fdt memory node wrong 'reg'
  hw/loongarch: Init efi_fdt table
  hw/loongarch: Init efi_initrd table
  hw/loongarch: Init efi_boot_memmap table
  hw/loongarch: Init efi_system_table
  hw/loongarch: Add init_cmdline
  hw/loongarch: Add slave cpu boot_code
  hw/loongarch: Add load initrd
  hw/loongarch: Move boot functions to boot.c

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/fd87be1dada5...b93e2e34d531

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