Re: [PATCH 23/52] migration/rdma: Clean up qemu_rdma_wait_comp_channel()'s error value

2023-09-24 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> qemu_rdma_wait_comp_channel() returns 0 on success, and either -1 or >> rdma->error_state on failure. Callers actually expect a negative >> error value. > > I don't see the only one callers expect a negative error

Re: [PATCH 21/52] migration/rdma: Fix QEMUFileHooks method return values

2023-09-24 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> The QEMUFileHooks methods don't come with a written contract. Digging >> through the code calling them, we find: >> >> * save_page(): > > I'm fine with this > >> >>Negative values RAM_SAVE_CONTROL_DELAYED and

Re: [PATCH 30/52] migration/rdma: Delete inappropriate error_report() in macro ERROR()

2023-09-24 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > Functions that use an Error **errp parameter to return errors should > not also report them to the user, because reporting is the caller's > job. When the caller does, the error is reported twice. When it > doesn't (because it recovered from the e

Re: [PATCH 29/52] migration/rdma: Plug a memory leak and improve a message

2023-09-24 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > When migration capability @rdma-pin-all is true, but the server cannot > honor it, qemu_rdma_connect() calls macro ERROR(), then returns > success. > > ERROR() sets an error. Since qemu_rdma_connect() returns success, its > caller rdma_start_outgo

Re: [PATCH 3/4] aspeed/i3c: Rename variable shadowing a local

2023-09-24 Thread Andrew Jeffery
On Sat, 23 Sep 2023, at 03:58, Philippe Mathieu-Daudé wrote: > On 22/9/23 17:59, Cédric Le Goater wrote: >> to fix warning : >> >>../hw/i3c/aspeed_i3c.c: In function ‘aspeed_i3c_realize’: >>../hw/i3c/aspeed_i3c.c:1959:17: warning: declaration of ‘dev’ shadows a >> parameter [-Wshadow=l

Re: [PATCH 28/52] migration/rdma: Check negative error values the same way everywhere

2023-09-24 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > When a function returns 0 on success, negative value on error, > checking for non-zero suffices, but checking for negative is clearer. > So do that. > This patch is no my favor convention. @Peter, Juan I'd like to hear your opinions. Thanks Zhi

[PATCH] MAINTAINERS: aspeed: Update Andrew's email address

2023-09-24 Thread Andrew Jeffery
I've changed employers, have company email that deals with patch-based workflows without too much of a headache, and am trying to steer some content out of my personal mail. Signed-off-by: Andrew Jeffery --- Hi Cédric, do you mind including this in your Aspeed queue? MAINTAINERS | 2 +- 1 file

Re: [PATCH 27/52] migration/rdma: Drop superfluous assignments to @ret

2023-09-24 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian > --- > migration/rdma.c | 35 ++- > 1 file changed, 10 insertions(+), 25 deletions(-) > > diff --git a/migration/rdma.c b/migration/rdma.c > index 85f

Re: [PATCH 26/52] migration/rdma: Replace int error_state by bool errored

2023-09-24 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > All we do with the value of RDMAContext member @error_state is test > whether it's zero. Change to bool and rename to @errored. > make sense! Reviewed-by: Li Zhijian Can we move this patch ahead "[PATCH 23/52] migration/rdma: Clean up qemu_rd

RE: [PATCH v2 0/4] Support dynamic MSI-X allocation

2023-09-24 Thread Liu, Jing2
Hi Alex, > On Sat, 9/23/2023 4:57AM, Alex Williamson wrote: > > On Mon, 18 Sep 2023 05:45:03 -0400 > Jing Liu wrote: > > > Changes since v1: > > - v1: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg982842.html > > - Revise Qemu to QEMU. (Cédric) > > - Add g_free when failure of gett

RE: [PATCH v2 2/4] vfio/pci: enable vector on dynamic MSI-X allocation

2023-09-24 Thread Liu, Jing2
Hi Alex, > On Sat, 9/23/2023 4:55 AM, Alex Williamson wrote: > On Mon, 18 Sep 2023 05:45:05 -0400 > Jing Liu wrote: > > > The vector_use callback is used to enable vector that is unmasked in > > guest. The kernel used to only support static MSI-X allocation. When > > allocating a new interrupt

[PATCH] hw/nvme: Clean up local variable shadowing in nvme_ns_init()

2023-09-24 Thread Klaus Jensen
From: Klaus Jensen Fix local variable shadowing in nvme_ns_init(). Reported-by: Markus Armbruster Signed-off-by: Klaus Jensen --- hw/nvme/ns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c index 44aba8f4d9cf..0eabcf5cf500 100644 --- a/hw/n

Re: [PATCH 23/52] migration/rdma: Clean up qemu_rdma_wait_comp_channel()'s error value

2023-09-24 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_wait_comp_channel() returns 0 on success, and either -1 or > rdma->error_state on failure. Callers actually expect a negative > error value. I don't see the only one callers expect a negative error code. migration/rdma.c:1654:re

Re: [PATCH 22/52] migration/rdma: Fix rdma_getaddrinfo() error checking

2023-09-24 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > rdma_getaddrinfo() returns 0 on success. On error, it returns one of > the EAI_ error codes like getaddrinfo() does, Good catch, It used to be -1 on error, rdma_getaddrinfo(3) updated it 2021. or -1 with errno set. > This is broken by design

[PATCH 3/4] target/riscv: vector_helper: Fixup local variables shadowing

2023-09-24 Thread Alistair Francis
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". This patch removes the local variable shadowing. Tested by adding:

[PATCH 0/4] RISC-V: Work towards enabling -Wshadow=local

2023-09-24 Thread Alistair Francis
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". This patch removes the local variable shadowing. Tested by adding:

[PATCH 4/4] softmmu/device_tree: Fixup local variables shadowing

2023-09-24 Thread Alistair Francis
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". This patch removes the local variable shadowing. Tested by adding:

[PATCH 1/4] hw/riscv: opentitan: Fixup local variables shadowing

2023-09-24 Thread Alistair Francis
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". This patch removes the local variable shadowing. Tested by adding:

[PATCH 2/4] target/riscv: cpu: Fixup local variables shadowing

2023-09-24 Thread Alistair Francis
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". This patch removes the local variable shadowing. Tested by adding:

Re: [PATCH 21/52] migration/rdma: Fix QEMUFileHooks method return values

2023-09-24 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > The QEMUFileHooks methods don't come with a written contract. Digging > through the code calling them, we find: > > * save_page(): I'm fine with this > >Negative values RAM_SAVE_CONTROL_DELAYED and >RAM_SAVE_CONTROL_NOT_SUPP are special

Re: [PATCH v3 00/19] riscv: split TCG/KVM accelerators from cpu.c

2023-09-24 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:26 PM Daniel Henrique Barboza wrote: > > Hi, > > In this version we changed patch 10 (remove kvm-stub.c) as suggested by > Phil to not include non-KVM stubs in kvm_riscv.h. A change in patch 05 > requested by Zhiwei was also made. > > Patches based on Alistair's riscv-to-

[PATCH v4 12/28] bsd-user: Implement umask(2), setlogin(2) and getlogin(2)

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/bsd-proc.h | 39 +++ bsd-user/freebsd/os-syscall.c | 12 +++ 2 files changed, 51 insertions(+) diff --git a/bsd-user/bsd-proc.h b/bsd-user/bsd-proc.h index 7b25a

[PATCH v4 27/28] bsd-user: Implement rfork(2) system call.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/freebsd/os-proc.h| 39 +++ bsd-user/freebsd/os-syscall.c | 4 2 files changed, 43 insertions(+) diff --git a/bs

[PATCH v4 10/28] bsd-user: Get number of cpus.

2023-09-24 Thread Karim Taha
From: Kyle Evans Signed-off-by: Kyle Evans Signed-off-by: Karim Taha Reviewed-by: Warner Losh --- bsd-user/bsd-proc.c | 24 bsd-user/bsd-proc.h | 2 ++ 2 files changed, 26 insertions(+) diff --git a/bsd-user/bsd-proc.c b/bsd-user/bsd-proc.c index 19f6efe1f7..ca3c1bf

[PATCH v4 11/28] bsd-user: Implement getgroups(2) and setgroups(2) system calls.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh --- bsd-user/bsd-proc.h | 44 +++ bsd-user/freebsd/os-syscall.c | 9 +++ 2 files changed, 53 insertions(+) diff --git a/bsd-user/bsd-proc.h b/bsd-user/

[PATCH v4 24/28] bsd-user: Implement setloginclass(2) and getloginclass(2) system calls.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-proc.h| 32 bsd-user/freebsd/os-syscall.c | 8 2 files changed, 40 insertions(+) diff --git a/bsd-user/freebsd/os-proc.h b/bsd-user/freebsd/os-proc.h ind

[PATCH v4 21/28] bsd-user: Implement procctl(2) along with necessary conversion functions.

2023-09-24 Thread Karim Taha
From: Stacey Son Implement t2h_procctl_cmd, h2t_reaper_status, h2t_reaper_pidinfo and h2t/t2h reaper_kill conversion functions. Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-proc.c| 222 ++ bsd-user/freebsd/os-syscall.c | 3

[PATCH v4 28/28] bsd-user: Implement pdfork(2) system call.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Acked-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/freebsd/os-proc.h| 32 bsd-user/freebsd/os-syscall.c | 4 2 files changed, 36 insertions(+) diff --git a/bsd-user

[PATCH v4 18/28] bsd-user: Implement getpriority(2) and setpriority(2).

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh --- bsd-user/bsd-proc.h | 24 bsd-user/freebsd/os-syscall.c | 8 2 files changed, 32 insertions(+) diff --git a/bsd-user/bsd-proc.h b/bsd-user/bsd-proc.h

[PATCH v4 17/28] bsd-user: Add stubs for profil(2), ktrace(2), utrace(2) and ptrace(2).

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/bsd-proc.h | 28 bsd-user/freebsd/os-syscall.c | 16 2 files changed, 44 insertions(+) diff --git

[PATCH v4 20/28] bsd-user: Implement freebsd_exec_common, used in implementing execve/fexecve.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh --- bsd-user/freebsd/os-proc.c | 177 + bsd-user/main.c| 2 +- bsd-user/qemu.h| 1 + 3 files changed, 179 insertions(+), 1 deletion(-)

[PATCH v4 22/28] bsd-user: Implement execve(2) and fexecve(2) system calls.

2023-09-24 Thread Karim Taha
Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/freebsd/os-proc.h| 49 +++ bsd-user/freebsd/os-syscall.c | 11 +++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100

[PATCH v4 09/28] bsd-user: Implement host_to_target_waitstatus conversion.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/bsd-proc.c | 17 + 1 file changed, 17 insertions(+) diff --git a/bsd-user/bsd-proc.c b/bsd-user/bsd-proc.c index aa386ff482..19f6efe1f7 1

[PATCH v4 14/28] bsd-user: Implement getrlimit(2) and setrlimit(2)

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/bsd-proc.h | 59 +++ bsd-user/freebsd/os-syscall.c | 8 + 2 files changed, 67 insertions(+) diff --git a/b

[PATCH v4 19/28] bsd-user: Implement get_filename_from_fd.

2023-09-24 Thread Karim Taha
Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/freebsd/meson.build | 1 + bsd-user/freebsd/os-proc.c | 80 2 files changed, 81 insertions(+) create mode 100644 bsd-user/freebsd/os

[PATCH v4 06/28] bsd-user: Implement target_to_host_resource conversion function

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/bsd-proc.c | 40 bsd-user/bsd-proc.h | 4 bsd-user/meson.build | 6 ++ 3 files changed, 50 insertions(+) create mode 100644 bsd-user/bsd-proc.c diff --git a

[PATCH v4 15/28] bsd-user: Implement several get/set system calls:

2023-09-24 Thread Karim Taha
From: Stacey Son getpid(2), getppid(2), getpgrp(2) setreuid(2), setregid(2) getuid(2), geteuid(2), getgid(2), getegid(2), getpgid(2) setuid(2), seteuid(2), setgid(2), setegid(2), setpgid(2) Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner

[PATCH v4 23/28] bsd-user: Implement wait4(2) and wait6(2) system calls.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-proc.h| 84 +++ bsd-user/freebsd/os-syscall.c | 15 +++ 2 files changed, 99 insertions(+) diff --git a/bsd-user/freebsd/os-proc.h b/bsd-user/freebsd/os-proc.h i

[PATCH v4 07/28] bsd-user: Implement target_to_host_rlim and host_to_target_rlim conversion.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/bsd-proc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/bsd-user/bsd-proc.c b/bsd-user/bsd-proc.c index 68410a0aa9..19e39a2f76 100644 -

[PATCH v4 25/28] bsd-user: Implement pdgetpid(2) and the undocumented setugid.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-proc.h| 23 +++ bsd-user/freebsd/os-syscall.c | 8 2 files changed, 31 insertions(+) diff --git a/bsd-user/freebsd/os-proc.h b/bsd-use

[PATCH v4 03/28] bsd-user: Implement host_to_target_siginfo.

2023-09-24 Thread Karim Taha
From: Stacey Son Used in wait6 system call Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/signal-common.h | 1 + bsd-user/signal.c| 6 ++ 2 files changed, 7 insertions(+) diff --git a/bsd-user/signal-comm

[PATCH v4 01/28] bsd-user: define TARGET_RFSPAWN for rfork to use vfork(2) semantics, and fix RLIM_INFINITY

2023-09-24 Thread Karim Taha
RLIM_INFINITY on FreeBSD, OpenBSD and NetBSD has value of ~(1<<63), caculated one way or another. Signed-off-by: Kyle Evans Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/syscall_defs.h | 8 1 file changed, 4 insertions(+), 4 deletions(

[PATCH v4 13/28] bsd-user: Implement getrusage(2).

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/bsd-proc.h | 13 + bsd-user/freebsd/os-syscall.c | 4 2 files changed, 17 insertions(+) diff --git a/bsd-user/bsd-proc.h b/bs

[PATCH v4 05/28] bsd-user: add extern declarations for bsd-proc.c conversion functions

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/qemu-bsd.h | 38 ++ 1 file changed, 38 insertions(+) create mode 100644 bsd-user/qemu-bsd.h diff --git a/bsd-user/qe

[PATCH v4 00/28] bsd-user: Implement freebsd process related system calls.

2023-09-24 Thread Karim Taha
Karim Taha (3): bsd-user: define TARGET_RFSPAWN for rfork to use vfork(2) semantics, and fix RLIM_INFINITY bsd-user: Implement get_filename_from_fd. bsd-user: Implement execve(2) and fexecve(2) system calls. Kyle Evans (1): bsd-user: Get number of cpus. Stacey Son (24): bsd-user:

[PATCH v4 02/28] bsd-user: Define procctl(2) related structs

2023-09-24 Thread Karim Taha
From: Stacey Son Implement procctl flags and related structs: struct target_procctl_reaper_status struct target_procctl_reaper_pidinfo struct target_procctl_reaper_pids struct target_procctl_reaper_kill Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewe

[PATCH v4 26/28] bsd-user: Implement fork(2) and vfork(2) system calls.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/freebsd/os-proc.h| 34 ++ bsd-user/freebsd/os-syscall.c | 8 2 files changed, 42 insertions(+) diff --git a

[PATCH v4 04/28] bsd-user: Add freebsd_exec_common and do_freebsd_procctl to qemu.h.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/qemu.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index d9507137cc..41c7bd31d3 100644 --- a/bsd-user/qemu

[PATCH v4 16/28] bsd-user: Implement get/set[resuid/resgid/sid] and issetugid.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/bsd-proc.h | 76 +++ bsd-user/freebsd/os-syscall.c | 28 + 2 files changed, 104 insertions(+) diff

[PATCH v4 08/28] bsd-user: Implement host_to_target_rusage and host_to_target_wrusage.

2023-09-24 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/bsd-proc.c | 54 + 1 file changed, 54 insertions(+) diff --git a/bsd-user/bsd-proc.c b/bsd-user/bsd-proc.c in

Re: [PATCH v3 19/19] target/riscv/cpu: move priv spec functions to tcg-cpu.c

2023-09-24 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:24 PM Daniel Henrique Barboza wrote: > > Priv spec validation is TCG specific. Move it to the TCG accel class. > > Signed-off-by: Daniel Henrique Barboza > Reviewed-by: Andrew Jones Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 38

Re: [PATCH v3 18/19] target/riscv/cpu.c: export isa_edata_arr[]

2023-09-24 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:23 PM Daniel Henrique Barboza wrote: > > This array will be read by the TCG accel class, allowing it to handle > priv spec verifications on its own. The array will remain here in cpu.c > because it's also used by the riscv,isa string function. > > To export it we'll finis

Re: [PATCH v3 17/19] target/riscv/tcg: move riscv_cpu_add_misa_properties() to tcg-cpu.c

2023-09-24 Thread Alistair Francis
On Wed, Sep 20, 2023 at 10:58 PM Daniel Henrique Barboza wrote: > > All code related to MISA TCG properties is also moved. > > At this point, all TCG properties handling is done in tcg-cpu.c, all KVM > properties handling is done in kvm-cpu.c. > > Signed-off-by: Daniel Henrique Barboza > Reviewed

Re: [PATCH v3 15/19] target/riscv/tcg: introduce tcg_cpu_instance_init()

2023-09-24 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:23 PM Daniel Henrique Barboza wrote: > > tcg_cpu_instance_init() will be the 'cpu_instance_init' impl for the TCG > accelerator. It'll be called from within riscv_cpu_post_init(), via > accel_cpu_instance_init(), similar to what happens with KVM. In fact, to > preserve be

Re: [PATCH v4] target/riscv: update checks on writing pmpcfg for Smepmp to version 1.0

2023-09-24 Thread Alistair Francis
On Mon, Sep 25, 2023 at 2:11 AM Alvin Chang wrote: > > Current checks on writing pmpcfg for Smepmp follows Smepmp version > 0.9.1. However, Smepmp specification has already been ratified, and > there are some differences between version 0.9.1 and 1.0. In this > commit we update the checks of writi

Re: [PATCH v3 16/19] target/riscv/cpu.c: make misa_ext_cfgs[] 'const'

2023-09-24 Thread Alistair Francis
On Wed, Sep 20, 2023 at 10:46 PM Daniel Henrique Barboza wrote: > > The array isn't marked as 'const' because we're initializing their > elements in riscv_cpu_add_misa_properties(), 'name' and 'description' > fields. > > In a closer look we can see that we're not using these 2 fields after > creat

Re: [PATCH v3 14/19] target/riscv/cpu.c: export set_misa()

2023-09-24 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:23 PM Daniel Henrique Barboza wrote: > > We'll move riscv_init_max_cpu_extensions() to tcg-cpu.c in the next > patch and set_misa() needs to be usable from there. > > Rename it to riscv_cpu_set_misa() and make it public. > > Signed-off-by: Daniel Henrique Barboza > Revie

Re: [PATCH v3 13/19] target/riscv/kvm: do not use riscv_cpu_add_misa_properties()

2023-09-24 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:24 PM Daniel Henrique Barboza wrote: > > riscv_cpu_add_misa_properties() is being used to fill the missing KVM > MISA properties but it is a TCG helper that was adapted to do so. We'll > move it to tcg-cpu.c in the next patches, meaning that KVM needs to fill > the remain

Re: [PATCH v3 12/19] target/riscv: move KVM only files to kvm subdir

2023-09-24 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:23 PM Daniel Henrique Barboza wrote: > > Move the files to a 'kvm' dir to promote more code separation between > accelerators and making our lives easier supporting build options such > as --disable-tcg. > > Rename kvm.c to kvm-cpu.c to keep it in line with its TCG counte

Re: [PATCH] migration/dirtyrate: use QEMU_CLOCK_HOST to report start-time

2023-09-24 Thread Yong Huang
On Tue, Sep 5, 2023 at 5:19 PM Andrei Gudkov wrote: > Currently query-dirty-rate uses QEMU_CLOCK_REALTIME as > the source for start-time field. This translates to > clock_gettime(CLOCK_MONOTONIC), i.e. number of seconds > since host boot. This is not very useful. The only > reasonable use case of

Re: [PATCH 3/4] hw/cpu: Introduce CPUClass::cpu_resolving_type field

2023-09-24 Thread Gavin Shan
Hi Philippe, On 9/12/23 08:40, Gavin Shan wrote: On 9/11/23 19:43, Philippe Mathieu-Daudé wrote: On 11/9/23 01:28, Gavin Shan wrote: On 9/8/23 21:22, Philippe Mathieu-Daudé wrote: Add a field to return the QOM type name of a CPU class. Signed-off-by: Philippe Mathieu-Daudé ---   include/hw/

[PATCH v4] target/riscv: update checks on writing pmpcfg for Smepmp to version 1.0

2023-09-24 Thread Alvin Chang
Current checks on writing pmpcfg for Smepmp follows Smepmp version 0.9.1. However, Smepmp specification has already been ratified, and there are some differences between version 0.9.1 and 1.0. In this commit we update the checks of writing pmpcfg to follow Smepmp version 1.0. When mseccfg.MML is s

Re: [PATCH 11/13] vt82c686: Support machine-default audiodev with fallback

2023-09-24 Thread Paolo Bonzini
On Sun, Sep 24, 2023 at 2:14 PM BALATON Zoltan wrote: > > If you still want a machine audiodev propery then could the device handle > >> it without needing changes to the machine? Like in via_isa_realize() add > >> > >> if (current_machine->audiodev) { > >> qdev_prop_set_string(DEVICE(pci_dev

Re: [PATCH v3 2/6] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()

2023-09-24 Thread Bernhard Beschow
Am 20. September 2023 14:44:23 UTC schrieb Chuck Zmudzinski : >On 9/19/2023 4:02 PM, Bernhard Beschow wrote: >> >> >> Am 3. April 2023 12:27:14 UTC schrieb Jason Andryuk : >>>On Mon, Apr 3, 2023 at 5:33 AM Anthony PERARD >>>wrote: On Sat, Apr 01, 2023 at 10:36:45PM +, Bernhard

Re: [PATCH 3/4] aspeed/i3c: Rename variable shadowing a local

2023-09-24 Thread Philippe Mathieu-Daudé
On 22/9/23 17:59, Cédric Le Goater wrote: to fix warning : ../hw/i3c/aspeed_i3c.c: In function ‘aspeed_i3c_realize’: ../hw/i3c/aspeed_i3c.c:1959:17: warning: declaration of ‘dev’ shadows a parameter [-Wshadow=local] 1959 | Object *dev = OBJECT(&s->devices[i]); |

Re: [PATCH 11/13] vt82c686: Support machine-default audiodev with fallback

2023-09-24 Thread BALATON Zoltan
On Sun, 24 Sep 2023, Paolo Bonzini wrote: Il sab 23 set 2023, 14:23 BALATON Zoltan ha scritto: On Sat, 23 Sep 2023, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- hw/isa/vt82c686.c | 2 ++ hw/mips/fuloong2e.c | 13 ++--- hw/ppc/pegasos2.c | 10 -- 3 files changed, 20

[PATCH] mips: fix abort on integer overflow

2023-09-24 Thread Mikulas Patocka
Qemu mips userspace emulation crashes with "qemu: unhandled CPU exception 0x15 - aborting" when one of the integer arithmetic instructions detects an overflow. This patch fixes it so that it delivers SIGFPE with FPE_INTOVF instead. Signed-off-by: Mikulas Patocka Cc: qemu-sta...@nongnu.org ---

Re: [PATCH 02/13] audio: Require AudioState in AUD_add_capture

2023-09-24 Thread Paolo Bonzini
Il sab 23 set 2023, 13:49 BALATON Zoltan ha scritto: > On Sat, 23 Sep 2023, Paolo Bonzini wrote: > > From: Martin Kletzander > > > > Since all callers require a valid audiodev this function can now safely > > abort in case of missing AudioState. > > > > Signed-off-by: Martin Kletzander > > Mess

Re: [PATCH 11/13] vt82c686: Support machine-default audiodev with fallback

2023-09-24 Thread Paolo Bonzini
Il sab 23 set 2023, 14:23 BALATON Zoltan ha scritto: > On Sat, 23 Sep 2023, Paolo Bonzini wrote: > > Signed-off-by: Paolo Bonzini > > --- > > hw/isa/vt82c686.c | 2 ++ > > hw/mips/fuloong2e.c | 13 ++--- > > hw/ppc/pegasos2.c | 10 -- > > 3 files changed, 20 insertions(+), 5 de