Re: [QEMU PATCH v4 11/13] virtio-gpu: Support Venus capset

2023-09-09 Thread Akihiko Odaki
On 2023/09/09 18:29, Huang Rui wrote: On Thu, Aug 31, 2023 at 06:43:17PM +0800, Akihiko Odaki wrote: On 2023/08/31 18:32, Huang Rui wrote: From: Antonio Caggiano Add support for the Venus capset, which enables Vulkan support through the Venus Vulkan driver for virtio-gpu. Signed-off-by:

Re: [QEMU PATCH v4 10/13] virtio-gpu: Resource UUID

2023-09-09 Thread Akihiko Odaki
On 2023/09/09 18:09, Huang Rui wrote: On Thu, Aug 31, 2023 at 06:36:57PM +0800, Akihiko Odaki wrote: On 2023/08/31 18:32, Huang Rui wrote: From: Antonio Caggiano Enable resource UUID feature and implement command resource assign UUID. This is done by introducing a hash table to map resource

Re: [PATCH v2 15/22] net/eth: Clean up local variable shadowing

2023-09-09 Thread Akihiko Odaki
On 2023/09/05 1:12, Philippe Mathieu-Daudé wrote: Fix: net/eth.c:435:20: error: declaration shadows a local variable [-Werror,-Wshadow] size_t input_size = iov_size(pkt, pkt_frags); ^ net/eth.c:413:16: note: previous declaration is here size_t

Re: [PATCH RESEND v5 17/57] target/loongarch: Implement xvneg

2023-09-09 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: +static bool gvec_xx(DisasContext *ctx, arg_vv *a, MemOp mop, +void (*func)(unsigned, uint32_t, uint32_t, + uint32_t, uint32_t)) +{ +if (!check_vec(ctx, 32)) { +return true; +} + +return

Re: [PATCH RESEND v5 16/57] target/loongarch: Implement xvaddi/xvsubi

2023-09-09 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: +static bool gvec_xx_i(DisasContext *ctx, arg_vv_i *a, MemOp mop, + void (*func)(unsigned, uint32_t, uint32_t, + int64_t, uint32_t, uint32_t)) +{ +if (!check_vec(ctx, 32)) { +return true; +} +

Re: [PATCH RESEND v5 15/57] target/loongarch: Implement xvreplgr2vr

2023-09-09 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: --- a/target/loongarch/insn_trans/trans_vec.c.inc +++ b/target/loongarch/insn_trans/trans_vec.c.inc @@ -4407,27 +4407,42 @@ static bool trans_vpickve2gr_du(DisasContext *ctx, arg_rv_i *a) return true; } -static bool gvec_dup(DisasContext *ctx, arg_vr

Re: [PATCH RESEND v5 14/57] target/loongarch: Implement xvadd/xvsub

2023-09-09 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: --- a/target/loongarch/insn_trans/trans_vec.c.inc +++ b/target/loongarch/insn_trans/trans_vec.c.inc @@ -208,6 +208,16 @@ static bool gvec_vvv(DisasContext *ctx, arg_vvv *a, MemOp mop, return gvec_vvv_vl(ctx, a, 16, mop, func); } +static bool

Re: [PATCH RESEND v5 10/57] target/loongarch: Replace CHECK_SXE to check_vec(ctx, 16)

2023-09-09 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: Intrudce a new function check_vec to replace CHECK_SXE Signed-off-by: Song Gao --- target/loongarch/insn_trans/trans_vec.c.inc | 248 +++- 1 file changed, 192 insertions(+), 56 deletions(-) Introduce. Reviewed-by: Richard Henderson r~

Re: [PATCH RESEND v5 09/57] target/loongarch: Use gen_helper_gvec_2i for 2OP + imm vector instructions

2023-09-09 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: Signed-off-by: Song Gao --- target/loongarch/helper.h | 146 +++ target/loongarch/vec_helper.c | 445 +--- target/loongarch/insn_trans/trans_vec.c.inc | 18 +- 3 files changed, 291 insertions(+), 318

Re: [PATCH RESEND v5 08/57] target/loongarch: Use gen_helper_gvec_2 for 2OP vector instructions

2023-09-09 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: Signed-off-by: Song Gao --- target/loongarch/helper.h | 58 - target/loongarch/vec_helper.c | 124 ++-- target/loongarch/insn_trans/trans_vec.c.inc | 16 ++- 3 files changed, 101 insertions(+), 97

Re: [PATCH RESEND v5 07/57] target/loongarch: Use gen_helper_gvec_2_ptr for 2OP + env vector instructions

2023-09-09 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: Signed-off-by: Song Gao --- target/loongarch/helper.h | 118 +++--- target/loongarch/vec_helper.c | 161 +++- target/loongarch/insn_trans/trans_vec.c.inc | 129 +--- 3 files changed, 219

Re: [PATCH RESEND v5 05/57] target/loongarch: Use gen_helper_gvec_3_ptr for 3OP + env vector instructions

2023-09-09 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: Signed-off-by: Song Gao --- target/loongarch/helper.h | 48 +++ target/loongarch/vec_helper.c | 50 target/loongarch/insn_trans/trans_vec.c.inc | 66 + 3 files changed, 91

Re: [PATCH RESEND v5 04/57] target/loongarch: Use gen_helper_gvec_4 for 4OP vector instructions

2023-09-09 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: Signed-off-by: Song Gao --- target/loongarch/helper.h | 2 +- target/loongarch/vec_helper.c | 11 +-- target/loongarch/insn_trans/trans_vec.c.inc | 22 - 3 files changed, 19 insertions(+), 16

Re: [PATCH v2 10/10] target/i386: Autogenerate feature_word_info.c.inc

2023-09-09 Thread Richard Henderson
On 9/8/23 05:45, Tim Wiederhake wrote: +++ b/target/i386/feature_word_info.yaml @@ -1,3 +1,5 @@ +# Run `feature_word_info.py` when you make changes to this file. You should integrate this into the build process instead. r~

Re: [PATCH 05/13] target/i386/cpu-sysemu: Inline kvm_apic_in_kernel()

2023-09-09 Thread Richard Henderson
On 9/4/23 05:43, Philippe Mathieu-Daudé wrote: In order to have cpu-sysemu.c become accelerator-agnostic, inline kvm_apic_in_kernel() -- which is a simple wrapper to kvm_irqchip_in_kernel() -- and use the generic "sysemu/kvm.h" header. Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH 04/13] target/i386/helper: Restrict KVM declarations to system emulation

2023-09-09 Thread Richard Henderson
On 9/4/23 05:43, Philippe Mathieu-Daudé wrote: User emulation doesn't need any KVM declarations. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 03/13] hw/i386/fw_cfg: Include missing 'cpu.h' header

2023-09-09 Thread Richard Henderson
On 9/4/23 05:43, Philippe Mathieu-Daudé wrote: fw_cfg_build_feature_control() uses CPUID_EXT_VMX which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/fw_cfg.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 02/13] hw/i386/pc: Include missing 'cpu.h' header

