Re: [PATCH v2 21/46] target/loongarch: Implement xvsigncov

2023-07-08 Thread Richard Henderson
On 6/30/23 08:58, Song Gao wrote: This patch includes: - XVSIGNCOV.{B/H/W/D}. Signed-off-by: Song Gao --- target/loongarch/disas.c | 5 + target/loongarch/insn_trans/trans_lasx.c.inc | 5 + target/loongarch/insns.decode| 5 + target/loongarch/

Re: [PATCH v2 22/46] target/loongarch: Implement xvmskltz/xvmskgez/xvmsknz

2023-07-08 Thread Richard Henderson
On 6/30/23 08:58, Song Gao wrote: -void HELPER(vmskltz_b)(CPULoongArchState *env, uint32_t vd, uint32_t vj) +void HELPER(vmskltz_b)(CPULoongArchState *env, + uint32_t oprsz, uint32_t vd, uint32_t vj) { -uint16_t temp = 0; +int i, max; +uint16_t temp; VReg

Re: [PATCH] chore: rename `tricore_feature` to `is_tricore_feature_enabled`

2023-07-08 Thread Bastian Koppelmann
Hi Rui, On Thu, Jul 06, 2023 at 12:59:55PM -0400, Rui Chen wrote: > While upgrading capstone to v5, there was some name clash with the > tricore_feature in capstone (which was introduced in this PR), thus rename > tricore_feature to is_tricore_feature_enabled. > > Build error log is below > > /o

Re: [PATCH v2 23/46] target/loognarch: Implement xvldi

2023-07-08 Thread Richard Henderson
On 6/30/23 08:58, Song Gao wrote: This patch includes: - XVLDI. Signed-off-by: Song Gao --- target/loongarch/disas.c | 7 +++ target/loongarch/insn_trans/trans_lasx.c.inc | 2 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 6 -- target/loongarch/insns.decode

Re: [PATCH v2 24/46] target/loongarch: Implement LASX logic instructions

2023-07-08 Thread Richard Henderson
On 6/30/23 08:58, Song Gao wrote: +len = (simd_oprsz(v) == 16) ? LSX_LEN : LASX_LEN; Use simd_oprsz directly, without the rest of the computation. r~

Re: [PATCH v2 25/46] target/loongarch: Implement xvsll xvsrl xvsra xvrotr

2023-07-08 Thread Richard Henderson
On 6/30/23 08:58, Song Gao wrote: This patch includes: - XVSLL[I].{B/H/W/D}; - XVSRL[I].{B/H/W/D}; - XVSRA[I].{B/H/W/D}; - XVROTR[I].{B/H/W/D}. Signed-off-by: Song Gao --- target/loongarch/disas.c | 36 target/loongarch/insn_trans/trans_lasx.c.inc | 36

Re: [PATCH v2 26/46] target/loongarch: Implement xvsllwil xvextl

2023-07-08 Thread Richard Henderson
On 6/30/23 08:58, Song Gao wrote: +#define VSLLWIL(NAME, BIT, E1, E2) \ +void HELPER(NAME)(CPULoongArchState *env, uint32_t oprsz, \ + uint32_t vd, uint32_t vj, uint32_t imm) \ +{

Re: [PATCH v2 20/46] target/loongarch: Implement vext2xv

2023-07-08 Thread Song Gao
Hi, Richard 在 2023/7/8 上午5:19, Richard Henderson 写道: On 6/30/23 08:58, Song Gao wrote: +#define VEXT2XV(NAME, BIT, E1, E2)    \ +void HELPER(NAME)(CPULoongArchState *env, uint32_t oprsz, \ +  uint32_t vd, uint32_t vj)   \ +{   

[PATCH v3 2/2] target/riscv: Optimize ambiguous local variable in pmp_hart_has_privs

2023-07-08 Thread Ruibo Lu
These two values represents whether start/end address is in pmp_range. However, the type and name of them is ambiguous. This commit change the name and type of them to improve code readability and accuracy. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1735 Reviewed-by: Weiwei Li Review

[PATCH v3 0/2] target/riscv: improve code accuracy and

2023-07-08 Thread Ruibo Lu
I'm so sorry. As a newcomer, I'm not familiar with the patch mechanism. I mistakenly added the reviewer's "Reviewed-by" line into the wrong commit, So I have resent this patchset Changes in v3: * fix the allignment of pmp_is_in_range parameter line Changes in v2: * change the initial values of

[PATCH v3 1/2] target/riscv: Remove redundant check in pmp_is_locked

2023-07-08 Thread Ruibo Lu
the check of top PMP is redundant and will not influence the return value, so consider remove it Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1733 Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis Signed-off-by: Ruibo Lu --- target/riscv/pmp.c | 5 - 1 file changed, 5 deletio

Re: Reducing vdpa migration downtime because of memory pin / maps

2023-07-08 Thread Si-Wei Liu
On 7/5/2023 10:46 PM, Eugenio Perez Martin wrote: On Thu, Jul 6, 2023 at 2:13 AM Si-Wei Liu wrote: On 7/5/2023 11:03 AM, Eugenio Perez Martin wrote: On Tue, Jun 27, 2023 at 8:36 AM Si-Wei Liu wrote: On 6/9/2023 7:32 AM, Eugenio Perez Martin wrote: On Fri, Jun 9, 2023 at 12:39 AM Si-We

[PATCH v3 0/2] Vhost-vdpa Shadow Virtqueue _F_CTRL_RX_EXTRA commands support

2023-07-08 Thread Hawkins Jiawei
This series enables shadowed CVQ to intercept rx commands related to VIRTIO_NET_F_CTRL_RX_EXTRA feature through shadowed CVQ, update the virtio NIC device model so qemu send it in a migration, and the restore of that rx state in the destination. To test this patch series, one should modify the `n-

Re: [PATCH v7 12/15] target/riscv: Add Zvkg ISA extension support

2023-07-08 Thread Daniel Henrique Barboza
Hi, This patch breaks some gitlab runners because of this: On 7/2/23 12:53, Max Chou wrote: From: Nazar Kazakov This commit adds support for the Zvkg vector-crypto extension, which consists of the following instructions: * vgmul.vv * vghsh.vv Translation functions are defined in `target/ris

[PATCH v3 1/2] vdpa: Restore packet receive filtering state relative with _F_CTRL_RX_EXTRA feature

2023-07-08 Thread Hawkins Jiawei
This patch refactors vhost_vdpa_net_load_rx() to restore the packet receive filtering state in relation to VIRTIO_NET_F_CTRL_RX_EXTRA feature at device's startup. Signed-off-by: Hawkins Jiawei --- v3: - return early if mismatch the condition suggested by Eugenio - remove the `on` variable sug

[PATCH v3 2/2] vdpa: Allow VIRTIO_NET_F_CTRL_RX_EXTRA in SVQ

2023-07-08 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_CTRL_RX_EXTRA feature. Signed-off-by: Hawkins Jiawei Acked-by: Eugenio Pérez --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 9a1905fddd..1df82636c9 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.

Re: [PULL 29/38] gdbstub: Permit reverse step/break to provide stop response

2023-07-08 Thread Alex Bennée
Michael Tokarev writes: > 03.07.2023 16:44, Alex Bennée wrote: >> From: Nicholas Piggin >> The final part of the reverse step and break handling is to bring >> the machine back to a debug stop state. gdb expects a response. >> A gdb 'rsi' command hangs forever because the gdbstub filters out >

Re: [PATCH v2 1/2] accel/tcg: Split out cpu_exec_longjmp_cleanup

2023-07-08 Thread Alex Bennée
Richard Henderson writes: > Share the setjmp cleanup between cpu_exec_step_atomic > and cpu_exec_setjmp. > > Reviewed-by: Richard W.M. Jones > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

[PULL 2/3] linux-user: Fix accept4(SOCK_NONBLOCK) syscall

2023-07-08 Thread Helge Deller
The Linux accept4() syscall allows two flags only: SOCK_NONBLOCK and SOCK_CLOEXEC, and returns -EINVAL if any other bits have been set. Change the qemu implementation accordingly, which means we can not use the fcntl_flags_tbl[] translation table which allows too many other values. Beside the cor

[PULL 0/3] Linux user fcntl64 patches

2023-07-08 Thread Helge Deller
The following changes since commit 97c81ef4b8e203d9620fd46e7eb77004563e3675: Merge tag 'pull-9p-20230706' of https://github.com/cschoenebeck/qemu into staging (2023-07-06 18:19:42 +0100) are available in the Git repository at: https://github.com/hdeller/qemu-hppa.git tags/linux-user-fcntl64

[PULL 1/3] linux-user: Fix fcntl() and fcntl64() to return O_LARGEFILE for 32-bit targets

2023-07-08 Thread Helge Deller
When running a 32-bit guest on a 64-bit host, fcntl[64](F_GETFL) should return with the TARGET_O_LARGEFILE flag set, because all 64-bit hosts support large files unconditionally. But on 64-bit hosts, O_LARGEFILE has the value 0, so the flag translation can't be done with the fcntl_flags_tbl[]. Ins

[PULL 3/3] linux-user: Improve strace output of pread64() and pwrite64()

2023-07-08 Thread Helge Deller
Make the strace look nicer for those two syscalls. Signed-off-by: Helge Deller Reviewed-by: Richard Henderson --- linux-user/strace.c| 19 +++ linux-user/strace.list | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.c b/linux-user/s

Re: [PULL trival-patches 00/10] trivial-patches for 2023-07-08

2023-07-08 Thread Richard Henderson
.com/mjt0k/qemu.git tags/trivial-patches-20230708 for you to fetch changes up to 13a637430be13bda3e6726752936321a1955bc93: hw/arm/virt-acpi-build.c: Add missing header (2023-07-08 07:24:38 +0300) qemu trivial patches for 2023-07-08

Re: [PATCH v4 26/37] target/arm: Use aesdec_ISB_ISR_AK

2023-07-08 Thread Philippe Mathieu-Daudé
On 3/7/23 12:05, Richard Henderson wrote: This implements the AESD instruction. Signed-off-by: Richard Henderson --- target/arm/tcg/crypto_helper.c | 37 +++--- 1 file changed, 16 insertions(+), 21 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 25/37] target/arm: Use aesenc_SB_SR_AK

