Re: [PATCH 05/20] target/arm: Convert MSR (immediate) to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the MSR (immediate) insn to decodetree. Our implementation has basically no commonality between the different destinations, so we decode the destination register in a64.decode. Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 13

Re: [PATCH v4 0/6] Vhost-vdpa Shadow Virtqueue Offloads support

2023-06-03 Thread Hawkins Jiawei
On 2023/6/3 1:47, Eugenio Perez Martin wrote: > On Fri, Jun 2, 2023 at 1:52 PM Hawkins Jiawei wrote: >> >> This series enables shadowed CVQ to intercept Offloads commands >> through shadowed CVQ, update the virtio NIC device model so qemu >> send it in a migration, and the restore of that

Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes

2023-06-03 Thread bibo, mao
在 2023/5/23 21:07, Philippe Mathieu-Daudé 写道: > On 23/5/23 13:18, Jiaxun Yang wrote: >> >> >>> 2023年5月23日 11:01,Song Gao 写道: >>> >>> >>> >>> 在 2023/5/23 上午11:22, Jiaxun Yang 写道: >> [...] > Is totally the same on MIPS and LoongArch. I’m guarding them out because We have

Re: [PULL 07/21] cutils: Fix wraparound parsing in qemu_strtoui

2023-06-03 Thread Michael Tokarev
02.06.2023 01:02, Eric Blake пишет: While we were matching 32-bit strtol in qemu_strtoi, our use of a 64-bit parse was leaking through for some inaccurate answers in qemu_strtoui in comparison to a 32-bit strtoul (see the unit test for examples). The comment for that function even described

Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes

2023-06-03 Thread Song Gao
在 2023/5/21 下午6:23, Jiaxun Yang 写道: As per "Loongson 3A5000/3B5000 Processor Reference Manual", Loongson 3A5000's IPI implementation have 4 mailboxes per core. However, in 78464f023b54 ("hw/loongarch/virt: Modify ipi as percpu device"), the number of IPI mailboxes was reduced to one, which

Re: [PATCH 06/20] target/arm: Convert MSR (reg), MRS, SYS, SYSL to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert MSR (reg), MRS, SYS, SYSL to decodetree. For QEMU these are all essentially the same instruction (system register access). Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 8 target/arm/tcg/translate-a64.c | 32

Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes

2023-06-03 Thread Jiaxun Yang
> 2023年6月3日 01:28,Peter Maydell 写道: > > On Sun, 21 May 2023 at 11:24, Jiaxun Yang wrote: >> >> As per "Loongson 3A5000/3B5000 Processor Reference Manual", >> Loongson 3A5000's IPI implementation have 4 mailboxes per >> core. >> >> However, in 78464f023b54 ("hw/loongarch/virt: Modify ipi as

Re: [PATCH 07/20] target/arm: Convert exception generation instructions to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the exception generation instructions SVC, HVC, SMC, BRK and HLT to decodetree. The old decoder decoded the halting-debug insnns DCPS1, DCPS2 and DCPS3 just in order to then make them UNDEF; as with DRPS, we don't bother to decode them, but document

Re: [PATCH 1/4] hw/intc/loongarch_ipi: Bring back all 4 IPI mailboxes

2023-06-03 Thread Song Gao
在 2023/6/3 下午3:06, Jiaxun Yang 写道: 2023年6月3日 01:28,Peter Maydell 写道: On Sun, 21 May 2023 at 11:24, Jiaxun Yang wrote: As per "Loongson 3A5000/3B5000 Processor Reference Manual", Loongson 3A5000's IPI implementation have 4 mailboxes per core. However, in 78464f023b54

[PATCH v2] Use named constants in BCM props

2023-06-03 Thread Sergey Kambalin
- PI_FIRMWARE_*_RATE constsnts were moved to raspberrypi-fw-defs.h (seems more suitable place for them) - inclusion of "qemu/osdep.h" has been removed - year in copyright header has been updated Signed-off-by: Sergey Kambalin --- hw/misc/bcm2835_property.c| 120

Re: [PATCH 04/35] crypto: Add aesenc_SB_SR