2023-09-09 Thread Richard Henderson
On 9/4/23 05:43, Philippe Mathieu-Daudé wrote: Both pc_piix.c and pc_q35.c files use CPU_VERSION_LEGACY which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + 2 files changed, 2 insertions(+) Reviewed-by:

Re: [PATCH 01/13] hw/i386/pc: Include missing 'sysemu/tcg.h' header

2023-09-09 Thread Richard Henderson
On 9/4/23 05:43, Philippe Mathieu-Daudé wrote: Since commit 6f529b7534 ("target/i386: move FERR handling to target/i386") pc_q35_init() calls tcg_enabled() which is declared in "sysemu/tcg.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH 4/4] hw/cpu: Call object_class_dynamic_cast() once in cpu_class_by_name()

2023-09-09 Thread Richard Henderson
On 9/8/23 04:22, Philippe Mathieu-Daudé wrote: +++ b/hw/core/cpu-common.c @@ -157,7 +157,8 @@ ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model) cc = CPU_CLASS(oc); assert(cc->cpu_resolving_type && cc->class_by_name); oc = cc->class_by_name(cpu_model);

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

2023-09-09 Thread Richard Henderson
On 9/8/23 04:22, Philippe Mathieu-Daudé wrote: Add a field to return the QOM type name of a CPU class. It isn't the type name of the cpu class, it's the name of the base class that one particular use case expects. I don't think this is a good idea. r~

Re: [PATCH 2/4] hw/cpu: Call object_class_is_abstract() once in cpu_class_by_name()

2023-09-09 Thread Richard Henderson
On 9/8/23 04:22, Philippe Mathieu-Daudé wrote: Let CPUClass::class_by_name() handlers to return abstract classes, and filter them once in the public cpu_class_by_name() method. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 7 --- hw/core/cpu-common.c | 14

Re: [PATCH 1/4] target/alpha: Tidy up alpha_cpu_class_by_name()

2023-09-09 Thread Richard Henderson
On 9/8/23 04:22, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- target/alpha/cpu.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v4 16/16] tcg/loongarch64: Implement 128-bit load & store