2023-07-08 Thread Philippe Mathieu-Daudé
On 3/7/23 12:05, Richard Henderson wrote: This implements the AESE instruction. Signed-off-by: Richard Henderson --- target/arm/tcg/crypto_helper.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 27/37] target/arm: Use aesenc_MC

2023-07-08 Thread Philippe Mathieu-Daudé
On 3/7/23 12:05, Richard Henderson wrote: This implements the AESMC instruction. Signed-off-by: Richard Henderson --- target/arm/tcg/crypto_helper.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 28/37] target/arm: Use aesdec_IMC

2023-07-08 Thread Philippe Mathieu-Daudé
On 3/7/23 12:05, Richard Henderson wrote: This implements the AESIMC instruction. We have converted everything to crypto/aes-round.h; crypto/aes.h is no longer needed. Signed-off-by: Richard Henderson --- target/arm/tcg/crypto_helper.c | 33 ++--- 1 file changed,

Re: [PATCH v4 31/37] target/riscv: Use aesdec_IMC

2023-07-08 Thread Philippe Mathieu-Daudé
On 3/7/23 12:05, Richard Henderson wrote: This implements the AES64IM instruction. Signed-off-by: Richard Henderson --- target/riscv/crypto_helper.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] linux-user: make sure brk(0) returns a page-aligned value