2023-06-03 Thread Ard Biesheuvel
On Sat, 3 Jun 2023 at 04:34, Richard Henderson wrote: > > Start adding infrastructure for accelerating guest AES. > Begin with a SubBytes + ShiftRows primitive. > > Signed-off-by: Richard Henderson > --- > host/include/generic/host/aes-round.h | 15 + > include/crypto/aes-round.h

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

2023-06-03 Thread Ard Biesheuvel
On Sat, 3 Jun 2023 at 04:34, 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. > > There is a small guest correctness test case. > > I think the end result is

Re: [PATCH v3 23/48] tcg: Split helper-gen.h

2023-06-03 Thread Philippe Mathieu-Daudé
On 3/6/23 06:09, Richard Henderson wrote: On 6/2/23 14:17, Philippe Mathieu-Daudé wrote: On 31/5/23 06:03, Richard Henderson wrote: Create helper-gen-common.h without the target specific portion. Use that in tcg-op-common.h.  Reorg headers in target/arm to ensure that helper-gen.h is included

Re: [PATCH v3 15/48] tcg: Split tcg/tcg-op-common.h from tcg/tcg-op.h

2023-06-03 Thread Philippe Mathieu-Daudé
On 3/6/23 06:04, Richard Henderson wrote: On 6/2/23 14:29, Philippe Mathieu-Daudé wrote: On 31/5/23 06:02, Richard Henderson wrote: Create tcg/tcg-op-common.h, moving everything that does not concern TARGET_LONG_BITS or TCGv.  Adjust tcg/*.c to use the new header instead of tcg-op.h, in

[PATCH v2 2/3] target/riscv: Support MSTATUS.MPV/GVA only when RVH is enabled

2023-06-03 Thread Weiwei Li
MPV and GVA bits are added by hypervisor extension to mstatus and mstatush (if MXLEN=32). Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- target/riscv/csr.c | 10 -- 1 file changed, 4 insertions(+), 6

Re: [PATCH 02/35] target/arm: Move aesmc and aesimc tables to crypto/aes.c

2023-06-03 Thread Richard Henderson
On 6/3/23 05:45, Ard Biesheuvel wrote: On Sat, 3 Jun 2023 at 04:34, Richard Henderson wrote: We do not currently have a table in crypto/ for just MixColumns. Move both tables for consistency. Signed-off-by: Richard Henderson --- include/crypto/aes.h | 6 ++ crypto/aes.c

Re: [PATCH 04/35] crypto: Add aesenc_SB_SR

2023-06-03 Thread Richard Henderson
On 6/3/23 06:15, Ard Biesheuvel wrote: diff --git a/crypto/aes.c b/crypto/aes.c index 1309a13e91..708838315a 100644 --- a/crypto/aes.c +++ b/crypto/aes.c @@ -29,6 +29,7 @@ */ #include "qemu/osdep.h" #include "crypto/aes.h" +#include "crypto/aes-round.h" typedef uint32_t u32; typedef