2023-09-09 Thread Richard Henderson
On 9/7/23 19:21, Jiajie Chen wrote: +static void tcg_out_qemu_ldst_i128(TCGContext *s, TCGReg data_lo, TCGReg data_hi, + TCGReg addr_reg, MemOpIdx oi, bool is_ld) +{ +TCGLabelQemuLdst *ldst; +HostAddress h; + +ldst = prepare_host_addr(s, , addr_reg,

Re: [PATCH v4 05/16] tcg/loongarch64: Lower add/sub_vec to vadd/vsub

2023-09-09 Thread Richard Henderson
On 9/7/23 19:21, Jiajie Chen wrote: Lower the following ops: - add_vec - sub_vec Signed-off-by: Jiajie Chen --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target-con-str.h | 1 + tcg/loongarch64/tcg-target.c.inc | 61 3 files

Re: [PATCH v2] util: Delete checks for old host definitions

2023-09-09 Thread Richard Henderson
On 9/2/23 22:53, Akihiko Odaki wrote: Hi, Can anyone have look at this? I also have another patch similar but for thunk. It was reviewed but no one has made a pull request yet: https://patchew.org/QEMU/20230808152314.102036-1-akihiko.od...@daynix.com/ Queued this one to tcg-next also. r~

Re: [PATCH v2] util: Delete checks for old host definitions

2023-09-09 Thread Richard Henderson
On 8/10/23 15:59, Akihiko Odaki wrote: IA-64 and PA-RISC host support is already removed with commit b1cef6d02f("Drop remaining bits of ia64 host support"). Signed-off-by: Akihiko Odaki --- util/async-teardown.c | 3 --- util/oslib-posix.c| 14 ++ 2 files changed, 2

Re: [PATCH 1/1] accel/tcg: Fix the comment for CPUTLBEntryFull

2023-09-09 Thread Richard Henderson
On 8/31/23 23:01, LIU Zhiwei wrote: When memory region is ram, the lower TARGET_PAGE_BITS is not the physical section number. Instead, its value is always 0. Add comment and assert to make it clear. Signed-off-by: LIU Zhiwei --- accel/tcg/cputlb.c | 11 +++

Re: [PATCH] accel/tcg: mttcg remove false-negative halted assertion

2023-09-09 Thread Richard Henderson
On 8/28/23 18:06, Nicholas Piggin wrote: mttcg asserts that an execution ending with EXCP_HALTED must have cpu->halted. However between the event or instruction that sets cpu->halted and requests exit and the assertion here, an asynchronous event could clear cpu->halted. This leads to crashes

Re: [PATCH 00/10] plugin and tcg cleanups to cputlb.c.

2023-09-09 Thread Richard Henderson
Ping. Patches 1, 6-10 still need review. r~ On 8/28/23 11:55, Richard Henderson wrote: Based-on: 20230826232415.80233-1-richard.hender...@linaro.org ("[PATCH 0/3] softmmu: Use async_run_on_cpu in tcg_commit") Remove the SaveIOTLB hackery, now that the flush won't happen until the TB. Clean

Re: [PATCH 0/4] tcg/aarch64: Enable BTI within the JIT

2023-09-09 Thread Richard Henderson
Ping. Patch 3 still missing review. On 8/16/23 07:25, Richard Henderson wrote: Patch 1 is cherry-picked from [PATCH v3 02/14] tcg: Add tcg_out_tb_start backend hook https://lore.kernel.org/qemu-devel/20230815195741.8325-3-richard.hender...@linaro.org/T/#u here used for a different

[PATCH v2] softfloat: Handle m68k extended precision denormals properly

2023-09-09 Thread Richard Henderson
Motorola treats denormals with explicit integer bit set as having unbiased exponent 0, unlike Intel which treats it as having unbiased exponent 1 (more like all other IEEE formats that have no explicit integer bit). Add a flag on FloatFmt to differentiate the behaviour. Reported-by: Keith

[PATCH v3 06/23] bsd-user: Implement shm_rename(2) system call

2023-09-09 Thread Karim Taha
From: Kyle Evans Signed-off-by: Kyle Evans Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/freebsd/os-misc.h| 24 bsd-user/freebsd/os-syscall.c | 6 ++ 2 files changed, 30 insertions(+) diff --git

[PATCH v3 13/23] bsd-user: Implement mprotect(2)

2023-09-09 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-mem.h| 7 +++ bsd-user/freebsd/os-syscall.c | 4 2 files changed, 11 insertions(+) diff --git a/bsd-user/bsd-mem.h

[PATCH v3 03/23] bsd-user: Declarations for ipc_perm and shmid_ds conversion functions

2023-09-09 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 | 45 + 1 file changed, 45 insertions(+) create mode 100644 bsd-user/qemu-bsd.h diff --git

[PATCH v3 21/23] bsd-user: Implement shmctl(2)

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

[PATCH v3 07/23] bsd-user: Add bsd-mem.c to meson.build

2023-09-09 Thread Karim Taha
Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/bsd-mem.c | 0 bsd-user/meson.build | 1 + 2 files changed, 1 insertion(+) create mode 100644 bsd-user/bsd-mem.c diff --git a/bsd-user/bsd-mem.c b/bsd-user/bsd-mem.c new file mode 100644 index

[PATCH v3 09/23] bsd-user: Implement ipc_perm conversion between host and target.

2023-09-09 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson --- bsd-user/bsd-mem.c | 25 + 1 file changed, 25 insertions(+) diff --git a/bsd-user/bsd-mem.c b/bsd-user/bsd-mem.c index 8834ab2e58..46cda8eb5c 100644 ---

[PATCH v3 11/23] bsd-user: Introduce bsd-mem.h to the source tree

2023-09-09 Thread Karim Taha
From: Stacey Son Preserve the copyright notice and help with the 'Author' info for subsequent changes to the file. Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-mem.h| 64

[PATCH v3 08/23] bsd-user: Implement target_set_brk function in bsd-mem.c instead of os-syscall.c

2023-09-09 Thread Karim Taha
From: Stacey Son The definitions and variables names matches the corresponding ones in linux-user/syscall.c, for making later implementation of do_obreak easier Co-authored-by: Mikaël Urankar Signed-off-by: Mikaël Urankar Signed-off-by: Karim Taha Reviewed-by: Warner Losh Reviewed-by:

[PATCH v3 05/23] bsd-user: Implement shm_open2(2) system call

2023-09-09 Thread Karim Taha
From: Kyle Evans Signed-off-by: Kyle Evans Signed-off-by: Karim Taha --- bsd-user/freebsd/os-misc.h| 42 +++ bsd-user/freebsd/os-syscall.c | 13 +++ 2 files changed, 55 insertions(+) diff --git a/bsd-user/freebsd/os-misc.h

[PATCH v3 14/23] bsd-user: Implement msync(2)

2023-09-09 Thread Karim Taha
From: Stacey Son Co-authored-by: Kyle Evans Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Karim Taha Reviewed-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-mem.h| 11 +++ bsd-user/freebsd/os-syscall.c | 4 2 files changed,

[PATCH v3 10/23] bsd-user: Implement shmid_ds conversion between host and target.

2023-09-09 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/bsd-mem.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/bsd-user/bsd-mem.c b/bsd-user/bsd-mem.c index 46cda8eb5c..eea499a727 100644 --- a/bsd-user/bsd-mem.c +++

[PATCH v3 16/23] bsd-user: Implment madvise(2) to match the linux-user implementation.

2023-09-09 Thread Karim Taha
Signed-off-by: Signed-off-by: Karim Taha --- bsd-user/bsd-mem.h| 53 +++ bsd-user/freebsd/os-syscall.c | 4 +++ bsd-user/syscall_defs.h | 2 ++ 3 files changed, 59 insertions(+) diff --git a/bsd-user/bsd-mem.h b/bsd-user/bsd-mem.h index

[PATCH v3 17/23] bsd-user: Implement mincore(2)

2023-09-09 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/bsd-mem.h| 22 ++ bsd-user/freebsd/os-syscall.c | 4 2 files changed, 26 insertions(+) diff --git a/bsd-user/bsd-mem.h b/bsd-user/bsd-mem.h index 0e16051418..1dabbe36e6

[PATCH v3 20/23] bsd-user: Implement shm_unlink(2) and shmget(2)

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

[PATCH v3 23/23] bsd-user: Add stubs for vadvise(), sbrk() and sstk()

2023-09-09 Thread Karim Taha
From: Warner Losh The above system calls are not supported by qemu. Signed-off-by: Warner Losh Signed-off-by: Karim Taha --- bsd-user/bsd-mem.h| 18 ++ bsd-user/freebsd/os-syscall.c | 12 2 files changed, 30 insertions(+) diff --git

[PATCH v3 18/23] bsd-user: Implement do_obreak function

2023-09-09 Thread Karim Taha
From: Stacey Son Match linux-user, by manually applying the following commits, in order: d28b3c90cfad1a7e211ae2bce36ecb9071086129 linux-user: Make sure initial brk(0) is page-aligned 15ad98536ad9410fb32ddf1ff09389b677643faa linux-user: Fix qemu brk() to not zero bytes on current page

[PATCH v3 12/23] bsd-user: Implement mmap(2) and munmap(2)

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

[PATCH v3 15/23] bsd-user: Implement mlock(2), munlock(2), mlockall(2), munlockall(2), minherit(2)

2023-09-09 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson --- bsd-user/bsd-mem.h| 37 +++ bsd-user/freebsd/os-syscall.c | 20 +++ 2 files changed, 57 insertions(+) diff --git

[PATCH v3 04/23] bsd-user: Introduce freebsd/os-misc.h to the source tree

2023-09-09 Thread Karim Taha
From: Stacey Son To preserve the copyright notice and help with the 'Author' info for subsequent changes to the file. Signed-off-by: Stacey Son Signed-off-by: Karim Taha Reviewed-by: Richard Henderson Reviewed-by: Warner Losh --- bsd-user/freebsd/os-misc.h | 28

[PATCH v3 00/23] bsd-user: Implement mmap related system calls for FreeBSD.

2023-09-09 Thread Karim Taha
Upstream the implementation of the following mmap system calls, from the qemu-bsd-user fork: mmap(2), munmap(2), mprotect(2), msync(2), mlock(2), munlock(2), mlockall(2), munlockall(2), mincore(2), madvise(2), minherit(2), shm_open(2),shm_open2(2), shm_rename2(2),

[PATCH v3 22/23] bsd-user: Implement shmat(2) and shmdt(2)

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

[PATCH v3 01/23] bsd-user: Implement struct target_ipc_perm

2023-09-09 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/syscall_defs.h | 17 + 1 file changed, 17 insertions(+) diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h index

[PATCH v3 02/23] bsd-user: Implement struct target_shmid_ds

2023-09-09 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/syscall_defs.h | 20 1 file changed, 20 insertions(+) diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h index

[PATCH v3 19/23] bsd-user: Implement shm_open(2)

2023-09-09 Thread Karim Taha
From: Stacey Son Co-authored-by: Kyle Evans Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Karim Taha --- bsd-user/bsd-mem.h| 25 + bsd-user/freebsd/os-syscall.c | 4 2 files changed, 29 insertions(+) diff --git

Re: [PATCH v4 00/10] linux-user: Detect and report host crashes

2023-09-09 Thread Richard Henderson
Ping. On 8/22/23 22:16, Richard Henderson wrote: More signal cleanups. Mostly tested by temporarily adding an abort, divide by zero, undefined instruction, null dereference, within the implementation of a guest syscall to induce an error. r~ Helge Deller (1): linux-user: Detect and

Re: [PATCH v3 00/19] crypto: Provide clmul.h and host accel

2023-09-09 Thread Richard Henderson
Ping. Still missing r-b on patches 1, 4, 5, 8, 9, 12, 13, 18. r~ On 8/21/23 09:18, Richard Henderson wrote: Inspired by Ard Biesheuvel's RFC patches [1] for accelerating carry-less multiply under emulation. Changes for v3: * Update target/i386 ops_sse.h. * Apply r-b. Changes for v2:

[PATCH v2] linux-user: Fixes for zero_bss

2023-09-09 Thread Richard Henderson
The previous change, 2d385be6152, assumed !PAGE_VALID meant that the page would be unmapped by the elf image. However, since we reserved the entire image space via mmap, PAGE_VALID will always be set. Instead, assume PROT_NONE for the same condition. Furthermore, assume bss is only ever present

Re: [PATCH 20/22] Implement shmctl(2)

2023-09-09 Thread Richard Henderson
On 9/8/23 18:59, Karim Taha wrote: Richard Henderson wrote: On 8/19/23 02:48, Karim Taha wrote: +switch (cmd) { +case IPC_STAT: +case IPC_SET: +if (target_to_host_shmid_ds(, buff)) { +return -TARGET_EFAULT; +} +ret = get_errno(shmctl(shmid,

Re: [PATCH] qemu/timer: Add host ticks function for RISC-V

2023-09-09 Thread Richard Henderson
On 9/7/23 20:23, LIU Zhiwei wrote: From: LIU Zhiwei Signed-off-by: LIU Zhiwei --- include/qemu/timer.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 9a91cb1248..ce0b66d122 100644 --- a/include/qemu/timer.h +++

Re: [PATCH] contrib/plugins: remove -soname argument

2023-09-09 Thread Richard Henderson
On 9/7/23 03:18, Paolo Bonzini wrote: -soname is not needed for runtime-loaded modules. For example, Meson says: if not isinstance(target, build.SharedModule) or target.force_soname: # Add -Wl,-soname arguments on Linux, -install_name on OS X

Re: [PATCH 13/14] target/arm: Implement the CPY* instructions

2023-09-09 Thread Richard Henderson
On 9/7/23 09:03, Peter Maydell wrote: +void HELPER(cpyp)(CPUARMState *env, uint32_t syndrome, uint32_t wdesc, + uint32_t rdesc, uint32_t move) +{ +int rd = mops_destreg(syndrome); +int rs = mops_srcreg(syndrome); +int rn = mops_sizereg(syndrome); +uint32_t

Re: [PATCH 14/14] target/arm: Enable FEAT_MOPS for CPU 'max'

2023-09-09 Thread Richard Henderson
On 9/7/23 09:03, Peter Maydell wrote: Enable FEAT_MOPS on the AArch64 'max' CPU, and add it to the list of features we implement. Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + target/arm/tcg/cpu64.c| 4 2 files changed, 5 insertions(+) Reviewed-by:

Re: [PATCH 12/14] target/arm: Implement MTE tag-checking functions for FEAT_MOPS copies

2023-09-09 Thread Richard Henderson
On 9/7/23 09:03, Peter Maydell wrote: The FEAT_MOPS memory copy operations need an extra helper routine for checking for MTE tag checking failures beyond the ones we already added for memory set operations: * mte_mops_probe_rev() does the same job as mte_mops_probe(), but it checks tags

Re: [PATCH 11/14] target/arm: Implement the SETG* instructions

2023-09-09 Thread Richard Henderson
On 9/7/23 09:03, Peter Maydell wrote: The FEAT_MOPS SETG* instructions are very similar to the SET* instructions, but as well as setting memory contents they also set the MTE tags. They are architecturally required to operate on tag-granule aligned regions only. Signed-off-by: Peter Maydell

[PATCH] amd_iommu: Fix APIC address check

2023-09-09 Thread Akihiko Odaki
An MSI from I/O APIC may not exactly equal to APIC_DEFAULT_ADDRESS. In fact, Windows 17763.3650 configures I/O APIC to set the dest_mode bit. Check only the 12 bits that are known to be fixed for I/O APIC-generated MSIs. Fixes: 577c470f43 ("x86_iommu/amd: Prepare for interrupt remap support")

Re: [PATCH 10/14] target/arm: Define new TB flag for ATA0

2023-09-09 Thread Richard Henderson
On 9/7/23 09:03, Peter Maydell wrote: Currently the only tag-setting instructions always do so in the context of the current EL, and so we only need one ATA bit in the TB flags. The FEAT_MOPS SETG instructions include ones which set tags for a non-privileged access, so we now also need the

Re: [PATCH 09/14] target/arm: Implement the SET* instructions

2023-09-09 Thread Richard Henderson
On 9/7/23 09:03, Peter Maydell wrote: Implement the SET* instructions which collectively implement a "memset" operation. These come in a set of three, eg SETP (prologue), SETM (main), SETE (epilogue), and each of those has different flavours to indicate whether memory accesses should be unpriv

Disassembler disagrees with translator over instruction decoding

2023-09-09 Thread Станислав Юдин
Hello, I've just got this message, when I dubugging my code: *Disassembler disagrees with translator over instruction decoding Please report this to qemu-devel@nongnu.org* Binary code is in the attachment. It launches by this command: "c:\Program Files\qemu\qemu-system-arm.exe" -M

Re: [PATCH 1/1] migration: skip poisoned memory pages on "ram saving" phase

2023-09-09 Thread Joao Martins
On 06/09/2023 22:29, William Roche wrote: > On 9/6/23 17:16, Peter Xu wrote: >> >> Just a note.. >> >> Probably fine for now to reuse block page size, but IIUC the right thing to >> do is to fetch it from the signal info (in QEMU's sigbus_handler()) of >> kernel_siginfo.si_addr_lsb. >> >> At least

Re: [RESEND] qemu/timer: Add host ticks function for RISC-V

2023-09-09 Thread Palmer Dabbelt
On Sat, 09 Sep 2023 00:18:02 PDT (-0700), pbonz...@redhat.com wrote: Il sab 9 set 2023, 03:35 Atish Patra ha scritto: On Fri, Sep 8, 2023 at 3:29 AM Paolo Bonzini wrote: > > Queued, thanks. > I didn't realize it was already queued. Gmail threads failed me this time. @Paolo Bonzini : Can you

Re: [PATCH v3 1/1] migration: Allow user to specify available switchover bandwidth

2023-09-09 Thread Joao Martins
On 05/09/2023 20:38, Peter Xu wrote: > Migration bandwidth is a very important value to live migration. It's > because it's one of the major factors that we'll make decision on when to > switchover to destination in a precopy process. > > This value is currently estimated by QEMU during the

Re: [PATCH v1] vfio/common: Separate vfio-pci ranges

2023-09-09 Thread Joao Martins
On 08/09/2023 10:29, Joao Martins wrote: > QEMU computes the DMA logging ranges for two predefined ranges: 32-bit > and 64-bit. In the OVMF case, when the dynamic MMIO window is enabled, > QEMU includes in the 64-bit range the RAM regions at the lower part > and vfio-pci device RAM regions

Re: [PATCH] scripts/qemu-binfmt-conf.sh: refresh

2023-09-09 Thread Michael Tokarev
A friendly ping? Thanks, /mjt 21.07.2023 14:50, Michael Tokarev wrote: Currently qemu-binfmt-conf.sh does a number of strange things. 1. --systemd requires an argument - the CPU type to register, while --debian (which is actually --binfmt-support) does not accept such an argument, so

[Stable-7.2.6 13/37] target/s390x: Fix VSTL with a large length

2023-09-09 Thread Michael Tokarev
From: Ilya Leoshkevich The length is always truncated to 16 bytes. Do not probe more than that. Cc: qemu-sta...@nongnu.org Fixes: 0e0a5b49ad58 ("s390x/tcg: Implement VECTOR STORE WITH LENGTH") Signed-off-by: Ilya Leoshkevich Message-Id: <20230804235624.263260-1-...@linux.ibm.com> Reviewed-by:

[Stable-7.2.6 04/37] hw/smbios: Fix core count in type4

2023-09-09 Thread Michael Tokarev
From: Zhao Liu >From SMBIOS 3.0 specification, core count field means: Core Count is the number of cores detected by the BIOS for this processor socket. [1] Before 003f230e37d7 ("machine: Tweak the order of topology members in struct CpuTopology"), MachineState.smp.cores means "the number of

[Stable-8.0.5 41/43] docs tests: Fix use of migrate_set_parameter

2023-09-09 Thread Michael Tokarev
From: Markus Armbruster docs/multi-thread-compression.txt uses parameter names with underscores instead of dashes. Wrong since day one. docs/rdma.txt, tests/qemu-iotests/181, and tests/qtest/test-hmp.c are wrong the same way since commit cbde7be900d2 (v6.0.0). Hard to see, as test-hmp doesn't

[Stable-8.0.5 30/43] target/ppc: Flush inputs to zero with NJ in ppc_store_vscr

2023-09-09 Thread Michael Tokarev
From: Richard Henderson Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1779 Signed-off-by: Richard Henderson Reviewed-by: Nicholas Piggin Signed-off-by: Cédric Le Goater (cherry picked from commit af03aeb631eeb81a44d2c0ff5b429cd4b5dc2799) Signed-off-by: Michael Tokarev diff --git

[Stable-8.0.5 34/43] hw/ide/ahci: PxSACT and PxCI is cleared when PxCMD.ST is cleared

2023-09-09 Thread Michael Tokarev
From: Niklas Cassel According to AHCI 1.3.1 definition of PxSACT: This field is cleared when PxCMD.ST is written from a '1' to a '0' by software. This field is not cleared by a COMRESET or a software reset. According to AHCI 1.3.1 definition of PxCI: This field is also cleared when PxCMD.ST is

[Stable-8.0.5 26/43] docs/about/license: Update LICENSE URL

2023-09-09 Thread Michael Tokarev
From: Philippe Mathieu-Daudé In early 2021 (see commit 2ad784339e "docs: update README to use GitLab repo URLs") almost all of the code base was converted to point to GitLab instead of git.qemu.org. During 2023, git.qemu.org switched from a git mirror to a http redirect to GitLab (see [1]).

[Stable-8.0.5 28/43] hw/ppc/e500: fix broken snapshot replay

2023-09-09 Thread Michael Tokarev
From: Maksim Kostin ppce500_reset_device_tree is registered for system reset, but after c4b075318eb1 this function rerandomizes rng-seed via qemu_guest_getrandom_nofail. And when loading a snapshot, it tries to read EVENT_RANDOM that doesn't exist, so we have an error: qemu-system-ppc:

[Stable-8.0.5 32/43] hw/ide/ahci: write D2H FIS when processing NCQ command

2023-09-09 Thread Michael Tokarev
From: Niklas Cassel The way that BUSY + PxCI is cleared for NCQ (FPDMA QUEUED) commands is described in SATA 3.5a Gold: 11.15 FPDMA QUEUED command protocol DFPDMAQ2: ClearInterfaceBsy "Transmit Register Device to Host FIS with the BSY bit cleared to zero and the DRQ bit cleared to zero and

[Stable-7.2.6 05/37] dump: kdump-zlib data pages not dumped with pvtime/aarch64

2023-09-09 Thread Michael Tokarev
From: Dongli Zhang The kdump-zlib data pages are not dumped from aarch64 host when the 'pvtime' is involved, that is, when the block->target_end is not aligned to page_size. In the below example, it is expected to dump two blocks. (qemu) info mtree -f ... ... 090a-090a0fff

[Stable-7.2.6 15/37] include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts

2023-09-09 Thread Michael Tokarev
From: Thomas Huth Using "-device virtio-gpu,blob=true" currently does not work on big endian hosts (like s390x). The guest kernel prints an error message like: [drm:virtio_gpu_dequeue_ctrl_func [virtio_gpu]] *ERROR* response 0x1200 (command 0x10c) and the display stays black. When running

[Stable-8.0.5 06/43] dump: kdump-zlib data pages not dumped with pvtime/aarch64

2023-09-09 Thread Michael Tokarev
From: Dongli Zhang The kdump-zlib data pages are not dumped from aarch64 host when the 'pvtime' is involved, that is, when the block->target_end is not aligned to page_size. In the below example, it is expected to dump two blocks. (qemu) info mtree -f ... ... 090a-090a0fff

[PATCH 1/7] bsd-user: spelling fixes

2023-09-09 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- bsd-user/errno_defs.h| 2 +- bsd-user/freebsd/target_os_siginfo.h | 2 +- bsd-user/freebsd/target_os_stack.h | 4 ++-- bsd-user/freebsd/target_os_user.h| 2 +- bsd-user/qemu.h | 2 +- bsd-user/signal-common.h

[PATCH v2 0/7] remaining tree-wide spelling fixes

2023-09-09 Thread Michael Tokarev
After quite some patches from the original series has been reviewed and applied, there are 7 more left. Re-sending the remaining patches after rebasing to current qemu/master, resolving some conflicts in the process. While there are still quite a lot of changes (but much less than initially), I

[PATCH 3/7] ppc: spelling fixes

2023-09-09 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- host/include/ppc/host/cpuinfo.h | 2 +- hw/ppc/ppc.c| 2 +- hw/ppc/prep_systemio.c | 2 +- hw/ppc/spapr.c | 8 hw/ppc/spapr_hcall.c| 2 +- hw/ppc/spapr_nvdimm.c

[PATCH 4/7] hw/net: spelling fixes

2023-09-09 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/net/cadence_gem.c | 10 +- hw/net/dp8393x.c | 2 +- hw/net/e1000_regs.h | 2 +- hw/net/e1000x_regs.h | 2 +- hw/net/fsl_etsec/rings.c | 2 +- hw/net/igb_regs.h | 4 ++-- hw/net/mcf_fec.c | 2 +-

[Stable-7.2.6 20/37] docs/about/license: Update LICENSE URL

2023-09-09 Thread Michael Tokarev
From: Philippe Mathieu-Daudé In early 2021 (see commit 2ad784339e "docs: update README to use GitLab repo URLs") almost all of the code base was converted to point to GitLab instead of git.qemu.org. During 2023, git.qemu.org switched from a git mirror to a http redirect to GitLab (see [1]).

[PATCH 6/7] hw/tpm: spelling fixes

2023-09-09 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- hw/tpm/tpm_tis.h| 2 +- hw/tpm/tpm_tis_common.c | 2 +- hw/tpm/tpm_tis_i2c.c| 4 ++-- hw/tpm/tpm_tis_isa.c| 2 +- hw/tpm/tpm_tis_sysbus.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h

[Stable-7.2.6 03/37] hw/smbios: Fix thread count in type4

2023-09-09 Thread Michael Tokarev
From: Zhao Liu >From SMBIOS 3.0 specification, thread count field means: Thread Count is the total number of threads detected by the BIOS for this processor socket. It is a processor-wide count, not a thread-per-core count. [1] So here we should use threads per socket other than threads per

[Stable-8.0.5 17/43] target/s390x: Fix the "ignored match" case in VSTRS

2023-09-09 Thread Michael Tokarev
From: Ilya Leoshkevich Currently the emulation of VSTRS recognizes partial matches in presence of \0 in the haystack, which, according to PoP, is not correct: If the ZS flag is one and a zero byte was detected in the second operand, then there can not be a partial match ... Add a

[Stable-8.0.5 40/43] qemu-options.hx: Rephrase the descriptions of the -hd* and -cdrom options

2023-09-09 Thread Michael Tokarev
From: Thomas Huth The current description says that these options will create a device on the IDE bus, which is only true on x86. So rephrase these sentences a little bit to speak of "default bus" instead. Signed-off-by: Thomas Huth Reviewed-by: Alex Bennée Signed-off-by: Michael Tokarev

[Stable-7.2.6 16/37] kvm: Introduce kvm_arch_get_default_type hook

2023-09-09 Thread Michael Tokarev
From: Akihiko Odaki kvm_arch_get_default_type() returns the default KVM type. This hook is particularly useful to derive a KVM type that is valid for "none" machine model, which is used by libvirt to probe the availability of KVM. For MIPS, the existing mips_kvm_type() is reused. This function

[Stable-7.2.6 27/37] hw/ide/ahci: simplify and document PxCI handling

2023-09-09 Thread Michael Tokarev
From: Niklas Cassel The AHCI spec states that: For NCQ, PxCI is cleared on command queued successfully. For non-NCQ, PxCI is cleared on command completed successfully. (A non-NCQ command that completes with error does not clear PxCI.) The current QEMU implementation either clears PxCI in

[Stable-7.2.6 24/37] target/ppc: Flush inputs to zero with NJ in ppc_store_vscr

2023-09-09 Thread Michael Tokarev
From: Richard Henderson Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1779 Signed-off-by: Richard Henderson Reviewed-by: Nicholas Piggin Signed-off-by: Cédric Le Goater (cherry picked from commit af03aeb631eeb81a44d2c0ff5b429cd4b5dc2799) Signed-off-by: Michael Tokarev diff --git

[Stable-7.2.6 02/37] hw/smbios: Fix smbios_smp_sockets caculation

2023-09-09 Thread Michael Tokarev
From: Zhao Liu smp.sockets is the number of sockets which is configured by "-smp" ( otherwise, the default is 1). Trying to recalculate it here with another rules leads to errors, such as: 1. 003f230e37d7 ("machine: Tweak the order of topology members in struct CpuTopology") changes the

[PATCH 2/7] i386: spelling fixes

2023-09-09 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- host/include/i386/host/cpuinfo.h | 2 +- hw/i386/acpi-build.c | 4 ++-- hw/i386/amd_iommu.c | 4 ++-- hw/i386/intel_iommu.c| 4 ++-- hw/i386/kvm/xen_xenstore.c | 2 +- hw/i386/kvm/xenstore_impl.c | 2 +-

  1   2   3   >