2023-07-08 Thread Richard Henderson
On 7/6/23 12:34, Andreas Schwab wrote: Fixes: 86f04735ac ("linux-user: Fix brk() to release pages") Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 08162cc966..e8a17377

Re: [PATCH v4 33/37] target/riscv: Use aesdec_ISB_ISR_IMC_AK

2023-07-08 Thread Philippe Mathieu-Daudé
On 3/7/23 12:05, Richard Henderson wrote: This implements the AES64DSM instruction. This was the last use of aes64_operation and its support macros, so remove them all. Signed-off-by: Richard Henderson --- target/riscv/crypto_helper.c | 101 --- 1 file change

Re: [PATCH v4 13/37] host/include/aarch64: Implement aes-round.h

2023-07-08 Thread Philippe Mathieu-Daudé
+Ard On 3/7/23 12:04, Richard Henderson wrote: Detect AES in cpuinfo; implement the accel hooks. Signed-off-by: Richard Henderson --- meson.build | 9 + host/include/aarch64/host/cpuinfo.h | 1 + host/include/aarch64/host/crypto/aes-round.h | 2

Re: [PATCH v4 00/37] crypto: Provide aes-round.h and host accel

2023-07-08 Thread Philippe Mathieu-Daudé
On 3/7/23 12:04, Richard Henderson wrote: Inspired by Ard Biesheuvel's RFC patches for accelerating AES under emulation, provide a set of primitives that maps between the guest and host fragments. Changes for v4: * Fix typo in AESState (Max Chou) * Define AES_SH/ISH as macros (Ard Biesheuv