Re: [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-03 Thread Andrew Jones
On Fri, Jun 02, 2023 at 07:58:30PM -0700, Richard Henderson wrote: > On 6/2/23 07:02, Andrew Jones wrote: > > > +struct riscv_hwprobe { > > > +int64_t key; > > > +uint64_t value; > > > +}; > > > > The above is all uapi so Linux's arch/riscv/include/uapi/asm/hwprobe.h > > should be picked

Re: [PATCH 31/35] host/include/aarch64: Implement aes-round.h

2023-06-03 Thread Richard Henderson
On 6/3/23 05:50, Ard Biesheuvel wrote: On Sat, 3 Jun 2023 at 04:34, Richard Henderson wrote: Detect AES in cpuinfo; implement the accel hooks. Signed-off-by: Richard Henderson --- host/include/aarch64/host/aes-round.h | 204 ++ host/include/aarch64/host/cpuinfo.h

[PATCH] target/sh4: Emit insn_start for each insn in gUSA region

2023-06-03 Thread Richard Henderson
Fixes an assert in tcg_gen_code that we don't accidentally eliminate an insn_start during optimization. Signed-off-by: Richard Henderson --- Test case is tests/tcg/multiarch/testthread.c; the assert for equality is new with

Re: [PULL 31/35] hw/intc/allwinner-a10-pic: Don't use set_bit()/clear_bit()

2023-06-03 Thread Guenter Roeck
On 6/3/23 10:46, Michael Tokarev wrote: 03.06.2023 18:03, Guenter Roeck wrote: Hi, On Tue, May 02, 2023 at 01:14:55PM +0100, Peter Maydell wrote: The Allwinner PIC model uses set_bit() and clear_bit() to update the values in its irq_pending[] array when an interrupt arrives.  However it is

Re: [PATCH 02/35] target/arm: Move aesmc and aesimc tables to crypto/aes.c

2023-06-03 Thread Ard Biesheuvel
On Sat, 3 Jun 2023 at 04:34, Richard Henderson wrote: > > We do not currently have a table in crypto/ for > just MixColumns. Move both tables for consistency. > > Signed-off-by: Richard Henderson > --- > include/crypto/aes.h | 6 ++ > crypto/aes.c | 142

Re: [PATCH v3 00/48] tcg: Build once for system, once for user

2023-06-03 Thread Philippe Mathieu-Daudé
On 3/6/23 06:34, Richard Henderson wrote: On 6/2/23 14:25, Philippe Mathieu-Daudé wrote: On 31/5/23 06:02, Richard Henderson wrote:   133 files changed, 3022 insertions(+), 2728 deletions(-)   create mode 100644 include/exec/helper-gen-common.h   create mode 100644

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-06-03 Thread Weiwei Li
On 2023/6/3 05:01, Richard Henderson wrote: On 6/1/23 18:31, Weiwei Li wrote: Even though MPRV normally can be set to 1 in M mode, it seems possible to set it to 1 in other mode by gdbstub. That would seem to be a gdbstub bug, since it is cleared on exit from M-mode, and cannot be set

Re: [PULL 31/35] hw/intc/allwinner-a10-pic: Don't use set_bit()/clear_bit()

2023-06-03 Thread Guenter Roeck
Hi, On Tue, May 02, 2023 at 01:14:55PM +0100, Peter Maydell wrote: > The Allwinner PIC model uses set_bit() and clear_bit() to update the > values in its irq_pending[] array when an interrupt arrives. However > it is using these functions wrongly: they work on an array of type > 'long', and it

Re: [PATCH 13/20] target/arm: Convert LDR/STR with 12-bit immediate to decodetree

2023-06-03 Thread Peter Maydell
On Fri, 2 Jun 2023 at 21:51, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > On 2/6/23 17:52, Peter Maydell wrote: > > Convert the LDR and STR instructions which use a 12-bit immediate > > offset to decodetree. We can reuse the existing LDR and STR > > trans functions for these. > > > >

Re: [PATCH] linux-user: Return EINVAL for getgroups() with negative gidsetsize

2023-06-03 Thread Michael Tokarev
02.06.2023 20:48, Peter Maydell wrote: @@ -11574,7 +11574,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, g_autofree gid_t *grouplist = NULL; int i; -if (gidsetsize > NGROUPS_MAX) { +if (gidsetsize >

[PATCH] linux-user: add comments for TARGET_NR_[gs]etgroups{,32}

2023-06-03 Thread Michael Tokarev
There are 2 paits of identical code (with different types) for TARGET_NR_setgroups and TARGET_NR_setgroups32, and for TARGET_NR_getgroups and TARGET_NR_getgroups32. Add comments stating this fact, so that further modifications are done in two places. Signed-off-by: Michael Tokarev --- Please

Re: [RFC v2] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-03 Thread Richard Henderson
On 6/3/23 08:50, Andrew Jones wrote: On Fri, Jun 02, 2023 at 07:58:30PM -0700, Richard Henderson wrote: On 6/2/23 07:02, Andrew Jones wrote: +struct riscv_hwprobe { +int64_t key; +uint64_t value; +}; The above is all uapi so Linux's arch/riscv/include/uapi/asm/hwprobe.h should be

Re: [PULL 31/35] hw/intc/allwinner-a10-pic: Don't use set_bit()/clear_bit()

2023-06-03 Thread Michael Tokarev
03.06.2023 18:03, Guenter Roeck wrote: Hi, On Tue, May 02, 2023 at 01:14:55PM +0100, Peter Maydell wrote: The Allwinner PIC model uses set_bit() and clear_bit() to update the values in its irq_pending[] array when an interrupt arrives. However it is using these functions wrongly: they work on

Re: [PATCH 31/35] host/include/aarch64: Implement aes-round.h

2023-06-03 Thread Ard Biesheuvel
On Sat, 3 Jun 2023 at 04:34, Richard Henderson wrote: > > Detect AES in cpuinfo; implement the accel hooks. > > Signed-off-by: Richard Henderson > --- > host/include/aarch64/host/aes-round.h | 204 ++ > host/include/aarch64/host/cpuinfo.h | 1 + >

[PATCH v2 1/3] target/riscv: Make MPV only work when MPP != PRV_M

2023-06-03 Thread Weiwei Li
Upon MRET or explicit memory access with MPRV=1, MPV should be ignored when MPP=PRV_M. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- target/riscv/cpu_helper.c | 3 ++- target/riscv/op_helper.c | 3 ++- 2 files

[PATCH v2 0/3] target/riscv: Fix mstatus related problems

2023-06-03 Thread Weiwei Li
This patchset tries to fix some problems in the fields of mstatus, such as make MPV only work when MPP != PRM. The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-mpv-upstream-v2 v2: * Drop patch 3 (remove check on mode M for MPRV) * rebase on apply-to-riscv.next Weiwei

[PATCH v2 3/3] target/riscv: Remove redundant assignment to SXL

2023-06-03 Thread Weiwei Li
SXL is initialized as env->misa_mxl which is also the mxl value. So we can just remain it unchanged to keep it read-only. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- target/riscv/csr.c | 4 1 file changed,

Re: [PATCH] linux-user: Return EINVAL for getgroups() with negative gidsetsize

2023-06-03 Thread Michael Tokarev
02.06.2023 20:48, Peter Maydell wrote: Coverity doesn't like the way we might end up calling getgroups() with a NULL grouplist pointer. This is fine for the special case of gidsetsize == 0, but we will also do it if the guest passes us a negative gidsetsize. (CID 1512465) Explicitly fail the

Re: [PATCH 15/15] hw/timer/arm_timer: QOM'ify ARM_TIMER

2023-06-03 Thread Mark Cave-Ayland
On 31/05/2023 21:35, Philippe Mathieu-Daudé wrote: Introduce the ARM_TIMER sysbus device. arm_timer_new() is converted as QOM instance init()/finalize() handlers. Note in arm_timer_finalize() we release a ptimer handle which was previously leaked. ArmTimerState is directly embedded into

Re: [PATCH 15/15] hw/timer/arm_timer: QOM'ify ARM_TIMER

2023-06-03 Thread Mark Cave-Ayland
On 03/06/2023 19:07, Mark Cave-Ayland wrote: On 31/05/2023 21:35, Philippe Mathieu-Daudé wrote: Introduce the ARM_TIMER sysbus device. arm_timer_new() is converted as QOM instance init()/finalize() handlers. Note in arm_timer_finalize() we release a ptimer handle which was previously leaked.

Re: [PATCH 19/20] target/arm: Convert load/store single structure to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: +# Load/store single structure + +%ldst_single_selem 13:1 21:1 !function=plus_1 +# The index is made up from bits Q, S and the size; we may then need to scale +# it down by the size. +%ldst_single_index q:1 s:1 sz:2 +%ldst_single_index_scaled q:1 s:1 sz:2

Re: [PATCH 20/20] target/arm: Convert load/store tags insns to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the instructions in the load/store memory tags instruction group to decodetree. Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 25 +++ target/arm/tcg/translate-a64.c | 352 - 2 files changed,

Re: [PATCH v3 00/48] tcg: Build once for system, once for user

2023-06-03 Thread Richard Henderson
Still missing review: 1, 20, 25, 27. r~ On 5/30/23 21:02, Richard Henderson wrote: The goal here is only tcg/, leaving accel/tcg/ for future work. Changes for v3: * Prerequisites and 3 patches merged. r~ Richard Henderson (48): tcg/ppc: Remove TARGET_LONG_BITS, TCG_TYPE_TL

Re: [PULL 3/5] tcg: add perfmap and jitdump

2023-06-03 Thread Ilya Leoshkevich
On Fri, 2023-06-02 at 18:21 +0100, Peter Maydell wrote: > On Mon, 16 Jan 2023 at 22:36, Richard Henderson > wrote: > > > > From: Ilya Leoshkevich > > > > Add ability to dump /tmp/perf-.map and jit-.dump. > > The first one allows the perf tool to map samples to each > > individual > >

Re: [PATCH v2 05/23] q800: move CPU object into Q800MachineState

2023-06-03 Thread Mark Cave-Ayland
On 31/05/2023 18:43, Philippe Mathieu-Daudé wrote: On 31/5/23 14:53, Mark Cave-Ayland wrote: Also change the instantiation of the CPU to use object_initialize_child() followed by a separate realisation. Signed-off-by: Mark Cave-Ayland ---   hw/m68k/q800.c | 13 -  

Re: [PATCH v2 21/23] q800: move macfb device to Q800MachineState

2023-06-03 Thread Mark Cave-Ayland
On 31/05/2023 14:55, Philippe Mathieu-Daudé wrote: On 31/5/23 14:53, Mark Cave-Ayland wrote: Also change the instantiation of the macfb device to use object_initialize_child(). Signed-off-by: Mark Cave-Ayland ---   hw/m68k/q800.c | 6 --   include/hw/m68k/q800.h | 2 ++   2 files

Re: [PATCH v2 05/23] q800: move CPU object into Q800MachineState

2023-06-03 Thread Mark Cave-Ayland
On 01/06/2023 10:00, Markus Armbruster wrote: Mark Cave-Ayland writes: On 31/05/2023 16:00, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 31/5/23 14:53, Mark Cave-Ayland wrote: Also change the instantiation of the CPU to use object_initialize_child() followed by a separate

Re: [PATCH] scripts: remove dead file

2023-06-03 Thread Richard Henderson
On 6/3/23 14:43, Paolo Bonzini wrote: scripts/test-driver.py was used when "make check" was already using meson introspection data, but it did not execute "meson test". It is dead since commit 3d2f73ef75e ("build: use "meson test" as the test harness", 2021-12-23). Signed-off-by: Paolo Bonzini

[PATCH 05/15] linux-user: Use abi_ullong not uint64_t in syscall_defs.h

2023-06-03 Thread Richard Henderson
Be careful not to change linux_dirent64, which is a host structure. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 72 +++ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h

[PATCH 08/15] linux-user: Use abi_ullong not unsigned long long in syscall_defs.h

2023-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 20986bd1d3..45ebacd4b4 100644 --- a/linux-user/syscall_defs.h +++

[PATCH 12/15] linux-user: Use abi_short not short in syscall_defs.h

2023-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 21ca03b0f4..9dc41828cf 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@

[PATCH 06/15] linux-user: Use abi_llong not int64_t in syscall_defs.h

2023-06-03 Thread Richard Henderson
Be careful not to change linux_dirent64, which is a host structure. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index

[PATCH 04/15] linux-user: Use abi_int not int32_t in syscall_defs.h

2023-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 60 +++ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 414d88a9ec..caaa895bec 100644 --- a/linux-user/syscall_defs.h

Re: [PATCH 08/20] target/arm: Convert load/store exclusive and ordered to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the instructions in the load/store exclusive (STXR, STLXR, LDXR, LDAXR) and load/store ordered (STLR, STLLR, LDAR, LDLAR) to decodetree. Note that for STLR, STLLR, LDAR, LDLAR this fixes an under-decoding in the legacy decoder where we were not

Re: [PATCH 09/20] target/arm: Convert LDXP, STXP, CASP, CAS to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: +# CASP, CASPA, CASPAL, CASPL +CASP0 . 001000 0 a:1 1 rs:5 lasr:1 1 rn:5 rt:5 sz=%imm1_30_p2 +# CAS, CASA, CASAL, CASL +CAS sz:2 001000 1 a:1 1 rs:5 lasr:1 1 rn:5 rt:5 Drop decode of a + lasr? Or rename lasr to l? Anyhow,

Re: [PATCH 12/20] target/arm: Convert ld/st reg+imm9 insns to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the load and store instructions which use a 9-bit immediate offset to decodetree. Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 69 target/arm/tcg/translate-a64.c | 198 + 2 files

Re: [PATCH 14/20] target/arm: Convert LDR/STR reg+reg to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the LDR and STR instructions which take a register plus register offset to decodetree. Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 22 + target/arm/tcg/translate-a64.c | 163 +++-- 2 files

Re: [PATCH 16/20] target/arm: Convert load (pointer auth) insns to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the instructions in the load/store register (pointer authentication) group ot decodetree: LDRAA, LDRAB. Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 7 +++ target/arm/tcg/translate-a64.c | 83

Re: [PATCH v2 19/23] q800: move mac-nubus-bridge device to Q800MachineState

2023-06-03 Thread Mark Cave-Ayland
On 31/05/2023 14:52, Philippe Mathieu-Daudé wrote: On 31/5/23 14:53, Mark Cave-Ayland wrote: Also change the instantiation of the mac-nubus-bridge device to use object_initialize_child(). Signed-off-by: Mark Cave-Ayland ---   hw/m68k/q800.c | 5 -   include/hw/m68k/q800.h | 2 ++  

[PATCH] scripts: remove dead file

2023-06-03 Thread Paolo Bonzini
scripts/test-driver.py was used when "make check" was already using meson introspection data, but it did not execute "meson test". It is dead since commit 3d2f73ef75e ("build: use "meson test" as the test harness", 2021-12-23). Signed-off-by: Paolo Bonzini --- scripts/test-driver.py | 35

[PATCH 01/15] linux-user: Reformat syscall_defs.h

2023-06-03 Thread Richard Henderson
Untabify and re-indent. We had a mix of 2, 3, 4, and 8 space indentation. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 1948 ++--- 1 file changed, 974 insertions(+), 974 deletions(-) diff --git a/linux-user/syscall_defs.h

[PATCH 10/15] linux-user: Use abi_int not int in syscall_defs.h

2023-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 216 +++--- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index e4fcbd16d2..442a8aefe3 100644 --- a/linux-user/syscall_defs.h

[PATCH 14/15] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for microblaze

2023-06-03 Thread Richard Henderson
Based on gcc's microblaze.h setting BIGGEST_ALIGNMENT to 32 bits. Signed-off-by: Richard Henderson --- include/exec/user/abitypes.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/exec/user/abitypes.h b/include/exec/user/abitypes.h index 743b8bb9ea..beba0a48c7

[PATCH 03/15] linux-user: Use abi_uint not uint32_t in syscall_defs.h

2023-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 108 +++--- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index a4e4df8d3e..414d88a9ec 100644 --- a/linux-user/syscall_defs.h

[PATCH 11/15] linux-user: Use abi_ushort not unsigned short in syscall_defs.h

2023-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 90 +++ 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 442a8aefe3..21ca03b0f4 100644 --- a/linux-user/syscall_defs.h

[PATCH 07/15] linux-user: Use abi_uint not unsigned int in syscall_defs.h

2023-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 290 +++--- 1 file changed, 145 insertions(+), 145 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 2846a8cfa5..20986bd1d3 100644 --- a/linux-user/syscall_defs.h

[PATCH 09/15] linux-user: Use abi_llong not long long in syscall_defs.h

2023-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 45ebacd4b4..e4fcbd16d2 100644 --- a/linux-user/syscall_defs.h +++

[PATCH 00/15] linux-user: Fix syscalls_def.h for target abi

2023-06-03 Thread Richard Henderson
Testing clang -fsanitize=undefined -fno-sanitize-recover=undefined yields ../src/linux-user/syscall.c:1241:5: runtime error: member access within \ misaligned address 0x4081007c for type \ 'struct target__kernel_timespec', which requires 8 byte alignment etc, for sh4, microblaze, and

[PATCH 02/15] linux-user: Remove #if 0 block in syscall_defs.h

2023-06-03 Thread Richard Henderson
These definitions are in sparc/signal.c. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 24 1 file changed, 24 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index e80d54780b..a4e4df8d3e 100644 ---

[PATCH 13/15] linux-user: Use abi_uint not unsigned in syscall_defs.h

2023-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 9dc41828cf..c8ffb4f785 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@

[PATCH 15/15] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for nios2

2023-06-03 Thread Richard Henderson
Based on gcc's nios2.h setting BIGGEST_ALIGNMENT to 32 bits. Signed-off-by: Richard Henderson --- include/exec/user/abitypes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/user/abitypes.h b/include/exec/user/abitypes.h index beba0a48c7..6191ce9f74 100644

Re: [PATCH 10/20] target/arm: Convert load reg (literal) group to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the "Load register (literal)" instruction class to decodetree. Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 13 ++ target/arm/tcg/translate-a64.c | 73 ++ 2 files changed, 33

Re: [PATCH 11/20] target/arm: Convert load/store-pair to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: +%imms7 15:s7 + rt2 rt rn imm sz sign w p +@ldstpair .. ... . ... . ... rt2:5 rn:5 rt:5 imm=%imms7 FYI, you don't need to extract imms7 -- imm:s7 inline will do. Anyway, Reviewed-by: Richard Henderson r~

Re: [PATCH 13/20] target/arm: Convert LDR/STR with 12-bit immediate to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the LDR and STR instructions which use a 12-bit immediate offset to decodetree. We can reuse the existing LDR and STR trans functions for these. Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 25

Re: [PATCH 15/20] target/arm: Convert atomic memory ops to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the insns in the atomic memory operations group to decodetree. Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 15 target/arm/tcg/translate-a64.c | 148 - 2 files changed, 67 insertions(+),

[PATCH 1/4] pnv/chiptod: Add POWER9/10 chiptod model

2023-06-03 Thread Nicholas Piggin
The chiptod is a pervasive facility which can keep TOD (time-of-day), synchronise it across multiple chips, and can move that TOD to or from the core timebase units. This driver implements basic emulation of chiptod registers sufficient to successfully run the skiboot chiptod synchronisation

[PATCH 0/4] ppc/pnv: Add chiptod and core timebase state machine models

2023-06-03 Thread Nicholas Piggin
This adds support for chiptod and core timebase state machine models in the powernv POWER9 and POWER10 models. This does not actually change the time or the value in TB registers (because they are alrady synced in QEMU), but it does go through the motions. It is enough to be able to run skiboot's

[PATCH 4/4] target/ppc: Implement core timebase state machine and TFMR

2023-06-03 Thread Nicholas Piggin
This implements the core timebase state machine, which is the core side of the time-of-day system in POWER processors. This facility is operated by control fields in the TFMR register, which also contains status fields. The core timebase interacts with the chiptod hardware, primarily to receive

[PATCH 2/4] target/ppc: Tidy POWER book4 SPR registration

2023-06-03 Thread Nicholas Piggin
POWER book4 (implementation-specific) SPRs are sometimes in their own functions, but in other cases are mixed with architected SPRs. Do some spring cleaning on these. Signed-off-by: Nicholas Piggin --- target/ppc/cpu_init.c | 92 --- 1 file changed, 60

[PATCH 3/4] target/ppc: add TFMR SPR implementation with read and write helpers

2023-06-03 Thread Nicholas Piggin
TFMR is the Time Facility Management Register which is specific to POWER CPUs, and used for the purpose of timebase management (generally by firmware, not the OS). This adds an initial simple TFMR register, which will form part of the core timebase facility model in the next patch.

Re: [PATCH 17/20] target/arm: Convert LDAPR/STLR (imm) to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the instructions in the LDAPR/STLR (unscaled immediate) group to decodetree. Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 10 +++ target/arm/tcg/translate-a64.c | 129 +++-- 2 files changed, 54

Re: [PATCH 18/20] target/arm: Convert load/store (multiple structures) to decodetree

2023-06-03 Thread Richard Henderson
On 6/2/23 08:52, Peter Maydell wrote: Convert the instructions in the ASIMD load/store multiple structures instruction classes to decodetree. Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 20 +++ target/arm/tcg/translate-a64.c | 220 - 2