Re: [PATCH v4 11/15] hw/nvme: Calculate BAR attributes in a function

2022-02-10 Thread Klaus Jensen
On Jan 26 18:11, Lukasz Maniak wrote: > From: Łukasz Gieryk > > An NVMe device with SR-IOV capability calculates the BAR size > differently for PF and VF, so it makes sense to extract the common code > to a separate function. > > Signed-off-by: Łukasz Gieryk > --- > hw/nvme/ctrl.c | 45

Re: [PATCH v4 15/15] hw/nvme: Update the initalization place for the AER queue

2022-02-10 Thread Klaus Jensen
On Jan 26 18:11, Lukasz Maniak wrote: > From: Łukasz Gieryk > > This patch updates the initialization place for the AER queue, so it’s > initialized once, at controller initialization, and not every time > controller is enabled. > > While the original version works for a non-SR-IOV device, as

Re: [PATCH v4 00/15] hw/nvme: SR-IOV with Virtualization Enhancements

2022-02-10 Thread Klaus Jensen
On Jan 26 18:11, Lukasz Maniak wrote: > Changes since v3: > - Addressed comments to review on pcie: Add support for Single Root I/O > Virtualization (SR/IOV) > - Fixed issues reported by checkpatch.pl > > Knut Omang (2): > pcie: Add support for Single Root I/O Virtualization (SR/IOV) >