Re: [PATCH v2 21/24] accel/tcg: Accept more page flags in page_check_range

2023-07-08 Thread Philippe Mathieu-Daudé
On 7/7/23 22:40, Richard Henderson wrote: Only PAGE_WRITE needs special attention, all others can be handled as we do for PAGE_READ. Adjust the mask. Signed-off-by: Richard Henderson --- accel/tcg/user-exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe

Re: [PATCH v2 17/24] linux-user: Use 'last' instead of 'end' in target_mmap

2023-07-08 Thread Philippe Mathieu-Daudé
On 7/7/23 22:40, Richard Henderson wrote: Complete the transition within the mmap functions to a formulation that does not overflow at the end of the address space. Signed-off-by: Richard Henderson --- linux-user/mmap.c | 45 +++-- 1 file changed, 23 i

Re: [PATCH] linux-user: make sure brk(0) returns a page-aligned value

2023-07-08 Thread Helge Deller
On 7/8/23 19:26, Richard Henderson wrote: On 7/6/23 12:34, Andreas Schwab wrote: Fixes: 86f04735ac ("linux-user: Fix brk() to release pages") Signed-off-by: Andreas Schwab ---   linux-user/syscall.c | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linu

Re: [PATCH] linux-user: make sure brk(0) returns a page-aligned value

2023-07-08 Thread Helge Deller
On 7/8/23 23:36, Helge Deller wrote: On 7/8/23 19:26, Richard Henderson wrote: On 7/6/23 12:34, Andreas Schwab wrote: Fixes: 86f04735ac ("linux-user: Fix brk() to release pages") Signed-off-by: Andreas Schwab ---   linux-user/syscall.c | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) di

Re: [RISC-V] ERROR:../accel/tcg/cpu-exec.c:1028:cpu_exec_setjmp: assertion failed: (cpu == current_cpu)

2023-07-08 Thread Helge Deller
On 7/4/23 12:52, Andreas Schwab wrote: I think the issue is that the value returned from brk(0) is no longer page aligned. $ ./qemu-riscv64 -strace ../exe1 18329 brk(NULL) = 0x00303000 18329 faccessat(AT_FDCWD,"/etc/ld.so.preload",R_OK,0x3010d0) = -1 errno=2 (No such file or directory