Re: [PATCH 03/23] hw/ppc/e500: Prefer QOM cast

2024-09-23 Thread BALATON Zoltan
On Mon, 23 Sep 2024, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow Reviewed-by: BALATON Zoltan --- hw/ppc/e500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index f68779a1ea..32996c188e 100644 --- a/hw/ppc/e500.c +++ b/hw/pp

Re: [PATCH v4 03/12] tcg/riscv: Add vset{i}vli and ld/st vec ops

2024-09-23 Thread Richard Henderson
On 9/23/24 06:46, LIU Zhiwei wrote: On 2024/9/22 12:46, Richard Henderson wrote: On 9/11/24 15:26, LIU Zhiwei wrote: @@ -2129,6 +2389,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)     static void tcg_out_tb_start(TCGContext *s)   { +    s->riscv_cur_type = TCG_TYPE_COUNT;   /* n

Re: [PATCH] target/arm: Avoid target_ulong for physical address lookups

2024-09-23 Thread Richard Henderson
On 9/23/24 11:22, Ard Biesheuvel wrote: From: Ard Biesheuvel target_ulong is typedef'ed as a 32-bit integer when building the qemu-system-arm target, and this is smaller than the size of an intermediate physical address when LPAE is being used. Given that Linux may place leaf level user page ta

Re: [PATCH 02/23] hw/ppc/e500: Reduce scope of env pointer

2024-09-23 Thread BALATON Zoltan
On Mon, 23 Sep 2024, Bernhard Beschow wrote: The env pointer isn't used outside the for loop, so move it inside. After that, the firstenv pointer is never read, so remove it. It's probably the other way arouns, you remove firstenv (which is the bigger part of this patch) then it's clear env is

[PATCH 2/3] hw/gpio/gpio_pwr: Split into separate gpio_poweroff and gpio_restart devices

2024-09-23 Thread Bernhard Beschow
Take inspiration from Linux which has separate device tree bindings for the two GPIO lines. The naming of the two device models matches Linux' compatible properties. Signed-off-by: Bernhard Beschow --- MAINTAINERS | 3 +- hw/arm/virt.c | 32 +-- hw/gpio/gpi

[PATCH 3/3] hw/ppc/e500: Reuse TYPE_GPIO_POWEROFF

2024-09-23 Thread Bernhard Beschow
The ppce500 machine provides a device tree node whose compatible property is "gpio-poweroff". This matches TYPE_GPIO_POWEROFF like used in the ARM virt machine, so reuse it. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 15 +++ hw/ppc/Kconfig | 1 + 2 files changed, 4 inserti

[PATCH 0/3] Split TYPE_GPIOPWR and reuse in E500 machines

2024-09-23 Thread Bernhard Beschow
This series is part of a bigger series exploring data-driven machine creation using device tree blobs on top of the e500 machines [1]. The idea is to instantiate a QEMU device model for each device tree node containing a compatible property. [1] achieves feature-parity with the hardcoded machines w

Re: [PATCH 04/23] hw/ppc/e500: Remove unused "irqs" parameter

2024-09-23 Thread BALATON Zoltan
On Mon, 23 Sep 2024, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow Reviewed-by: BALATON Zoltan --- hw/ppc/e500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 32996c188e..228287b457 100644 --- a/hw/ppc/e500.c +++ b/hw/pp

[PATCH 1/3] MAINTAINERS: Add hw/gpio/gpio_pwr.c

2024-09-23 Thread Bernhard Beschow
The device is only used in the ARM virt machine and designed to be used on top of pl061 for use cases such as ARM Trusted Firmware. Add it to the same section as hw/gpio/pl061.c. Signed-off-by: Bernhard Beschow --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAI

Re: [PATCH 06/23] hw/ppc/e500: Use SysBusDevice API to access TYPE_CCSR's internal resources

2024-09-23 Thread BALATON Zoltan
On Mon, 23 Sep 2024, Bernhard Beschow wrote: Rather than accessing the attributes of TYPE_CCSR directly, use the SysBusDevice API which exists exactly for that purpose. Furthermore, registering the memory region with the SysBusDevice API makes it show up in QMP's `info qom-tree` command. Signed-

Re: [PATCH 07/23] hw/ppc/e500: Extract ppce500_ccsr.c

2024-09-23 Thread BALATON Zoltan
On Mon, 23 Sep 2024, Bernhard Beschow wrote: The device model already has a header file. Also extract its implementation into an accompanying source file like other e500 devices. This commit is also a preparation for the next commit. Signed-off-by: Bernhard Beschow --- MAINTAINERS |

Re: [PATCH 09/23] hw/ppc/mpc8544_guts: Populate POR PLL ratio status register

2024-09-23 Thread BALATON Zoltan
On Mon, 23 Sep 2024, Bernhard Beschow wrote: Populate this read-only register with some arbitrary values which avoids U-Boot's get_clocks() to hang(). Maybe this should be a property settable by the machine as each board may have different values and it may need to use the correct value for th

Re: [PATCH 12/23] hw/pci-host/ppce500: Reuse TYPE_PPC_E500_PCI_BRIDGE define

2024-09-23 Thread BALATON Zoltan
On Mon, 23 Sep 2024, Bernhard Beschow wrote: Prefer a macro rather than a string literal when instantiaging device models. Signed-off-by: Bernhard Beschow Reviewed-by: BALATON Zoltan --- hw/pci-host/ppce500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/pp

[PATCH] testing: bump mips64el cross to bookworm and allow to fail

2024-09-23 Thread Alex Bennée
The mips64el cross setup is very broken for bullseye which has now entered LTS support so is unlikely to be fixed. While we still can't build the container for bookworm due to a single missing dependency that will hopefully get fixed in due course. For the sake of keeping the CI green we mark it as

Re: [PATCH v1 01/14] s390x/s390-virtio-ccw: don't crash on weird RAM sizes

2024-09-23 Thread David Hildenbrand
On 10.09.24 19:57, David Hildenbrand wrote: KVM is not happy when starting a VM with weird RAM sizes: # qemu-system-s390x --enable-kvm --nographic -m 1234K qemu-system-s390x: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION failed, slot=0, start=0x0, size=0x244000: Invalid argum

Re: [PATCH v1 06/14] s390x: introduce s390_get_memory_limit()

2024-09-23 Thread David Hildenbrand
Looks good. Looking at the patch again I'm wondering if using globals in qemu is still encouraged. I know it's a common pattern today, but seeing efforts like the multiarch binary or Unicorn I'm wondering if there is aspirations to do things more "cleanly", in general, for far out benefits

RE: [SPAM] [PATCH v3 00/11] support I2C for AST2700

2024-09-23 Thread Jamin Lin
Hi Cedric, > Subject: RE: [SPAM] [PATCH v3 00/11] support I2C for AST2700 > > Hi Cedric, > > > Subject: Re: [SPAM] [PATCH v3 00/11] support I2C for AST2700 > > > > Hello Jamin, > > > > > Just want you to know that I and Troy are working on the following > > > tasks for > > AST2700. > > > 1. Supp

Re: [PATCH 01/23] hw/ppc/e500: Do not leak struct boot_info

2024-09-23 Thread BALATON Zoltan
On Mon, 23 Sep 2024, Bernhard Beschow wrote: The struct is allocated once with g_new0() but never free()'d. Fix the leakage by adding an attribute to struct PPCE500MachineState which avoids the allocation. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.h | 8 hw/ppc/e500.c | 17 --

Re: [PATCH] target/arm: Avoid target_ulong for physical address lookups

2024-09-23 Thread Arnd Bergmann
On Mon, Sep 23, 2024, at 09:22, Ard Biesheuvel wrote: > From: Ard Biesheuvel > > target_ulong is typedef'ed as a 32-bit integer when building the > qemu-system-arm target, and this is smaller than the size of an > intermediate physical address when LPAE is being used. > > Given that Linux may plac

Re: [PATCH v2 5/5] amd_iommu: Check APIC ID > 255 for XTSup

2024-09-23 Thread Shukla, Santosh
On 9/21/2024 1:56 AM, Alejandro Jimenez wrote: > > > On 9/16/24 10:31, Santosh Shukla wrote: >> From: Suravee Suthikulpanit >> >> The XTSup mode enables x2APIC support for AMD IOMMU, which is needed >> to support vcpu w/ APIC ID > 255. >> >> Signed-off-by: Suravee Suthikulpanit >> Signed-off

Re: [PATCH v4 2/2] target/loongarch: Implement lbt registers save/restore function

2024-09-23 Thread gaosong
在 2024/9/10 上午10:24, maobibo 写道: On 2024/9/9 下午9:13, gaosong wrote: 在 2024/9/9 下午7:52, gaosong 写道: 在 2024/9/4 下午2:18, Bibo Mao 写道: Six registers scr0 - scr3, eflags and ftop are added in percpu vmstate. And two functions kvm_loongarch_get_lbt/kvm_loongarch_put_lbt are added to save/resto

[PATCH] target/arm: Avoid target_ulong for physical address lookups

2024-09-23 Thread Ard Biesheuvel
From: Ard Biesheuvel target_ulong is typedef'ed as a 32-bit integer when building the qemu-system-arm target, and this is smaller than the size of an intermediate physical address when LPAE is being used. Given that Linux may place leaf level user page tables in high memory when built for LPAE,

Re: [PATCH 11/23] hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro

2024-09-23 Thread BALATON Zoltan
On Mon, 23 Sep 2024, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow --- hw/i2c/mpc_i2c.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 3d79c15653..16f4309ea9 100644 --- a/hw/i2c/mpc_i2c.c +++ b/hw/i2c/m

Re: [PATCH v7 3/4] qcow2: add zoned emulation capability

2024-09-23 Thread Sam Li
Hi Stefan, I apologized for the late reply. Stefan Hajnoczi 于2024年3月12日周二 20:02写道: > > On Mon, Jan 22, 2024 at 07:48:29PM +0100, Sam Li wrote: > > By adding zone operations and zoned metadata, the zoned emulation > > capability enables full emulation support of zoned device using > > a qcow2 fil

Re: [PATCH v7 3/4] qcow2: add zoned emulation capability

2024-09-23 Thread Sam Li
Hi Damien, Damien Le Moal 于2024年9月23日周一 15:22写道: > > On 2024/09/23 13:06, Sam Li wrote: > > [...] > > >>> @@ -2837,6 +3180,19 @@ qcow2_co_pwritev_part(BlockDriverState *bs, > >>> int64_t offset, int64_t bytes, > >>> qiov_offset += cur_bytes; > >>> trace_qcow2_writev_done_part(q

Re: [PATCH v1 01/14] s390x/s390-virtio-ccw: don't crash on weird RAM sizes

2024-09-23 Thread Thomas Huth
On 23/09/2024 11.19, David Hildenbrand wrote: On 10.09.24 19:57, David Hildenbrand wrote: KVM is not happy when starting a VM with weird RAM sizes:    # qemu-system-s390x --enable-kvm --nographic -m 1234K    qemu-system-s390x: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION failed,

Re: [PATCH v1 1/1] block/file-posix: Avoid maybe-uninitialized warning

2024-09-23 Thread Edgar E. Iglesias
Ping! On Wed, Aug 14, 2024 at 01:15:55PM -0500, Eric Blake wrote: > On Mon, Aug 12, 2024 at 04:43:23PM GMT, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Avoid a maybe-uninitialized warning in raw_refresh_zoned_limits() > > by initializing zoned. > > > > With GCC 14.1.0: > > In

Re: [PATCH v2] Add -build-info and -build-info-json CLI arguments

2024-09-23 Thread Daniel P . Berrangé
should aim to close those gaps. IOW, I don't think we should expose this build info info in either human readable or machine readable format. > > Signed-off-by: Manos Pitsidianakis > --- > Changes in v2: > - Fixed alignment of command and documentation in -h output

Re: [PATCH v2] Add -build-info and -build-info-json CLI arguments

2024-09-23 Thread Pierrick Bouvier
ff-by: Manos Pitsidianakis --- Changes in v2: - Fixed alignment of command and documentation in -h output. - Link to v1: https://lore.kernel.org/r/20240923-feature-build-info-cli-v1-1-e8c42d845...@linaro.org --- Notes: Sample output: $ ./qemu-system-aarch64 -build-info ./qemu-system-aarch64 ve

Re: 回复: [PATCH] migration/multifd: receive channel socket needs to be set to non-blocking

2024-09-23 Thread Daniel P . Berrangé
On Mon, Sep 23, 2024 at 01:33:13AM +, Yuchen wrote: > > > > -邮件原件- > > 发件人: Peter Xu > > 发送时间: 2024年9月20日 23:53 > > 收件人: yuchen (CCSPL) > > 抄送: faro...@suse.de; qemu-devel@nongnu.org > > 主题: Re: [PATCH] migration/multifd: receive channel socket needs to be set to > > non-blocking >

Re: [PATCH v1 01/14] s390x/s390-virtio-ccw: don't crash on weird RAM sizes

2024-09-23 Thread David Hildenbrand
On 23.09.24 17:36, Thomas Huth wrote: On 23/09/2024 11.19, David Hildenbrand wrote: On 10.09.24 19:57, David Hildenbrand wrote: KVM is not happy when starting a VM with weird RAM sizes:    # qemu-system-s390x --enable-kvm --nographic -m 1234K    qemu-system-s390x: kvm_set_user_memory_region:

Re: [PATCH] hw/xen: Remove deadcode

2024-09-23 Thread Edgar E. Iglesias
On Tue, Sep 17, 2024 at 09:03:09AM +, Anthony PERARD wrote: > On Tue, Sep 17, 2024 at 01:22:12AM +0100, d...@treblig.org wrote: > > From: "Dr. David Alan Gilbert" > > > > xen_be_copy_grant_refs is unused since 2019's > > 19f87870ba ("xen: remove the legacy 'xen_disk' backend") > > > > xen_

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-09-23 Thread Eric Blake
On Sun, Sep 22, 2024 at 08:51:22PM GMT, Richard W.M. Jones wrote: > On Thu, Mar 28, 2024 at 02:13:42PM +, Richard W.M. Jones wrote: > > On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > > > Since version 2.66, glib has useful URI parsing functions, too. > > > Use those instead of t

Re: [PATCH 00/18] Stop all qemu-cpu threads on a breakpoint

2024-09-23 Thread Ilya Leoshkevich
On Mon, 2024-09-23 at 18:12 +0200, Ilya Leoshkevich wrote: > Hi, > > On reporting a breakpoint in a non-non-stop mode, GDB remotes must > stop > all threads. Currently qemu-user doesn't do that, breaking the > debugging session for at least two reasons: concurrent access to the > GDB socket, and a

[PATCH 02/18] gdbstub: Move phy_memory_mode to GDBSystemState

2024-09-23 Thread Ilya Leoshkevich
Follow the convention that all the pieces of the global stub state must be inside a single struct. Signed-off-by: Ilya Leoshkevich --- gdbstub/system.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gdbstub/system.c b/gdbstub/system.c index 1ad87fe7fdf..5ce357c6

[PATCH 12/18] cpu: Track CPUs executing syscalls

2024-09-23 Thread Ilya Leoshkevich
CPUs that execute syscalls should be considered paused by all_vcpus_paused(). Lay the groundwork by introducing a bool field in CPUState to track this. The field is not used by sysemu, but it's only one byte, so it should not be a problem. Signed-off-by: Ilya Leoshkevich --- accel/tcg/user-exec.

[PATCH 01/18] gdbstub: Make gdb_get_char() static

2024-09-23 Thread Ilya Leoshkevich
It's user-only since commit a7e0f9bd2ace ("gdbstub: abstract target specific details from gdb_put_packet_binary"). Signed-off-by: Ilya Leoshkevich --- gdbstub/internals.h | 2 -- gdbstub/user.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/gdbstub/internals.h b/gdbst

[PATCH 15/18] cpu: Set current_cpu early in qemu-user

2024-09-23 Thread Ilya Leoshkevich
qemu_plugin_get_registers() may be called before cpu_exec(), and it requires current_cpu. Signed-off-by: Ilya Leoshkevich --- bsd-user/main.c | 1 + linux-user/main.c| 1 + linux-user/syscall.c | 1 + 3 files changed, 3 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index

[PATCH 05/18] accel/tcg: Factor out cpu_exec_user()

2024-09-23 Thread Ilya Leoshkevich
All linux-user cpu_loop() implementations contain the same sequence of function calls. Factor them out so that they can be changed in one place. Signed-off-by: Ilya Leoshkevich --- accel/tcg/user-exec.c | 12 bsd-user/aarch64/target_arch_cpu.h | 6 +- bsd-user/arm/

[PATCH 08/18] replay: Add replay_mutex_{lock, unlock}() stubs for qemu-user

2024-09-23 Thread Ilya Leoshkevich
Sharing pause_all_vcpus() with qemu-user requires providing no-op definitions of replay mutex functions. Make these functions available via replay-core.h and move the existing stubs to a separate file. Signed-off-by: Ilya Leoshkevich --- include/exec/replay-core.h | 13 + include/sys

[PATCH 06/18] qemu-thread: Introduce QEMU_MUTEX_INITIALIZER

2024-09-23 Thread Ilya Leoshkevich
Allow static initialization of mutexes. Signed-off-by: Ilya Leoshkevich --- include/qemu/thread-posix.h | 6 ++ include/qemu/thread-win32.h | 6 ++ 2 files changed, 12 insertions(+) diff --git a/include/qemu/thread-posix.h b/include/qemu/thread-posix.h index 5f2f3d1386b..fc0846bfa7c 100

[PATCH 09/18] qemu-timer: Provide qemu_clock_enable() stub for qemu-user

2024-09-23 Thread Ilya Leoshkevich
Sharing pause_all_vcpus() with qemu-user requires a no-op implementation of qemu_clock_enable(). Signed-off-by: Ilya Leoshkevich --- stubs/meson.build | 4 stubs/qemu-timer.c | 6 ++ 2 files changed, 10 insertions(+) create mode 100644 stubs/qemu-timer.c diff --git a/stubs/meson.buil

[PATCH 14/18] cpu: Introduce cpu_is_paused()

2024-09-23 Thread Ilya Leoshkevich
A qemu-system CPU is considered paused as a result of an external request. A qemu-user CPU, in addition to that, should be considered paused when it's executing a syscall. Signed-off-by: Ilya Leoshkevich --- accel/tcg/user-exec.c | 5 + include/exec/cpu-common.h | 1 + system/cpus.c

[PATCH 18/18] tests/tcg: Stress test thread breakpoints

2024-09-23 Thread Ilya Leoshkevich
Add a test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/Makefile.target | 13 ++- .../gdbstub/test-thread-breakpoint-stress.py | 28 ++ .../tcg/multiarch/thread-breakpoint-stress.c | 92 +++ 3 files changed, 132 insertions(+), 1

[PATCH 03/18] gdbstub: Move gdb_syscall_mode to GDBSyscallState

2024-09-23 Thread Ilya Leoshkevich
Follow the convention that all the pieces of the global stub state must be inside a single struct. Signed-off-by: Ilya Leoshkevich --- gdbstub/syscalls.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gdbstub/syscalls.c b/gdbstub/syscalls.c index 4e129

[PATCH 07/18] qemu-thread: Introduce QEMU_COND_INITIALIZER

2024-09-23 Thread Ilya Leoshkevich
Allow static initialization of condition variables. Signed-off-by: Ilya Leoshkevich --- include/qemu/thread-posix.h | 2 ++ include/qemu/thread-win32.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/qemu/thread-posix.h b/include/qemu/thread-posix.h index fc0846bfa7c..ed08181a9c6

[PATCH 00/18] Stop all qemu-cpu threads on a breakpoint

2024-09-23 Thread Ilya Leoshkevich
Hi, On reporting a breakpoint in a non-non-stop mode, GDB remotes must stop all threads. Currently qemu-user doesn't do that, breaking the debugging session for at least two reasons: concurrent access to the GDB socket, and an assertion within GDB [1]. This series fixes this by importing pause_al

[PATCH 10/18] cpu: Use BQL in qemu-user

2024-09-23 Thread Ilya Leoshkevich
Currently BQL is stubbed out in qemu-user. However, enabling the ability to pause and resume CPUs requires BQL, so introduce it. Signed-off-by: Ilya Leoshkevich --- accel/tcg/user-exec.c | 2 ++ bsd-user/freebsd/os-syscall.c | 6 bsd-user/main.c | 2 ++ cpu-common.c

[PATCH 17/18] gdbstub: Pause all CPUs before sending stop replies

2024-09-23 Thread Ilya Leoshkevich
This is required by the GDB remote protocol. Signed-off-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 2 ++ gdbstub/user.c| 10 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index a096104b07a..be632f8b214 100644 --- a/gdbstub/

[PATCH 16/18] cpu: Allow pausing and resuming CPUs in qemu-user

2024-09-23 Thread Ilya Leoshkevich
Move the respective functions from sysemu to cpu-common. Signed-off-by: Ilya Leoshkevich --- accel/tcg/user-exec-stub.c | 4 -- accel/tcg/user-exec.c | 11 +++- cpu-common.c | 115 + include/exec/cpu-common.h | 7 +++ include/sysemu/cp

[PATCH 04/18] gdbstub: Factor out gdb_try_stop()

2024-09-23 Thread Ilya Leoshkevich
Move checking and setting allow_stop_reply into a function. Signed-off-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 15 +++ gdbstub/internals.h | 2 ++ gdbstub/system.c| 6 ++ gdbstub/user.c | 11 --- 4 files changed, 19 insertions(+), 15 deletions(-) diff -

[PATCH 13/18] cpu: Implement cpu_thread_is_idle() for qemu-user

2024-09-23 Thread Ilya Leoshkevich
Stopped CPUs are parked until cpu_thread_is_idle() is true, so implement it for qemu-user. Share a part of the qemu-system's implementation. Signed-off-by: Ilya Leoshkevich --- accel/tcg/user-exec.c | 12 cpu-common.c | 19 +++ include/exec/cpu-commo

[PATCH 11/18] accel/tcg: Unify user implementations of qemu_cpu_kick()

2024-09-23 Thread Ilya Leoshkevich
linux-user and bsd-user have the same implementation. Move it to user-exec.c. Signed-off-by: Ilya Leoshkevich --- accel/tcg/user-exec.c | 5 + bsd-user/main.c | 5 - linux-user/main.c | 5 - 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/accel/tcg/user-exec

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-09-23 Thread Daniel P . Berrangé
On Mon, Sep 23, 2024 at 11:03:08AM -0500, Eric Blake wrote: > On Sun, Sep 22, 2024 at 08:51:22PM GMT, Richard W.M. Jones wrote: > > On Thu, Mar 28, 2024 at 02:13:42PM +, Richard W.M. Jones wrote: > > > On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > > > > Since version 2.66, glib

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-09-23 Thread Richard W.M. Jones
On Mon, Sep 23, 2024 at 06:38:27PM +0200, Daniel P. Berrangé wrote: > On Mon, Sep 23, 2024 at 11:03:08AM -0500, Eric Blake wrote: > > On Sun, Sep 22, 2024 at 08:51:22PM GMT, Richard W.M. Jones wrote: > > > On Thu, Mar 28, 2024 at 02:13:42PM +, Richard W.M. Jones wrote: > > > > On Thu, Mar 28, 2

Re: Using ubuntu24.4 system qemu-system-aarch64 +gdb-multiarch to debug the kernel, setting breakpoints cannot be stopped

2024-09-23 Thread Ilya Leoshkevich
On Mon, 2024-09-23 at 22:36 +0800, jie ren wrote: > Hi, I have a question for help >     I recently  Using ubuntu24.4 system qemu-system-aarch64 +gdb- > multiarch to debug the kernel, setting breakpoints cannot be stopped. >    system information: >         ubuntu version: 22.04 >     Debug ker

Re: [RFC PATCH] ppc/spapr: Change printf format to %HWADDR_PRId for MIN_RMA_SLOF

2024-09-23 Thread Aditya Gupta
Hi Philippe, Sorry for the late reply. On 12/09/24 12:34, Philippe Mathieu-Daudé wrote: Hi Aditya, On 12/9/24 08:52, Aditya Gupta wrote: Currently starting a pSeries machine, with lesser than 128MiB shows below error: qemu-system-ppc64: pSeries SLOF firmware requires >= 80ldMiB guest

Re: [PATCH] typo: Fix description of '--disable-debug-info'

2024-09-23 Thread Aditya Gupta
Hi, Seems there are more confusing option descriptions like: +  printf "%s\n" '  --disable-install-blobs  install provided firmware blobs' ... +  printf "%s\n" '  --disable-coroutine-pool coroutine freelist (better performance)' Should we change them ? Thanks, Aditya Gupta On 23/09/2

Re: [PATCH v7 3/4] qcow2: add zoned emulation capability

2024-09-23 Thread Damien Le Moal
On 2024/09/23 15:40, Sam Li wrote: > Hi Damien, > > Damien Le Moal 于2024年9月23日周一 15:22写道: >> >> On 2024/09/23 13:06, Sam Li wrote: >> >> [...] >> > @@ -2837,6 +3180,19 @@ qcow2_co_pwritev_part(BlockDriverState *bs, > int64_t offset, int64_t bytes, > qiov_offset += cur_bytes;

Re: [PATCH v7 3/4] qcow2: add zoned emulation capability

2024-09-23 Thread Sam Li
On Mon, Sep 23, 2024 at 15:48 Damien Le Moal wrote: > On 2024/09/23 15:40, Sam Li wrote: > > Hi Damien, > > > > Damien Le Moal 于2024年9月23日周一 15:22写道: > >> > >> On 2024/09/23 13:06, Sam Li wrote: > >> > >> [...] > >> > > @@ -2837,6 +3180,19 @@ qcow2_co_pwritev_part(BlockDriverState *bs, > int

Re: [PATCH 0/2] hw/loongarch/booting: Booting protocol refactoring

2024-09-23 Thread Jiaxun Yang
在2024年9月23日九月 下午1:34,gaosong写道: > 在 2024/9/14 下午8:10, Jiaxun Yang 写道: >> Hi all, >> >> This series refactored booting protocol generation code >> to better accommodate different host ABI / Alignment and >> endianess. >> >> It also enhanced LoongArch32 support. > Hi, > > I tested LoongArch64 and

[PATCH v2 1/4] hw/xen: Expose handle_bufioreq in xen_register_ioreq

2024-09-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Expose handle_bufioreq in xen_register_ioreq(). This is to allow machines to enable or disable buffered ioreqs. No functional change since all callers still set it to HVM_IOREQSRV_BUFIOREQ_ATOMIC. Signed-off-by: Edgar E. Iglesias --- hw/i386/xen/xen-hvm.c |

[PATCH v2 0/4] hw/arm: xenpvh: Enable PCI for ARM PVH

2024-09-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Enable PCI on the ARM PVH machine. First we add a way to control the use of buffered IOREQ's since those are not supported on Xen/ARM. Finally we enable the PCI support. I've published some instructions on how to try this including the work in progress Xen side of the P

[PATCH v2 4/4] hw/arm: xenpvh: Enable PCI for ARM PVH

2024-09-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Enable PCI support for the ARM Xen PVH machine. Reviewed-by: Stefano Stabellini Signed-off-by: Edgar E. Iglesias --- hw/arm/xen-pvh.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/arm/xen-pvh.c b/hw/arm/xen-pvh.c index 28af3910ea..33f0dd5982

[PATCH v2 3/4] hw/xen: xenpvh: Add pci-intx-irq-base property

2024-09-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Acked-by: Stefano Stabellini Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-pvh-common.c | 36 1 file changed, 36 insertions(+) diff --git a/hw/xen/xen-pvh-common.c b/hw/xen/xen-pvh-common.c index 76a9b2b945..218ac851cf 100644 --

[PATCH v2 2/4] hw/xen: xenpvh: Disable buffered IOREQs for ARM

2024-09-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add a way to enable/disable buffered IOREQs for PVH machines and disable them for ARM. ARM does not support buffered IOREQ's nor the legacy way to map IOREQ info pages. See the following for more details: https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=2fbd7e60

Re: [PATCH v2 0/5] Interrupt Remap support for emulated amd viommu

2024-09-23 Thread Shukla, Santosh
Hi Alejandro, On 9/21/2024 2:09 AM, Alejandro Jimenez wrote: > Hi Santosh, > > > On 9/16/24 10:31, Santosh Shukla wrote: >> Series adds following feature support for emulated amd vIOMMU >> 1) Pass Through(PT) mode >> 2) Interrupt Remapping(IR) mode >> >> 1) PT mode >> Introducing the shared 'nod

Re: [PATCH v2 4/5] amd_iommu: Send notification when invaldate interrupt entry cache

2024-09-23 Thread Shukla, Santosh
On 9/21/2024 1:56 AM, Alejandro Jimenez wrote: > In subject: > s/invaldate/invalidate/ > > On 9/16/24 10:31, Santosh Shukla wrote: >> From: Suravee Suthikulpanit >> >> In order to support AMD IOMMU interrupt remapping emulation with PCI >> pass-through devices, QEMU needs to notify VFIO when g

Re: [PATCH] target/loongarch/kvm: Implement LoongArch PMU extension

2024-09-23 Thread gaosong
在 2024/9/18 下午4:23, Bibo Mao 写道: Implement PMU extension for LoongArch kvm mode. Use OnOffAuto type variable pmu to check the PMU feature. If the PMU Feature is not supported with KVM host, it reports error if there is pmu=on command line. If there is no any command line about pmu parameter, it

Re: [PATCH 0/2] hw/loongarch/booting: Booting protocol refactoring

2024-09-23 Thread gaosong
在 2024/9/14 下午8:10, Jiaxun Yang 写道: Hi all, This series refactored booting protocol generation code to better accommodate different host ABI / Alignment and endianess. It also enhanced LoongArch32 support. Hi, I tested LoongArch64 and it works well. But how to test LoongArch32? Could you pro

Re: [PATCH v7 3/4] qcow2: add zoned emulation capability

2024-09-23 Thread Damien Le Moal
On 2024/09/23 13:06, Sam Li wrote: [...] >>> @@ -2837,6 +3180,19 @@ qcow2_co_pwritev_part(BlockDriverState *bs, int64_t >>> offset, int64_t bytes, >>> qiov_offset += cur_bytes; >>> trace_qcow2_writev_done_part(qemu_coroutine_self(), cur_bytes); >>> } >>> + >>> +if (bs-

Re: [PATCH] hw/nvme: clear masked events from the aer queue

2024-09-23 Thread Klaus Jensen
On Sep 6 05:28, Arun Kumar wrote: > clear masked events from the aer queue when get log page is issued with > rae=0 without checking for the presence of outstanding aer requests > > Signed-off-by: Arun Kumar > --- Hi Arun, Thanks, LGTM. One small nit below. > hw/nvme/ctrl.c | 9 - >

[PATCH 00/23] E500 Cleanup

2024-09-23 Thread Bernhard Beschow
This series is part of a bigger series exploring data-driven machine creation using device tree blobs on top of the e500 machines [1]. It contains patches to make this exploration easier which are also expected to provide value in themselves. The cleanup starts with the e500 machine class itself,

[PATCH 23/23] hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer

2024-09-23 Thread Bernhard Beschow
Avoids one downcast, making the code more type-safe. Signed-off-by: Bernhard Beschow --- hw/vfio/platform.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index a85c199c76..77bbfbf62c 100644 --- a/hw/vfio/platform.c +++ b/hw/vfi

[PATCH 12/23] hw/pci-host/ppce500: Reuse TYPE_PPC_E500_PCI_BRIDGE define

2024-09-23 Thread Bernhard Beschow
Prefer a macro rather than a string literal when instantiaging device models. Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index 97e5d47cec..d7ff2ba778 100644 --- a/hw/p

[PATCH 22/23] hw/usb/hcd-ehci-sysbus: Prefer DEFINE_TYPES() macro

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/usb/hcd-ehci-sysbus.c | 118 +-- 1 file changed, 50 insertions(+), 68 deletions(-) diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index 2b1652f7a8..87a3bebe3e 100644 --- a/hw/usb/hcd-ehci-sysbus.c +++ b/

[PATCH 20/23] hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/i2c/smbus_eeprom.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c index 9e62c27a1a..1d4d9704bf 100644 --- a/hw/i2c/smbus_eeprom.c +++ b/hw/i2c/smbus_eeprom.c @@ -151,19 +

[PATCH 21/23] hw/rtc/ds1338: Prefer DEFINE_TYPES() macro

2024-09-23 Thread Bernhard Beschow
--- hw/rtc/ds1338.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/rtc/ds1338.c b/hw/rtc/ds1338.c index a5fe221418..6de13caf99 100644 --- a/hw/rtc/ds1338.c +++ b/hw/rtc/ds1338.c @@ -14,7 +14,6 @@ #include "hw/i2c/i2c.h" #include "migration/vmstate.h"

[PATCH 02/23] hw/ppc/e500: Reduce scope of env pointer

2024-09-23 Thread Bernhard Beschow
The env pointer isn't used outside the for loop, so move it inside. After that, the firstenv pointer is never read, so remove it. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 75b0

[PATCH 05/23] hw/ppc/e500: Add missing device tree properties to i2c controller node

2024-09-23 Thread Bernhard Beschow
When compiling a decompiled device tree blob created with dumpdtb, dtc complains with: /soc@e000/i2c@3000: incorrect #address-cells for I2C bus /soc@e000/i2c@3000: incorrect #size-cells for I2C bus Fix this by adding the missing device tree properties. Signed-off-by: Bernhard Beschow

[PATCH 17/23] hw/intc: Guard openpic_kvm.c by dedicated OPENPIC_KVM Kconfig switch

2024-09-23 Thread Bernhard Beschow
Allows to clearly mark code sections relying on this device type. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 2 +- hw/intc/Kconfig | 4 hw/intc/meson.build | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 4ee4304a

[PATCH 19/23] hw/block/pflash_cfi01: Prefer DEFINE_TYPES() macro

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/block/pflash_cfi01.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 7b6ec64442..cf11dada29 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c

[PATCH 04/23] hw/ppc/e500: Remove unused "irqs" parameter

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 32996c188e..228287b457 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -825,7 +825,7 @@ static DeviceState *ppce500_init_mpic_qemu(PPCE5

[PATCH 03/23] hw/ppc/e500: Prefer QOM cast

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index f68779a1ea..32996c188e 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1008,7 +1008,7 @@ void ppce500_init(MachineState *machine) s

[PATCH 13/23] hw/pci-host/ppce500: Prefer DEFINE_TYPES() macro

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce500.c | 42 ++ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index d7ff2ba778..1ce79ea20c 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-hos

[PATCH 06/23] hw/ppc/e500: Use SysBusDevice API to access TYPE_CCSR's internal resources

2024-09-23 Thread Bernhard Beschow
Rather than accessing the attributes of TYPE_CCSR directly, use the SysBusDevice API which exists exactly for that purpose. Furthermore, registering the memory region with the SysBusDevice API makes it show up in QMP's `info qom-tree` command. Signed-off-by: Bernhard Beschow --- hw/pci-host/ppce

[PATCH 07/23] hw/ppc/e500: Extract ppce500_ccsr.c

2024-09-23 Thread Bernhard Beschow
The device model already has a header file. Also extract its implementation into an accompanying source file like other e500 devices. This commit is also a preparation for the next commit. Signed-off-by: Bernhard Beschow --- MAINTAINERS | 2 +- hw/ppc/e500-ccsr.h| 2 ++ hw/ppc/e

[PATCH 14/23] hw/gpio/mpc8xxx: Prefer DEFINE_TYPES() macro

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/gpio/mpc8xxx.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/gpio/mpc8xxx.c b/hw/gpio/mpc8xxx.c index 63b7a5c881..de183c3be5 100644 --- a/hw/gpio/mpc8xxx.c +++ b/hw/gpio/mpc8xxx.c @@ -23,7 +23,6 @@ #include "

[PATCH 10/23] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/i2c/mpc_i2c.c| 9 + hw/i2c/trace-events | 5 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 2467d1a9aa..3d79c15653 100644 --- a/hw/i2c/mpc_i2c.c +++ b/hw/i2c/mpc_i2c.c @@ -24,6 +24,

[PATCH 09/23] hw/ppc/mpc8544_guts: Populate POR PLL ratio status register

2024-09-23 Thread Bernhard Beschow
Populate this read-only register with some arbitrary values which avoids U-Boot's get_clocks() to hang(). Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544_guts.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c index e3540b0281..66

[PATCH 18/23] hw/sd/sdhci: Prefer DEFINE_TYPES() macro

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 62 +-- 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 87122e4245..3ed2d8658a 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -37,7 +37,6 @@

[PATCH 01/23] hw/ppc/e500: Do not leak struct boot_info

2024-09-23 Thread Bernhard Beschow
The struct is allocated once with g_new0() but never free()'d. Fix the leakage by adding an attribute to struct PPCE500MachineState which avoids the allocation. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.h | 8 hw/ppc/e500.c | 17 - 2 files changed, 12 insertions(+

[PATCH 11/23] hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/i2c/mpc_i2c.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c index 3d79c15653..16f4309ea9 100644 --- a/hw/i2c/mpc_i2c.c +++ b/hw/i2c/mpc_i2c.c @@ -20,7 +20,6 @@ #include "qemu/os

[PATCH 08/23] hw/ppc/ppce500_ccsr: Log access to unimplemented registers

2024-09-23 Thread Bernhard Beschow
The CCSR space is just a container which is meant to be covered by platform device memory regions. However, QEMU only implements a subset of these devices. Add some logging to see which devices a guest attempts to access. Signed-off-by: Bernhard Beschow --- hw/ppc/ppce500_ccsr.c | 33 +++

[PATCH 15/23] hw/ppc/mpc8544_guts: Prefer DEFINE_TYPES() macro

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/ppc/mpc8544_guts.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c index 6688fd44c3..cbb1e3adda 100644 --- a/hw/ppc/mpc8544_guts.c +++ b/hw/ppc/mpc8544_guts.c @@ -18,7 +1

[PATCH 16/23] hw/net/fsl_etsec/etsec: Prefer DEFINE_TYPES() macro

2024-09-23 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- hw/net/fsl_etsec/etsec.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c index 3fdd16ef2e..9bd886b996 100644 --- a/hw/net/fsl_etsec/etsec.c +++ b/hw/net/fsl_etsec/et

[PATCH 4/5] hw/gpio/aspeed: Add AST2700 support

2024-09-23 Thread Jamin Lin via
AST2700 integrates two set of Parallel GPIO Controller with maximum 212 control pins, which are 27 groups. (H, exclude pin: H7 H6 H5 H4) In the previous design of ASPEED SOCs, one register is used for setting one function for one set which are 32 pins and 4 groups. ex: GPIO000 is used for setting

[PATCH 3/5] hw/gpio/aspeed: Support different memory region ops

2024-09-23 Thread Jamin Lin via
It set "aspeed_gpio_ops" struct which containing read and write callbacks to be used when I/O is performed on the GPIO region. Besides, in the previous design of ASPEED SOCs, one register is used for setting one function for 32 GPIO pins. ex: GPIO000 is used for setting data value for GPIO A, B, C

[PATCH 2/5] hw/gpio/aspeed: Support to set the different memory size

2024-09-23 Thread Jamin Lin via
According to the datasheet of ASPEED SOCs, a GPIO controller owns 4KB of register space for AST2700, AST2500, AST2400 and AST1030; owns 2KB of register space for AST2600 1.8v and owns 2KB of register space for AST2600 3.3v. It set the memory region size 2KB by default and it does not compatible re

[PATCH 0/5] Support GPIO for AST2700

2024-09-23 Thread Jamin Lin via
v1: support GPIO for AST2700 Jamin Lin (5): hw/gpio/aspeed: Fix coding style hw/gpio/aspeed: Support to set the different memory size hw/gpio/aspeed: Support different memory region ops hw/gpio/aspeed: Add AST2700 support aspeed/soc: Support GPIO for AST2700 hw/arm/aspeed_ast27x0.c

  1   2   >