Re: [PATCH v3 18/37] target/ppc: implement vgnb

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: +for (int dw = 1; dw >= 0; dw--) { +get_avr64(vrb, a->vrb, dw); +for (; in >= 0; in -= a->n, out--) { +if (in > out) { +tcg_gen_shri_i64(tmp, vrb, in - out); +} else { +

Re: [PATCH v3 14/37] target/ppc: implement vstri[bh][lr]

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: +#define VSTRI(NAME, ELEM, NUM_ELEMS, LEFT) \ +void helper_##NAME(CPUPPCState *env, ppc_avr_t *t, ppc_avr_t *b,\ + target_ulong rc) \ +{

Re: [PATCH v3 17/37] target/ppc: implement vcntmb[bhwd]

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 8 target/ppc/translate/vmx-impl.c.inc | 32 + 2 files changed, 40 insertions(+) Reviewed-by: Richard

Re: [PATCH v3 13/37] target/ppc: Implement Vector Compare Quadword

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Implement the following PowerISA v3.1 instructions: vcmpsq: Vector Compare Signed Quadword vcmpuq: Vector Compare Unsigned Quadword Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 6

Re: [PATCH v3 15/37] target/ppc: implement vclrlb

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 2 ++ target/ppc/translate/vmx-impl.c.inc | 56 + 2 files changed, 58 insertions(+) diff --git

Re: [PATCH v3 12/37] target/ppc: Implement Vector Compare Greater Than Quadword

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: +get_avr64(t0, a->vra, true); +get_avr64(t1, a->vrb, true); +tcg_gen_brcond_i64(sign ? TCG_COND_GT : TCG_COND_GTU, t0, t1, l1); +tcg_gen_brcond_i64(sign ? TCG_COND_LT : TCG_COND_LTU, t0, t1, l2); + +get_avr64(t0, a->vra,

Re: [PATCH v3 11/37] target/ppc: Implement Vector Compare Equal Quadword

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Implement the following PowerISA v3.1 instructions: vcmpequq Vector Compare Equal Quadword Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 1 + target/ppc/translate/vmx-impl.c.inc | 43

Re: [PATCH v3 10/37] target/ppc: Move Vector Compare Not Equal or Zero to decodetree

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: +static void gen_vcmpnez_vec(unsigned vece, TCGv_vec t, TCGv_vec a, TCGv_vec b) +{ +TCGv_vec t0, t1, zero; + +t0 = tcg_temp_new_vec_matching(t); +t1 = tcg_temp_new_vec_matching(t); +zero = tcg_constant_vec_matching(t, vece,

[PATCH v6 0/6] support subsets of Float-Point in Integer Registers extensions

2022-02-10 Thread Weiwei Li
This patchset implements RISC-V Float-Point in Integer Registers extensions(Version 1.0), which includes Zfinx, Zdinx, Zhinx and Zhinxmin extension. Specification: https://github.com/riscv/riscv-zfinx/blob/main/zfinx-1.0.0.pdf The port is available here:

[PATCH v6 4/6] target/riscv: add support for zdinx

2022-02-10 Thread Weiwei Li
-- update extension check REQUIRE_ZDINX_OR_D -- update double float point register read/write Co-authored-by: ardxwe Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson --- target/riscv/insn_trans/trans_rvd.c.inc | 285 +---

[PATCH v6 5/6] target/riscv: add support for zhinx/zhinxmin

2022-02-10 Thread Weiwei Li
- update extension check REQUIRE_ZHINX_OR_ZFH and REQUIRE_ZFH_OR_ZFHMIN_OR_ZHINX_OR_ZHINXMIN - update half float point register read/write - disable nanbox_h check Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson --- target/riscv/fpu_helper.c

[PATCH v6 6/6] target/riscv: expose zfinx, zdinx, zhinx{min} properties

2022-02-10 Thread Weiwei Li
Co-authored-by: ardxwe Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 55371b1aa5..ddda4906ff

[PATCH v6 2/6] target/riscv: hardwire mstatus.FS to zero when enable zfinx

2022-02-10 Thread Weiwei Li
Co-authored-by: ardxwe Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis --- target/riscv/cpu_helper.c | 6 +- target/riscv/csr.c| 25 - target/riscv/translate.c | 4 3 files changed, 29 insertions(+), 6

[PATCH v6 1/6] target/riscv: add cfg properties for zfinx, zdinx and zhinx{min}

2022-02-10 Thread Weiwei Li
Co-authored-by: ardxwe Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 12 target/riscv/cpu.h | 4 2 files changed, 16 insertions(+) diff --git a/target/riscv/cpu.c

[PATCH v6 3/6] target/riscv: add support for zfinx

2022-02-10 Thread Weiwei Li
- update extension check REQUIRE_ZFINX_OR_F - update single float point register read/write - disable nanbox_s check Co-authored-by: ardxwe Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson --- target/riscv/fpu_helper.c | 89 +++

Re: [PATCH v3 09/37] target/ppc: Move Vector Compare Equal/Not Equal/Greater Than to decodetree

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: +static void do_vcmp_rc(int vrt) +{ +TCGv_i64 t0, t1; + +t0 = tcg_temp_new_i64(); +t1 = tcg_temp_new_i64(); + +get_avr64(t0, vrt, true); +tcg_gen_ctpop_i64(t1, t0); +get_avr64(t0, vrt, false); +

Re: [PATCH v3 08/37] target/ppc: Implement vextsd2q

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: From: Lucas Coutinho Signed-off-by: Lucas Coutinho Signed-off-by: Matheus Ferst --- target/ppc/insn32.decode| 1 + target/ppc/translate/vmx-impl.c.inc | 18 ++ 2 files changed, 19 insertions(+)

Re: [PATCH v3 07/37] target/ppc: Move vexts[bhw]2[wd] to decodetree

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: From: Lucas Coutinho Move the following instructions to decodetree: vextsb2w: Vector Extend Sign Byte To Word vextsh2w: Vector Extend Sign Halfword To Word vextsb2d: Vector Extend Sign Byte To Doubleword vextsh2d: Vector Extend Sign

RE: [PATCH v2 06/12] Hexagon (tests/tcg/hexagon) test instructions that might set bits in USR

2022-02-10 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Thursday, February 10, 2022 7:03 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: f4...@amsat.org; a...@rev.ng; Brian Cain ; Michael > Lambert > Subject: Re: [PATCH v2 06/12] Hexagon (tests/tcg/hexagon) test instructions >

Re: [PATCH v3 06/37] target/ppc: Implement vmsumudm instruction

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: From: Víctor Colombo Based on [1] by Lijun Pan, which was never merged into master. [1]:https://lists.gnu.org/archive/html/qemu-ppc/2020-07/msg00419.html Signed-off-by: Víctor Colombo Signed-off-by: Matheus Ferst ---

Re: [PATCH v3 05/37] target/ppc: Implement vmsumcud instruction

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: +/* + * Discard lower 64-bits, leaving the carry into bit 64. + * Then sum the higher 64-bit elements. + */ +tcg_gen_mov_i64(tmp1, tmp0); +get_avr64(tmp0, a->rc, true); +tcg_gen_add2_i64(tmp1, tmp0, tmp0, zero,

Re: [PATCH v3 04/37] target/ppc: vmulh* instructions use gvec

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: +static void do_vx_vmulhu_vec(unsigned vece, TCGv_vec t, TCGv_vec a, TCGv_vec b) +{ +TCGv_vec a1, b1, mask, w, k; +unsigned bits; +bits = (vece == MO_32) ? 16 : 32; + +a1 = tcg_temp_new_vec_matching(t); +b1 =

Re: [PATCH v3 03/37] target/ppc: Moved vector multiply high and low to decodetree

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: From: "Lucas Mateus Castro (alqotel)" Moved instructions vmulld, vmulhuw, vmulhsw, vmulhud and vmulhsd to decodetree Signed-off-by: Lucas Mateus Castro (alqotel) Signed-off-by: Matheus Ferst --- target/ppc/helper.h | 8

Re: [PATCH v3 02/37] target/ppc: moved vector even and odd multiplication to decodetree

2022-02-10 Thread Richard Henderson
On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: +void helper_VMULESD(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +{ +muls64(>VsrD(1), >VsrD(0), a->VsrSD(0), b->VsrSD(0)); +} +void helper_VMULOSD(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +{ +muls64(>VsrD(1), >VsrD(0), a->VsrSD(1),

Re: [PATCH] Hexagon (target/hexagon) convert to OBJECT_DECLARE_TYPE

2022-02-10 Thread Richard Henderson
On 2/11/22 14:30, Taylor Simpson wrote: Suggested-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/cpu.h | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH] Hexagon (target/hexagon) convert to OBJECT_DECLARE_TYPE

2022-02-10 Thread Taylor Simpson
Suggested-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/cpu.h | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index 58a0d3870b..e3efbb2303 100644 --- a/target/hexagon/cpu.h +++

RE: [PATCH 11/15] target: Use ArchCPU as interface to target CPU

2022-02-10 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Thursday, February 10, 2022 7:22 PM > To: Taylor Simpson ; Philippe Mathieu-Daudé > ; qemu-devel@nongnu.org > Cc: Paolo Bonzini ; Thomas Huth > > Subject: Re: [PATCH 11/15] target: Use ArchCPU as interface to target CPU > > On

Re: [PATCH v3] target/riscv: Enable Zicbo[m,z,p] instructions

2022-02-10 Thread Weiwei Li
在 2022/2/11 上午12:34, Christoph Muellner 写道: The RISC-V base cache management operation ISA extension has been ratified [1]. This patch adds support for the defined instructions. The cmo.prefetch instructions are nops for QEMU (no emulation of the memory hierarchy, no illegal instructions, no

[PULL 34/34] tests/tcg/multiarch: Add sigbus.c

2022-02-10 Thread Richard Henderson
A mostly generic test for unaligned access raising SIGBUS. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tests/tcg/multiarch/sigbus.c | 68 1 file changed, 68 insertions(+) create mode 100644 tests/tcg/multiarch/sigbus.c diff --git

[PULL 32/34] tcg/sparc: Add tcg_out_jmpl_const for better tail calls

2022-02-10 Thread Richard Henderson
Due to mapping changes, we now rarely place the code_gen_buffer near the main executable. Which means that direct calls will now rarely be in range. So, always use indirect calls for tail calls, which allows us to avoid clobbering %o7, and therefore we need not save and restore it. Reviewed-by:

[PULL 26/34] tcg/sparc: Use tcg_out_movi_imm13 in tcg_out_addsub2_i64

2022-02-10 Thread Richard Henderson
When BH is constant, it is constrained to 11 bits for use in MOVCC. For the cases in which we must load the constant BH into a register, we do not need the full logic of tcg_out_movi; we can use the simpler function for emitting a 13 bit constant. This eliminates the only case in which TCG_REG_T2

[PULL 30/34] tcg/sparc: Convert patch_reloc to return bool

2022-02-10 Thread Richard Henderson
Since 7ecd02a06f8, if patch_reloc fails we restart translation with a smaller TB. SPARC had its function signature changed, but not the logic. Replace assert with return false. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson ---

[PULL 28/34] tcg/sparc: Add scratch argument to tcg_out_movi_int

2022-02-10 Thread Richard Henderson
This will allow us to control exactly what scratch register is used for loading the constant. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c.inc | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

Re: [RFC PATCH v5 00/30] Add LoongArch softmmu support

2022-02-10 Thread yangxiaojuan
Hi, Mark On 02/05/2022 09:32 PM, Mark Cave-Ayland wrote: > On 28/01/2022 03:40, Xiaojuan Yang wrote: > >> This series patch add softmmu support for LoongArch. >> The latest kernel: >>* https://github.com/loongson/linux/tree/loongarch-next >> The latest uefi: >>*

[PULL 17/34] tcg/arm: Drop support for armv4 and armv5 hosts

2022-02-10 Thread Richard Henderson
Support for unaligned accesses is difficult for pre-v6 hosts. While debian still builds for armv4, we cannot use a compile time test, so test the architecture at runtime and error out. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c.inc | 5 + 1 file

[PULL 27/34] tcg/sparc: Split out tcg_out_movi_imm32

2022-02-10 Thread Richard Henderson
Handle 32-bit constants with a separate function, so that tcg_out_movi_int does not need to recurse. This slightly rearranges the order of tests for small constants, but produces the same output. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c.inc | 36

[PULL 25/34] tcg/mips: Support unaligned access for softmmu

2022-02-10 Thread Richard Henderson
We can use the routines just added for user-only to emit unaligned accesses in softmmu mode too. Tested-by: Jiaxun Yang Reviewed-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c.inc | 91 ++- 1

[PULL 13/34] tcg/riscv: Support raising sigbus for user-only

2022-02-10 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.h | 2 -- tcg/riscv/tcg-target.c.inc | 63 -- 2 files changed, 61 insertions(+), 4 deletions(-) diff --git a/tcg/riscv/tcg-target.h b/tcg/riscv/tcg-target.h index ef78b99e98..11c9b3e4f4 100644 ---

[PULL 14/34] tcg/s390x: Support raising sigbus for user-only

2022-02-10 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 2 -- tcg/s390x/tcg-target.c.inc | 59 -- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/tcg/s390x/tcg-target.h b/tcg/s390x/tcg-target.h index

[PULL 23/34] tcg/arm: Support raising sigbus for user-only

2022-02-10 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h | 2 - tcg/arm/tcg-target.c.inc | 83 +++- 2 files changed, 81 insertions(+), 4 deletions(-) diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h index

[PULL 31/34] tcg/sparc: Use the constant pool for 64-bit constants

2022-02-10 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c.inc | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tcg/sparc/tcg-target.c.inc b/tcg/sparc/tcg-target.c.inc index 213aba4be6..e78945d153 100644 --- a/tcg/sparc/tcg-target.c.inc +++

[PULL 11/34] tcg/aarch64: Support raising sigbus for user-only

2022-02-10 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 2 - tcg/aarch64/tcg-target.c.inc | 91 +--- 2 files changed, 74 insertions(+), 19 deletions(-) diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h index

[PULL 22/34] tcg/arm: Reserve a register for guest_base

2022-02-10 Thread Richard Henderson
Reserve a register for the guest_base using aarch64 for reference. By doing so, we do not have to recompute it for every memory load. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c.inc | 39 --- 1 file changed, 28

[PULL 33/34] tcg/sparc: Support unaligned access for user-only

2022-02-10 Thread Richard Henderson
This is kinda sorta the opposite of the other tcg hosts, where we get (normal) alignment checks for free with host SIGBUS and need to add code to support unaligned accesses. This inline code expansion is somewhat large, but it takes quite a few instructions to make a function call to a helper

[PULL 18/34] tcg/arm: Remove use_armv5t_instructions

2022-02-10 Thread Richard Henderson
This is now always true, since we require armv6. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h | 3 +-- tcg/arm/tcg-target.c.inc | 35 ++- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git

[PULL 20/34] tcg/arm: Check alignment for ldrd and strd

2022-02-10 Thread Richard Henderson
We will shortly allow the use of unaligned memory accesses, and these require proper alignment. Use get_alignment_bits to verify and remove USING_SOFTMMU. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c.inc | 23 --- 1 file changed, 8

[PULL 29/34] tcg/sparc: Improve code gen for shifted 32-bit constants

2022-02-10 Thread Richard Henderson
We had code for checking for 13 and 21-bit shifted constants, but we can do better and allow 32-bit shifted constants. This is still 2 insns shorter than the full 64-bit sequence. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---

[PULL 10/34] tcg/i386: Support raising sigbus for user-only

2022-02-10 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.h | 2 - tcg/i386/tcg-target.c.inc | 103 -- 2 files changed, 98 insertions(+), 7 deletions(-) diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index

[PULL 07/34] softmmu/cpus: Check if the cpu work list is empty atomically

2022-02-10 Thread Richard Henderson
From: Idan Horowitz Instead of taking the lock of the cpu work list in order to check if it's empty, we can just read the head pointer atomically. This decreases cpu_work_list_empty's share from 5% to 1.3% in a profile of icount-enabled aarch64-softmmu. Signed-off-by: Idan Horowitz Message-Id:

[PULL 21/34] tcg/arm: Support unaligned access for softmmu

2022-02-10 Thread Richard Henderson
>From armv6, the architecture supports unaligned accesses. All we need to do is perform the correct alignment check in tcg_out_tlb_read. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c.inc | 41 1 file changed, 21

[PULL 24/34] tcg/mips: Support unaligned access for user-only

2022-02-10 Thread Richard Henderson
This is kinda sorta the opposite of the other tcg hosts, where we get (normal) alignment checks for free with host SIGBUS and need to add code to support unaligned accesses. Fortunately, the ISA contains pairs of instructions that are used to implement unaligned memory accesses. Use them.

[PULL 15/34] tcg/tci: Support raising sigbus for user-only

2022-02-10 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 336af5945a..fe92b5d084 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -292,11 +292,11 @@ static

[PULL 19/34] tcg/arm: Remove use_armv6_instructions

2022-02-10 Thread Richard Henderson
This is now always true, since we require armv6. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h | 1 - tcg/arm/tcg-target.c.inc | 192 ++- 2 files changed, 27 insertions(+), 166 deletions(-) diff --git

[PULL 09/34] tcg/loongarch64: Fix fallout from recent MO_Q renaming

2022-02-10 Thread Richard Henderson
From: WANG Xuerui Apparently we were left behind; just renaming MO_Q to MO_UQ is enough. Fixes: fc313c64345453c7 ("exec/memop: Adding signedness to quad definitions") Signed-off-by: WANG Xuerui Message-Id: <20220206162106.1092364-1-i.q...@xen0n.name> Signed-off-by: Richard Henderson ---

[PULL 16/34] tcg/loongarch64: Support raising sigbus for user-only

2022-02-10 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20220106134238.3936163-1-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 - tcg/loongarch64/tcg-target.c.inc | 71 +++- 2 files

[PULL 05/34] linux-user/include/host/sparc64: Fix host_sigcontext

2022-02-10 Thread Richard Henderson
Sparc64 is unique on linux in *not* passing ucontext_t as the third argument to a SA_SIGINFO handler. It passes the old struct sigcontext instead. Set both pc and npc in host_signal_set_pc. Fixes: 8b5bd461935b ("linux-user/host/sparc: Populate host_signal.h") Reviewed-by: Peter Maydell

[PULL 03/34] linux-user: Introduce host_sigcontext

2022-02-10 Thread Richard Henderson
Do not directly access ucontext_t as the third signal parameter. This is preparation for a sparc64 fix. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/include/host/aarch64/host-signal.h | 13 -

[PULL 12/34] tcg/ppc: Support raising sigbus for user-only

2022-02-10 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.h | 2 - tcg/ppc/tcg-target.c.inc | 98 2 files changed, 90 insertions(+), 10 deletions(-) diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h index

[PULL 06/34] accel/tcg: Optimize jump cache flush during tlb range flush

2022-02-10 Thread Richard Henderson
From: Idan Horowitz When the length of the range is large enough, clearing the whole cache is faster than iterating over the (possibly extremely large) set of pages contained in the range. This mimics the pre-existing similar optimization done on the flush of the tlb itself. Signed-off-by:

[PULL 02/34] linux-user: Introduce host_signal_mask

2022-02-10 Thread Richard Henderson
Do not directly access the uc_sigmask member. This is preparation for a sparc64 fix. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/include/host/aarch64/host-signal.h | 5 + linux-user/include/host/alpha/host-signal.h|

[PULL 04/34] linux-user: Move sparc/host-signal.h to sparc64/host-signal.h

2022-02-10 Thread Richard Henderson
We do not support sparc32 as a host, so there's no point in sparc64 redirecting to sparc. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/include/host/sparc/host-signal.h | 71 --- linux-user/include/host/sparc64/host-signal.h | 64

[PULL 01/34] common-user/host/sparc64: Fix safe_syscall_base

2022-02-10 Thread Richard Henderson
Use the "retl" instead of "ret" instruction alias, since we do not allocate a register window in this function. Fix the offset to the first stacked parameter, which lies beyond the register window save area. Fixes: 95c021dac835 ("linux-user/host/sparc64: Add safe-syscall.inc.S") Signed-off-by:

[PULL 00/34] tcg patch queue

2022-02-10 Thread Richard Henderson
The following changes since commit 0a301624c2f4ced3331ffd5bce85b4274fe132af: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20220208' into staging (2022-02-08 11:40:08 +) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git

[PULL 08/34] replay: use CF_NOIRQ for special exception-replaying TB

2022-02-10 Thread Richard Henderson
From: Pavel Dovgalyuk Commit aff0e204cb1f1c036a496c94c15f5dfafcd9b4b4 introduced CF_NOIRQ usage, but one case was forgotten. Record/replay uses one special TB which is not really executed, but used to cause a correct exception in replay mode. This patch adds CF_NOIRQ flag for such block.

Re: [PATCH 11/15] target: Use ArchCPU as interface to target CPU

2022-02-10 Thread Richard Henderson
On 2/11/22 04:35, Taylor Simpson wrote: -#define HEXAGON_CPU_CLASS(klass) \ -OBJECT_CLASS_CHECK(HexagonCPUClass, (klass), TYPE_HEXAGON_CPU) -#define HEXAGON_CPU(obj) \ -OBJECT_CHECK(HexagonCPU, (obj), TYPE_HEXAGON_CPU) -#define HEXAGON_CPU_GET_CLASS(obj) \ -

Re: [PATCH v2 12/12] Hexagon (target/hexagon) assignment to c4 should wait until packet commit

2022-02-10 Thread Richard Henderson
On 2/10/22 13:15, Taylor Simpson wrote: On Hexagon, c4 is an alias for predicate registers P3:0. If we assign to c4 inside a packet with reads from predicate registers, the predicate reads should get the old values. Test case added to tests/tcg/hexagon/preg_alias.c Co-authored-by: Michael

Re: [PATCH v2 10/12] Hexagon (target/hexagon) fix bug in conv_df2uw_chop

2022-02-10 Thread Richard Henderson
On 2/10/22 13:15, Taylor Simpson wrote: Fix typo that checked for 32 bit nan instead of 64 bit Test case added in tests/tcg/hexagon/usr.c Signed-off-by: Taylor Simpson --- target/hexagon/op_helper.c | 2 +- tests/tcg/hexagon/usr.c| 4 2 files changed, 5 insertions(+), 1

Re: [PATCH v2 08/12] Hexagon (tests/tcg/hexagon) update overflow test

2022-02-10 Thread Richard Henderson
On 2/10/22 13:15, Taylor Simpson wrote: Add a test that sets USR multiple times in a packet Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/overflow.c | 61 +++- 1 file changed, 60 insertions(+), 1 deletion(-) Acked-by: Richard Henderson r~

Re: [PATCH v2 07/12] Hexagon (tests/tcg/hexagon) add floating point instructions to usr.c

2022-02-10 Thread Richard Henderson
On 2/10/22 13:15, Taylor Simpson wrote: Tests to confirm floating point instructions are properly setting exception bits in USR Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/usr.c | 339 1 file changed, 339 insertions(+) Acked-by: Richard

Re: [PATCH v2 06/12] Hexagon (tests/tcg/hexagon) test instructions that might set bits in USR

2022-02-10 Thread Richard Henderson
On 2/10/22 13:15, Taylor Simpson wrote: +#define CLEAR_USRBITS \ +"r2 = usr\n\t" \ +"r2 = clrbit(r2, #0)\n\t" \ +"r2 = clrbit(r2, #1)\n\t" \ +"r2 = clrbit(r2, #2)\n\t" \ +"r2 = clrbit(r2, #3)\n\t" \ +"r2 = clrbit(r2, #4)\n\t" \ +"r2 = clrbit(r2, #5)\n\t" \ +"usr =

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Jag Raman
> On Feb 10, 2022, at 7:26 PM, Michael S. Tsirkin wrote: > > On Thu, Feb 10, 2022 at 04:49:33PM -0700, Alex Williamson wrote: >> On Thu, 10 Feb 2022 18:28:56 -0500 >> "Michael S. Tsirkin" wrote: >> >>> On Thu, Feb 10, 2022 at 04:17:34PM -0700, Alex Williamson wrote: On Thu, 10 Feb 2022

Re: [PATCH v2 04/12] Hexagon (target/hexagon) properly handle SNaN in dfmin/dfmax/sfmin/sfmax

2022-02-10 Thread Richard Henderson
On 2/10/22 13:15, Taylor Simpson wrote: The float??_minnum implementation differs from Hexagon for SNaN, it returns NaN, but Hexagon returns the other input. So, we add checks for NaN before calling it. test cases added in a subsequent patch to more extensively test USR bits Signed-off-by:

Re: [PATCH v2 05/12] Hexagon (target/hexagon) properly handle denorm in arch_sf_recip_common

2022-02-10 Thread Richard Henderson
On 2/10/22 13:15, Taylor Simpson wrote: The arch_sf_recip_common function was calling float32_getexp which adjusts for denorm, but the we actually need the raw exponent bits. This function is called from 3 instructions sfrecipa sffixupn sffixupd Test cases added to

Re: [PATCH v2 03/12] Hexagon (target/hexagon) properly set FPINVF bit in sfcmp.uo and dfcmp.uo

2022-02-10 Thread Richard Henderson
On 2/10/22 13:15, Taylor Simpson wrote: Instead of checking for nan arguments, use float??_unordered_quiet test cases added in a subsequent patch to more extensively test USR bits Signed-off-by: Taylor Simpson --- target/hexagon/op_helper.c | 6 ++ 1 file changed, 2 insertions(+), 4

Re: [PATCH v2 02/12] Hexagon HVX (target/hexagon) fix bug in HVX saturate instructions

2022-02-10 Thread Richard Henderson
On 2/10/22 13:15, Taylor Simpson wrote: Two tests added to tests/tcg/hexagon/hvx_misc.c v21.uw = vadd(v11.uw, v10.uw):sat v25:24.uw = vsub(v17:16.uw, v27:26.uw):sat Signed-off-by: Taylor Simpson --- target/hexagon/macros.h | 4 +- tests/tcg/hexagon/hvx_misc.c | 71

Re: [PATCH v2 01/12] Hexagon (target/hexagon) fix bug in circular addressing

2022-02-10 Thread Richard Henderson
On 2/10/22 13:15, Taylor Simpson wrote: From: Michael Lambert Versions V3 and earlier should treat the "K_const" and "length" values as unsigned. Modified circ_test_v3() in tests/tcg/hexagon/circ.c to reproduce the bug Signed-off-by: Michael Lambert Signed-off-by: Taylor Simpson ---

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Michael S. Tsirkin
On Thu, Feb 10, 2022 at 04:49:33PM -0700, Alex Williamson wrote: > On Thu, 10 Feb 2022 18:28:56 -0500 > "Michael S. Tsirkin" wrote: > > > On Thu, Feb 10, 2022 at 04:17:34PM -0700, Alex Williamson wrote: > > > On Thu, 10 Feb 2022 22:23:01 + > > > Jag Raman wrote: > > > > > > > > On Feb

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Jag Raman
> On Feb 10, 2022, at 6:17 PM, Alex Williamson > wrote: > > On Thu, 10 Feb 2022 22:23:01 + > Jag Raman wrote: > >>> On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: >>> >>> On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: Thanks for the explanation, Alex.

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Alex Williamson
On Thu, 10 Feb 2022 18:28:56 -0500 "Michael S. Tsirkin" wrote: > On Thu, Feb 10, 2022 at 04:17:34PM -0700, Alex Williamson wrote: > > On Thu, 10 Feb 2022 22:23:01 + > > Jag Raman wrote: > > > > > > On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: > > > > > > > > On Thu, Feb 10,

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Jag Raman
> On Feb 10, 2022, at 5:53 PM, Michael S. Tsirkin wrote: > > On Thu, Feb 10, 2022 at 10:23:01PM +, Jag Raman wrote: >> >> >>> On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: >>> >>> On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: > On Feb 2, 2022, at

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Michael S. Tsirkin
On Thu, Feb 10, 2022 at 04:17:34PM -0700, Alex Williamson wrote: > On Thu, 10 Feb 2022 22:23:01 + > Jag Raman wrote: > > > > On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: > > > > > > On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: > > >> > > >> Thanks for the

Re: [PATCH 1/9] accel/tcg: Add missing 'tcg/tcg.h' header

2022-02-10 Thread Richard Henderson
On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops-icount.c | 1 + accel/tcg/tcg-accel-ops-mttcg.c | 1 + accel/tcg/tcg-accel-ops-rr.c | 1 + accel/tcg/tcg-accel-ops.c| 1 + 4 files changed, 4 insertions(+) What

Re: [PATCH 9/9] user: Share preexit_cleanup() with linux and bsd implementations

2022-02-10 Thread Richard Henderson
On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: preexit_cleanup() is not Linux specific, move it to common-user/. Signed-off-by: Philippe Mathieu-Daudé --- {linux-user => common-user}/exit.c | 0 common-user/meson.build| 1 + linux-user/meson.build | 1 - 3 files

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Alex Williamson
On Thu, 10 Feb 2022 22:23:01 + Jag Raman wrote: > > On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: > > > > On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: > >> > >> Thanks for the explanation, Alex. Thanks to everyone else in the thread who > >> helped to clarify this

Re: [PATCH 7/9] user: Declare target-specific prototypes in 'user/cpu-target.h'

2022-02-10 Thread Richard Henderson
On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: Move user-mode specific prototypes from "exec/exec-all.h" to "user/cpu-target.h". Signed-off-by: Philippe Mathieu-Daudé --- Why a new cpu-target.h, and what is it supposed to mean? What else is going in there? It all looks cpu_loop related so

Re: [PATCH 5/9] linux-user/cpu_loop: Add missing 'exec/cpu-all.h' header

2022-02-10 Thread Richard Henderson
On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: env_cpu() is declared in "exec/cpu-all.h". Signed-off-by: Philippe Mathieu-Daudé --- linux-user/cpu_loop-common.h | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 6/9] exec: Define MMUAccessType in 'exec/cpu-tlb.h' header

2022-02-10 Thread Richard Henderson
On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: To reduce the inclusion of "hw/core/cpu.h", extract MMUAccessType to its own "exec/cpu-tlb.h" header. Signed-off-by: Philippe Mathieu-Daudé --- Not keen on the name, unless you plan to put something else in there. r~

Re: [PATCH 4/9] linux-user/exit: Add missing 'qemu/plugin.h' header

2022-02-10 Thread Richard Henderson
On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: qemu_plugin_user_exit() is declared in "qemu/plugin.h". Signed-off-by: Philippe Mathieu-Daudé --- linux-user/exit.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 3/9] include: Move exec/user/ to user/

2022-02-10 Thread Richard Henderson
On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: Avoid spreading the headers in multiple directories, unify exec/user/ and user/. Signed-off-by: Philippe Mathieu-Daudé --- bsd-user/qemu.h | 4 ++-- include/exec/cpu-all.h | 2 +- include/{exec =>

Re: [PATCH 2/9] coverity-scan: Cover common-user/

2022-02-10 Thread Richard Henderson
On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: common-user/ has been added in commit bbf15aaf7c ("common-user: Move safe-syscall.* from linux-user"). Signed-off-by: Philippe Mathieu-Daudé --- scripts/coverity-scan/COMPONENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [RFC PATCH 0/3] tests/tcg/ppc64le: fix the build of TCG tests with Clang

2022-02-10 Thread Richard Henderson
On 2/9/22 07:31, matheus.fe...@eldorado.org.br wrote: The second patch addresses differences in the output of float_madds.c. The __builtin_fmaf used in this test emits fmadds with GCC and xsmaddasp with LLVM. The first insn had rounding errors fixed in d04ca895dc7f ("target/ppc: Add helpers for

Re: [RFC PATCH 2/3] target/ppc: change xs[n]madd[am]sp to use float64r32_muladd

2022-02-10 Thread Richard Henderson
On 2/9/22 07:31, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Change VSX Scalar Multiply-Add/Subtract Type-A/M Single Precision helpers to use float64r32_muladd. This method should correctly handle all rounding modes, so the workaround for float_round_nearest_even can be dropped.

Re: [PATCH] hw/arm/armv7m: Handle disconnected clock inputs

2022-02-10 Thread Richard Henderson
On 2/9/22 04:16, Peter Maydell wrote: In the armv7m object, handle clock inputs that aren't connected. This is always an error for 'cpuclk'. For 'refclk' it is OK for this to be disconnected, but we need to handle it by not trying to connect a sourceless-clock to the systick device. This fixes

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Michael S. Tsirkin
On Thu, Feb 10, 2022 at 10:23:01PM +, Jag Raman wrote: > > > > On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: > > > > On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: > >> > >> > >>> On Feb 2, 2022, at 12:34 AM, Alex Williamson > >>> wrote: > >>> > >>> On Wed, 2 Feb

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Jag Raman
> On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: > > On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: >> >> >>> On Feb 2, 2022, at 12:34 AM, Alex Williamson >>> wrote: >>> >>> On Wed, 2 Feb 2022 01:13:22 + >>> Jag Raman wrote: >>> > On Feb 1, 2022, at 5:47 PM,

Re: [PATCH v3] target/riscv: Enable Zicbo[m,z,p] instructions

2022-02-10 Thread Richard Henderson
On 2/11/22 03:48, Philipp Tomsich wrote: -lq          . 010 . 000 @i +{ +  [ +    # *** RV32 Zicbom Standard Extension *** +    cbo_clean  000 1 . 010 0 000 @sfence_vm +    cbo_flush  000 00010 . 010 0 000

[PATCH] mps3-an547: Add missing user ahb interfaces

2022-02-10 Thread Jimmy Brisson
With these interfaces missing, TFM would delegate peripherals 0, 1, 2, 3 and 8, and qemu would ignore the delegation of interface 8, as it thought interface 4 was eth & USB. This patch corrects this behavior and allows TFM to delegate the eth & USB peripheral to NS mode. Signed-off-by: Jimmy

  1   2   3   4   >