Re: [PATCH] hw/intc/arm_gicv3: Fix GICv3 redistributor security checking

2021-07-17 Thread Tianrui Wei
Hi Peter, Many thanks for your detailed explanation. Upon further reflection, it seems that I have misinterpreted some of the explanations in the manual. Sorry for the confusion, the original implementation is correct. Thanks, Tianrui On Fri, Jul 16, 2021 at 4:32 PM Peter Maydell wrote: > On

Re: [PATCH for-6.2 05/10] linux-user: Split mmap prototypes into user-mmap.h

2021-07-17 Thread Peter Maydell
On Sun, 18 Jul 2021 at 00:21, Peter Maydell wrote: > > Split out the mmap prototypes into a new header user-mmap.h > which we only include where required. > > Signed-off-by: Peter Maydell > --- > linux-user/qemu.h | 20 > linux-user/user-mmap.h | 34

Re: [PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2

2021-07-17 Thread Peter Maydell
On Sat, 17 Jul 2021 at 23:18, Richard Henderson wrote: > > The actual number of bytes advanced need not be 100% exact, > but we should not cross a page when the insn would not. > > If rvc is enabled, the minimum insn size is 2. > > Signed-off-by: Richard Henderson > --- >

Re: [PATCH v3 09/13] target/mips: Reduce mips_tr_breakpoint_check pc advance to 2

2021-07-17 Thread Peter Maydell
On Sat, 17 Jul 2021 at 23:18, Richard Henderson wrote: > > The actual number of bytes advanced need not be 100% exact, > but we should not cross a page when the insn would not. > > If mips16 or mips32e are enabled, the minimum insn size is 2. > > Signed-off-by: Richard Henderson > --- >

Re: [PATCH v3 08/13] target/avr: Advance pc in avr_tr_breakpoint_check

2021-07-17 Thread Peter Maydell
On Sat, 17 Jul 2021 at 23:18, Richard Henderson wrote: > > Since 0b00b0c1e05b, tb->size must not be zero. > Advance pc so that the breakpoint covers the insn at the bp. > > Signed-off-by: Richard Henderson > --- > target/avr/translate.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH v3 01/13] accel/tcg: Reduce CF_COUNT_MASK to match TCG_MAX_INSNS

2021-07-17 Thread Peter Maydell
On Sat, 17 Jul 2021 at 23:18, Richard Henderson wrote: > > The space reserved for CF_COUNT_MASK was overly large. > Reduce to free up cflags bits and eliminate an extra test. > > Reviewed-by: Alex Bennée > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH for-6.2 10/10] linux-user: Move DEBUG_REMAP undef to uaccess.c

2021-07-17 Thread Peter Maydell
On Sun, 18 Jul 2021 at 00:21, Peter Maydell wrote: > > Since commit 687ca797893ca1e853, the code that looks at the debug > define DEBUG_REMAP is all in uaccess.c; move the #undef line to > there from qemu.h (thus reducing significantly the amount of code > that gets recompiled if you need to turn

[PATCH for-6.2 06/10] linux-user: Split safe-syscall macro into its own header

2021-07-17 Thread Peter Maydell
Split the safe-syscall macro from qemu.h into a new safe-syscall.h. Signed-off-by: Peter Maydell --- linux-user/qemu.h | 135 - linux-user/safe-syscall.h | 154 ++ linux-user/syscall.c | 1 + 3 files changed, 155

[PATCH for-6.2 10/10] linux-user: Move DEBUG_REMAP undef to uaccess.c

2021-07-17 Thread Peter Maydell
Since commit 687ca797893ca1e853, the code that looks at the debug define DEBUG_REMAP is all in uaccess.c; move the #undef line to there from qemu.h (thus reducing significantly the amount of code that gets recompiled if you need to turn the debug on). Signed-off-by: Peter Maydell ---

[PATCH for-6.2 04/10] linux-user: Split loader-related prototypes into loader.h

2021-07-17 Thread Peter Maydell
Split guest-binary loader prototypes out into a new header loader.h which we include only where required. Signed-off-by: Peter Maydell --- linux-user/loader.h| 59 ++ linux-user/qemu.h | 34 linux-user/elfload.c | 1 +

[PATCH for-6.2 09/10] linux-user: Drop unneeded includes from qemu.h

2021-07-17 Thread Peter Maydell
Trim down the #includes in qemu.h where we can, either by dropping unneeded headers or by moving them to user-internals.h. This includes deleting a couple of #includes that appear at weird points midway through the header file. Signed-off-by: Peter Maydell --- linux-user/qemu.h | 4

[PATCH for-6.2 08/10] linux-user: Don't include gdbstub.h in qemu.h

2021-07-17 Thread Peter Maydell
Currently the linux-user qemu.h pulls in gdbstub.h. There's no real reason why it should do this; include it directly from the C files which require it, and drop the include line in qemu.h. (Note that several of the C files previously relying on this indirect include were going out of their way

[PATCH for-6.2 01/10] linux-user: Fix coding style nits in qemu.h

2021-07-17 Thread Peter Maydell
We're about to move a lot of the code in qemu.h out into different header files; fix the coding style nits first so that checkpatch is happy with the pure code-movement patches. This is mostly block-comment style but also a few whitespace issues. Signed-off-by: Peter Maydell --- I didn't clean

[PATCH for-6.2 05/10] linux-user: Split mmap prototypes into user-mmap.h

2021-07-17 Thread Peter Maydell
Split out the mmap prototypes into a new header user-mmap.h which we only include where required. Signed-off-by: Peter Maydell --- linux-user/qemu.h | 20 linux-user/user-mmap.h | 34 ++ linux-user/elfload.c | 1 +

[PATCH for-6.2 07/10] linux-user: Split linux-user internals out of qemu.h

2021-07-17 Thread Peter Maydell
qemu.h is included in various non-linux-user files (which mostly want the TaskState struct and the functions for doing usermode access to guest addresses like lock_user(), unlock_user(), get_user*(), etc). Split out the parts that are only used in linux-user itself into a new user-internals.h.

[PATCH for-6.2 03/10] linux-user: Split signal-related prototypes into sighandling.h

2021-07-17 Thread Peter Maydell
Split the signal related prototypes into a new header file sighandling.h, and include it in those places that require it. Signed-off-by: Peter Maydell --- linux-user/qemu.h| 36 linux-user/sighandling.h | 56

[PATCH for-6.2 00/10] linux-user: split internals out of qemu.h

2021-07-17 Thread Peter Maydell
linux-user/qemu.h is an awkward header, for two reasons: (1) its name suggests it's a rather common generic header, but it's actually specific to the usermode emulators (2) it is a mix of: * lots of things internal to the implementation of linux-user * functions that a few files

[PATCH for-6.2 02/10] linux-user: Split strace prototypes into strace.h

2021-07-17 Thread Peter Maydell
The functions implemented in strace.c are only used in a few files in linux-user; split them out of qemu.h and into a new strace.h header which we include in the places that need it. Signed-off-by: Peter Maydell --- linux-user/qemu.h| 18 -- linux-user/strace.h | 38

RE: [PATCH] target/hexagon: Drop include of qemu.h

2021-07-17 Thread Taylor Simpson
> -Original Message- > From: Peter Maydell > Sent: Saturday, July 17, 2021 4:30 AM > To: qemu-devel@nongnu.org > Cc: Taylor Simpson > Subject: [PATCH] target/hexagon: Drop include of qemu.h > > The qemu.h file is a CONFIG_USER_ONLY header; it doesn't appear on the > include path for

Re: [PULL 44/48] meson: Introduce target-specific Kconfig

2021-07-17 Thread Peter Maydell
On Thu, 8 Jul 2021 at 16:49, Paolo Bonzini wrote: > > From: Philippe Mathieu-Daudé > > Add a target-specific Kconfig. We need the definitions in Kconfig so > the minikconf tool can verify they exits. However CONFIG_FOO is only > enabled for target foo via the meson.build rules. > > Two

[PATCH v3 08/13] target/avr: Advance pc in avr_tr_breakpoint_check

2021-07-17 Thread Richard Henderson
Since 0b00b0c1e05b, tb->size must not be zero. Advance pc so that the breakpoint covers the insn at the bp. Signed-off-by: Richard Henderson --- target/avr/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/avr/translate.c b/target/avr/translate.c index

[PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2

2021-07-17 Thread Richard Henderson
The actual number of bytes advanced need not be 100% exact, but we should not cross a page when the insn would not. If rvc is enabled, the minimum insn size is 2. Signed-off-by: Richard Henderson --- target/riscv/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 09/13] target/mips: Reduce mips_tr_breakpoint_check pc advance to 2

2021-07-17 Thread Richard Henderson
The actual number of bytes advanced need not be 100% exact, but we should not cross a page when the insn would not. If mips16 or mips32e are enabled, the minimum insn size is 2. Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 13/13] accel/tcg: Encode breakpoint info into tb->cflags

2021-07-17 Thread Richard Henderson
Having this data in cflags means that hashing takes care of selecting a TB with or without exceptions built in. Which means that we no longer need to flush all TBs. This does require that we single-step while we're within a page that contains a breakpoint, so it's not yet ideal, but should be an

[PATCH v3 06/13] accel/tcg: Use CF_NO_GOTO_{TB, PTR} in cpu_exec_step_atomic

2021-07-17 Thread Richard Henderson
Request that the one TB returns immediately, so that we release the exclusive lock as soon as possible. Reviewed-by: Peter Maydell Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

R: R: [PULL 0/3] ppc-for-6.1 queue 20210713

2021-07-17 Thread luigi burdo
Hi Zoltan can be the gcc, in past on ppc we face the same kind of issue. i will ask some other guys in the debian ppc ML if can try to build qemu and see if they have the same issue. in positive case we will report to the mantainer. Thanks Luigi Da: BALATON

[PATCH v3 05/13] accel/tcg: Handle -singlestep in curr_cflags

2021-07-17 Thread Richard Henderson
Exchange the test in translator_use_goto_tb for CF_NO_GOTO_TB, and the test in tb_gen_code for setting CF_COUNT_MASK to 1. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 8 +++- accel/tcg/translate-all.c | 2 +- accel/tcg/translator.c| 2 +-

[PATCH v3 02/13] accel/tcg: Move curr_cflags into cpu-exec.c

2021-07-17 Thread Richard Henderson
We will shortly have more than a simple member read here, with stuff not necessarily exposed to exec/exec-all.h. Reviewed-by: Peter Maydell Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 5 + accel/tcg/cpu-exec.c| 5 + 2 files changed, 6

[PATCH v3 11/13] accel/tcg: Adjust interface of TranslatorOps.breakpoint_check

2021-07-17 Thread Richard Henderson
We don't need the whole CPUBreakpoint structure in the check, only the flags. Return the instruction length to consolidate the adjustment of db->pc_next. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/translator.h | 17 +-- accel/tcg/translator.c

[PATCH v3 12/13] accel/tcg: Hoist tb_cflags to a local in translator_loop

2021-07-17 Thread Richard Henderson
The access internal to tb_cflags() is atomic. Avoid re-reading it as such for the multiple uses. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/translator.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/accel/tcg/translator.c

[PATCH v3 01/13] accel/tcg: Reduce CF_COUNT_MASK to match TCG_MAX_INSNS

2021-07-17 Thread Richard Henderson
The space reserved for CF_COUNT_MASK was overly large. Reduce to free up cflags bits and eliminate an extra test. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 4 +++- accel/tcg/translate-all.c | 5 ++--- 2 files changed, 5 insertions(+), 4

[PATCH v3 04/13] accel/tcg: Drop CF_NO_GOTO_PTR from -d nochain

2021-07-17 Thread Richard Henderson
The purpose of suppressing goto_ptr from -d nochain had been to return to the main loop so that -d cpu would be recognized. But we now include -d cpu logging in helper_lookup_tb_ptr so there is no need to exclude goto_ptr. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson ---

[PATCH v3 07/13] accel/tcg: Move cflags lookup into tb_find

2021-07-17 Thread Richard Henderson
We will shortly require the guest pc for computing cflags, so move the choice just after cpu_get_tb_cpu_state. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff

[PATCH v3 00/13] tcg: breakpoint reorg

2021-07-17 Thread Richard Henderson
This is fixing #404 ("windows xp boot takes much longer...") and several other similar reports. Changes for v3: * Map CF_COUNT_MASK == 0 -> TCG_MAX_INSNS. * Split out *_breakpoint_check fixes for avr, mips, riscv. Changes for v2: * All prerequisites and 7 of the patches from v1 with are

[PATCH v3 03/13] accel/tcg: Add CF_NO_GOTO_TB and CF_NO_GOTO_PTR

2021-07-17 Thread Richard Henderson
Move the -d nochain check to bits on tb->cflags. These will be used for more than -d nochain shortly. Set bits during curr_cflags, test them in translator_use_goto_tb, assert we're not doing anything odd in tcg_gen_goto_tb. The test in tcg_gen_exit_tb is redundant with the assert for

Re: [PATCH for-6.2 21/34] target/arm: Implement MVE VABAV

2021-07-17 Thread Richard Henderson
On 7/17/21 3:13 PM, Peter Maydell wrote: On Sat, 17 Jul 2021 at 21:50, Richard Henderson wrote: On 7/13/21 6:37 AM, Peter Maydell wrote: +#define DO_VABAV(OP, ESIZE, TYPE) \ +uint32_t HELPER(glue(mve_, OP))(CPUARMState *env, void *vn, \ +

Re: [PATCH for-6.2 21/34] target/arm: Implement MVE VABAV

2021-07-17 Thread Peter Maydell
On Sat, 17 Jul 2021 at 21:50, Richard Henderson wrote: > > On 7/13/21 6:37 AM, Peter Maydell wrote: > > +#define DO_VABAV(OP, ESIZE, TYPE) \ > > +uint32_t HELPER(glue(mve_, OP))(CPUARMState *env, void *vn, \ > > +void *vm,

Re: [PATCH for-6.2 21/34] target/arm: Implement MVE VABAV

2021-07-17 Thread Richard Henderson
On 7/13/21 6:37 AM, Peter Maydell wrote: +#define DO_VABAV(OP, ESIZE, TYPE) \ +uint32_t HELPER(glue(mve_, OP))(CPUARMState *env, void *vn, \ +void *vm, uint32_t ra) \ +{

Re: [PATCH for-6.2 20/34] target/arm: Implement MVE integer min/max across vector

2021-07-17 Thread Richard Henderson
On 7/13/21 6:37 AM, Peter Maydell wrote: +/* Max and min of absolute values */ +static int64_t do_maxa(int64_t n, int64_t m) +{ +if (n < 0) { +n = -n; +} +if (m < 0) { +m = -m; +} +return MAX(n, m); +} This doesn't look quite right. The n operand is

Re: [PATCH for-6.2 17/34] target/arm: Implement MVE VMLAS

2021-07-17 Thread Richard Henderson
On 7/17/21 3:06 AM, Peter Maydell wrote: On Fri, 16 Jul 2021 at 23:12, Richard Henderson wrote: On 7/13/21 6:37 AM, Peter Maydell wrote: Implement the MVE VMLAS insn, which multiplies a vector by a vector and adds a scalar. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8

Re: [PATCH v3 0/4] virtio: Add vhost-user based RNG

2021-07-17 Thread Michael S. Tsirkin
On Fri, Jul 09, 2021 at 06:59:25PM -0600, Mathieu Poirier wrote: > This sets adds a vhost-user based random number generator (RNG), > similar to what has been done for i2c and virtiofsd, with the > implementation following the patterns already set forth in those. > > Applies cleanly to

Re: R: [PULL 0/3] ppc-for-6.1 queue 20210713

2021-07-17 Thread BALATON Zoltan
On Sat, 17 Jul 2021, luigi burdo wrote: Hi i small report im try to build last relesase on a PowerMac G5 quad on debian sid PPC64 but ld exit with an error: Looks like it's gcc that crashes not ld. If you're sure it's not a hardware problem this may be a gcc bug. Sometimes big compile jobs

Re: [PATCH v2 05/10] accel/tcg: Handle -singlestep in curr_cflags

2021-07-17 Thread Peter Maydell
On Sat, 17 Jul 2021 at 19:43, Richard Henderson wrote: > > On 7/17/21 10:42 AM, Alex Bennée wrote: > > Hmm we are testing a magic global here and looking at > > cpu->singlestep_enabled lower down. We have a transient singlestep which > > is turned on an off via cpu->singlestep_enabled and a

Re: [PATCH v2 04/10] accel/tcg: Drop CF_NO_GOTO_PTR from -d nochain

2021-07-17 Thread Alex Bennée
Richard Henderson writes: > On 7/17/21 10:39 AM, Alex Bennée wrote: >> Richard Henderson writes: >> >>> The purpose of suppressing goto_ptr from -d nochain had been >>> to return to the main loop so that -d cpu would be recognized. >> Hmm is it though? I've always treated it as ensuring we

Re: [PATCH v2 08/10] accel/tcg: Adjust interface of TranslatorOps.breakpoint_check

2021-07-17 Thread Richard Henderson
On 7/17/21 10:52 AM, Peter Maydell wrote: On Mon, 12 Jul 2021 at 16:48, Richard Henderson wrote: We don't need the whole CPUBreakpoint structure in the check, only the flags. Return the instruction length to consolidate the adjustment of db->pc_next. Signed-off-by: Richard Henderson

[PATCH v3 09/10] trace: Fold mem-internal.h into mem.h

2021-07-17 Thread Richard Henderson
Since the last thing that mem.h does is include mem-internal.h, the symbols are not actually private. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- trace/mem-internal.h | 50 trace/mem.h | 50

[PATCH v3 05/10] accel/tcg: Standardize atomic helpers on softmmu api

2021-07-17 Thread Richard Henderson
Reduce the amount of code duplication by always passing the TCGMemOpIdx argument to helper_atomic_*. This is not currently used for user-only, but it's easy to ignore. Signed-off-by: Richard Henderson --- accel/tcg/tcg-runtime.h | 46 --- accel/tcg/cputlb.c

[PATCH v3 10/10] accel/tcg: Push trace info building into atomic_common.c.inc

2021-07-17 Thread Richard Henderson
Use trace_mem_get_info instead of trace_mem_build_info, using the TCGMemOpIdx that we already have. Do this in the atomic_trace_*_pre function as common subroutines. Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 48 +--

[PATCH v3 04/10] tcg: Rename helper_atomic_*_mmu and provide for user-only

2021-07-17 Thread Richard Henderson
Always provide the atomic interface using TCGMemOpIdx oi and uintptr_t retaddr. Rename from helper_* to cpu_* so as to (mostly) match the exec/cpu_ldst.h functions, and to emphasize that they are not callable from TCG directly. Signed-off-by: Richard Henderson --- include/tcg/tcg.h

[PATCH v3 07/10] accel/tcg: Remove ATOMIC_MMU_DECLS

2021-07-17 Thread Richard Henderson
All definitions are now empty. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 12 accel/tcg/cputlb.c | 1 - accel/tcg/user-exec.c | 1 - 3 files changed, 14 deletions(-) diff --git

[PATCH v3 08/10] accel/tcg: Expand ATOMIC_MMU_LOOKUP_*

2021-07-17 Thread Richard Henderson
Unify the parameters of atomic_mmu_lookup between cputlb.c and user-exec.c. Call the function directly, and remove the macros. Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 41 + accel/tcg/cputlb.c | 7 +--

[PATCH v3 03/10] qemu/atomic: Add aligned_{int64,uint64}_t types

2021-07-17 Thread Richard Henderson
Use it to avoid some clang-12 -Watomic-alignment errors, forcing some structures to be aligned and as a pointer when we have ensured that the address is aligned. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 4 ++--

[PATCH v3 02/10] qemu/atomic: Remove pre-C11 atomic fallbacks

2021-07-17 Thread Richard Henderson
We now require c11, so the fallbacks are now dead code Signed-off-by: Richard Henderson --- configure | 7 -- include/qemu/atomic.h | 204 +++--- 2 files changed, 10 insertions(+), 201 deletions(-) diff --git a/configure b/configure index

[PATCH v3 06/10] accel/tcg: Fold EXTRA_ARGS into atomic_template.h

2021-07-17 Thread Richard Henderson
All instances of EXTRA_ARGS are now identical. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 36 accel/tcg/cputlb.c | 1 - accel/tcg/user-exec.c | 1 - 3 files changed, 20

[PATCH v3 01/10] qemu/atomic: Use macros for CONFIG_ATOMIC64

2021-07-17 Thread Richard Henderson
Clang warnings about questionable atomic usage get localized to the inline function in atomic.h. By using a macro, we get the full traceback to the original use that caused the warning. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/qemu/atomic.h | 25

[PATCH v3 00/10] Atomic cleanup + clang-12 build fix

2021-07-17 Thread Richard Henderson
This is intended to fix building with clang-12 on i386. In the process, I found bugs wrt handling of guest memory in target/ with respect to atomics, fixed by unifying the api between softmmu and user-only and removing some ifdefs under target/. Unification of the api allowed some further

Re: [PATCH v2 10/10] accel/tcg: Encode breakpoint info into tb->cflags

2021-07-17 Thread Richard Henderson
On 7/17/21 10:58 AM, Peter Maydell wrote: +static uint32_t cflags_for_breakpoints(CPUState *cpu, target_ulong pc, + uint32_t cflags) +{ +uint32_t bflags = 0; + +if (unlikely(cpu->singlestep_enabled)) { +bflags = CF_BP_SSTEP; +} else {

Re: [PATCH v2 06/10] accel/tcg: Use CF_NO_GOTO_{TB, PTR} in cpu_exec_step_atomic

2021-07-17 Thread Richard Henderson
On 7/17/21 10:43 AM, Peter Maydell wrote: On Mon, 12 Jul 2021 at 16:46, Richard Henderson wrote: Request that the one TB returns immediately, so that we release the exclusive lock as soon as possible. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 11 --- 1 file

Re: [PATCH v2 05/10] accel/tcg: Handle -singlestep in curr_cflags

2021-07-17 Thread Richard Henderson
On 7/17/21 10:42 AM, Alex Bennée wrote: Richard Henderson writes: Exchange the test in translator_use_goto_tb for CF_NO_GOTO_TB, and the test in tb_gen_code for setting CF_COUNT_MASK to 1. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 8 +++-

Re: [PATCH v2 04/10] accel/tcg: Drop CF_NO_GOTO_PTR from -d nochain

2021-07-17 Thread Richard Henderson
On 7/17/21 10:39 AM, Alex Bennée wrote: Richard Henderson writes: The purpose of suppressing goto_ptr from -d nochain had been to return to the main loop so that -d cpu would be recognized. Hmm is it though? I've always treated it as ensuring we always come out into the main loop (which is

Re: [PATCH v2 01/10] accel/tcg: Reduce CF_COUNT_MASK to match TCG_MAX_INSNS

2021-07-17 Thread Richard Henderson
On 7/17/21 10:30 AM, Peter Maydell wrote: On Mon, 12 Jul 2021 at 16:42, Richard Henderson wrote: The space reserved for CF_COUNT_MASK was overly large. Reduce to free up cflags bits and eliminate an extra test. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 4 +++-

R: [PULL 0/3] ppc-for-6.1 queue 20210713

2021-07-17 Thread luigi burdo
Hi i small report im try to build last relesase on a PowerMac G5 quad on debian sid PPC64 but ld exit with an error: gigi@debian:~/src/tags/ppc-for-6.1-20210713/build$ ninja [3864/9215] Compiling C object libqemu-mipsel-softmmu.fa.p/target_mips_tcg_msa_helper.c.o FAILED:

Re: [PATCH v2 10/10] accel/tcg: Encode breakpoint info into tb->cflags

2021-07-17 Thread Peter Maydell
On Mon, 12 Jul 2021 at 16:49, Richard Henderson wrote: > > Having this data in cflags means that hashing takes care > of selecting a TB with or without exceptions built in. > Which means that we no longer need to flush all TBs. > > This does require that we single-step while we're within a page >

Re: [PATCH v2 08/10] accel/tcg: Adjust interface of TranslatorOps.breakpoint_check

2021-07-17 Thread Peter Maydell
On Mon, 12 Jul 2021 at 16:48, Richard Henderson wrote: > > We don't need the whole CPUBreakpoint structure in the check, > only the flags. Return the instruction length to consolidate > the adjustment of db->pc_next. > > Signed-off-by: Richard Henderson > diff --git a/target/avr/translate.c

Re: [PATCH v2 09/10] accel/tcg: Hoist tb_cflags to a local in translator_loop

2021-07-17 Thread Alex Bennée
Richard Henderson writes: > The access internal to tb_cflags() is atomic. > Avoid re-reading it as such for the multiple uses. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 06/10] accel/tcg: Use CF_NO_GOTO_{TB,PTR} in cpu_exec_step_atomic

2021-07-17 Thread Alex Bennée
Richard Henderson writes: > Request that the one TB returns immediately, so that > we release the exclusive lock as soon as possible. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 05/10] accel/tcg: Handle -singlestep in curr_cflags

2021-07-17 Thread Alex Bennée
Richard Henderson writes: > Exchange the test in translator_use_goto_tb for CF_NO_GOTO_TB, > and the test in tb_gen_code for setting CF_COUNT_MASK to 1. > > Signed-off-by: Richard Henderson > --- > accel/tcg/cpu-exec.c | 8 +++- > accel/tcg/translate-all.c | 2 +- >

Re: [PATCH v2 07/10] accel/tcg: Move cflags lookup into tb_find

2021-07-17 Thread Peter Maydell
On Mon, 12 Jul 2021 at 16:42, Richard Henderson wrote: > > We will shortly require the guest pc for computing cflags, > so move the choice just after cpu_get_tb_cpu_state. > > Signed-off-by: Richard Henderson > --- > accel/tcg/cpu-exec.c | 34 +- > 1 file

Re: [PATCH v2 06/10] accel/tcg: Use CF_NO_GOTO_{TB, PTR} in cpu_exec_step_atomic

2021-07-17 Thread Peter Maydell
On Mon, 12 Jul 2021 at 16:46, Richard Henderson wrote: > > Request that the one TB returns immediately, so that > we release the exclusive lock as soon as possible. > > Signed-off-by: Richard Henderson > --- > accel/tcg/cpu-exec.c | 11 --- > 1 file changed, 8 insertions(+), 3

Re: [PATCH v2 05/10] accel/tcg: Handle -singlestep in curr_cflags

2021-07-17 Thread Peter Maydell
On Mon, 12 Jul 2021 at 16:42, Richard Henderson wrote: > > Exchange the test in translator_use_goto_tb for CF_NO_GOTO_TB, > and the test in tb_gen_code for setting CF_COUNT_MASK to 1. > > Signed-off-by: Richard Henderson > --- > accel/tcg/cpu-exec.c | 8 +++- >

Re: [PATCH v2 04/10] accel/tcg: Drop CF_NO_GOTO_PTR from -d nochain

2021-07-17 Thread Alex Bennée
Richard Henderson writes: > The purpose of suppressing goto_ptr from -d nochain had been > to return to the main loop so that -d cpu would be recognized. Hmm is it though? I've always treated it as ensuring we always come out into the main loop (which is helpful for debugging). > But we now

Re: [PATCH v2 04/10] accel/tcg: Drop CF_NO_GOTO_PTR from -d nochain

2021-07-17 Thread Peter Maydell
On Mon, 12 Jul 2021 at 16:44, Richard Henderson wrote: > > The purpose of suppressing goto_ptr from -d nochain had been > to return to the main loop so that -d cpu would be recognized. > But we now include -d cpu logging in helper_lookup_tb_ptr so > there is no need to exclude goto_ptr. > >

Re: [PATCH v2 03/10] accel/tcg: Add CF_NO_GOTO_TB and CF_NO_GOTO_PTR

2021-07-17 Thread Peter Maydell
On Mon, 12 Jul 2021 at 16:44, Richard Henderson wrote: > > Move the -d nochain check to bits on tb->cflags. > These will be used for more than -d nochain shortly. > > Set bits during curr_cflags, test them in translator_use_goto_tb, > assert we're not doing anything odd in tcg_gen_goto_tb. The

Re: [PATCH v2 03/10] accel/tcg: Add CF_NO_GOTO_TB and CF_NO_GOTO_PTR

2021-07-17 Thread Alex Bennée
Richard Henderson writes: > Move the -d nochain check to bits on tb->cflags. > These will be used for more than -d nochain shortly. > > Set bits during curr_cflags, test them in translator_use_goto_tb, > assert we're not doing anything odd in tcg_gen_goto_tb. The test > in tcg_gen_exit_tb is

Re: [PATCH v2 02/10] accel/tcg: Move curr_cflags into cpu-exec.c

2021-07-17 Thread Alex Bennée
Richard Henderson writes: > We will shortly have more than a simple member read here, > with stuff not necessarily exposed to exec/exec-all.h. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 01/10] accel/tcg: Reduce CF_COUNT_MASK to match TCG_MAX_INSNS

2021-07-17 Thread Alex Bennée
Richard Henderson writes: > The space reserved for CF_COUNT_MASK was overly large. > Reduce to free up cflags bits and eliminate an extra test. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 02/10] accel/tcg: Move curr_cflags into cpu-exec.c

2021-07-17 Thread Peter Maydell
On Mon, 12 Jul 2021 at 16:44, Richard Henderson wrote: > > We will shortly have more than a simple member read here, > with stuff not necessarily exposed to exec/exec-all.h. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell (apologies if you saw a no-content email: gmail

Re: [PATCH v2 01/10] accel/tcg: Reduce CF_COUNT_MASK to match TCG_MAX_INSNS

2021-07-17 Thread Peter Maydell
On Mon, 12 Jul 2021 at 16:42, Richard Henderson wrote: > > The space reserved for CF_COUNT_MASK was overly large. > Reduce to free up cflags bits and eliminate an extra test. > > Signed-off-by: Richard Henderson > --- > include/exec/exec-all.h | 4 +++- > accel/tcg/translate-all.c | 5 ++--- >

Re: [PATCH v2 00/10] tcg: breakpoint reorg

2021-07-17 Thread Richard Henderson
Ping. A Tested-by is nice, but Reviewed-by is better, and time is running out, even for bug fixes. r~ On 7/12/21 8:39 AM, Richard Henderson wrote: This is fixing #404 ("windows xp boot takes much longer...") and several other similar reports. For v2, all prerequisites and 7 of the patches

Re: [PATCH] target/hexagon: Drop include of qemu.h

2021-07-17 Thread Richard Henderson
On 7/17/21 3:30 AM, Peter Maydell wrote: The qemu.h file is a CONFIG_USER_ONLY header; it doesn't appear on the include path for softmmu builds. Currently we include it unconditionally in target/hexagon/op_helper.c. We used to need it for the put_user_*() and get_user_*() functions, but now

Re: [PATCH 00/17] target/riscv: Use tcg_constant_*

2021-07-17 Thread Richard Henderson
On 7/16/21 8:59 PM, LIU Zhiwei wrote: If we want to strictly obey the spec, we should 1) Ignore MSB 32bits for source register, and sign-extend the destination register. 2) Always use 32bit operation(TCG 32bit OP). I want to still use TCG 64bit OP and just extend the source to 64bit by ext32s

[Bug 1924738] Re: Failed to restore domain - error load load virtio-balloon:virtio

2021-07-17 Thread Thomas Huth
Ticket has been re-opened here : https://gitlab.com/qemu-project/qemu/-/issues/485 ** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #485 https://gitlab.com/qemu-project/qemu/-/issues/485 -- You received this bug notification because you are a member of qemu- devel-ml, which is

Re: [PATCH 00/13] new plugin argument passing scheme

2021-07-17 Thread Mahmoud Mandour
On Sat, Jul 17, 2021, 15:31 Alex Bennée wrote: > > Mahmoud Mandour writes: > > > Hello, > > > > This series removes passing arguments to plugins through "arg=" since > > it's redundant and reduces readability especially when the argument > > itself is composed of a name and a value. > > When

Re: [PATCH 00/13] new plugin argument passing scheme

2021-07-17 Thread Alex Bennée
Mahmoud Mandour writes: > Hello, > > This series removes passing arguments to plugins through "arg=" since > it's redundant and reduces readability especially when the argument > itself is composed of a name and a value. When you re-roll a series it's useful to add a version tag. You can use

Re: [PATCH] target/hexagon: Drop include of qemu.h

2021-07-17 Thread Alex Bennée
Peter Maydell writes: > The qemu.h file is a CONFIG_USER_ONLY header; it doesn't appear on > the include path for softmmu builds. Currently we include it > unconditionally in target/hexagon/op_helper.c. We used to need it > for the put_user_*() and get_user_*() functions, but now that we

[PATCH] target/hexagon: Drop include of qemu.h

2021-07-17 Thread Peter Maydell
The qemu.h file is a CONFIG_USER_ONLY header; it doesn't appear on the include path for softmmu builds. Currently we include it unconditionally in target/hexagon/op_helper.c. We used to need it for the put_user_*() and get_user_*() functions, but now that we have removed the uses of those from

[PATCH 05/13] plugins/lockstep: make socket path not positional & parse bool arg

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/lockstep.c | 31 ++- docs/devel/tcg-plugins.rst | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 7fd35eb669..a41ffe83fa 100644 ---

Re: [PATCH v2 10/11] trace: Fold mem-internal.h into mem.h

2021-07-17 Thread Philippe Mathieu-Daudé
On 7/17/21 3:41 AM, Richard Henderson wrote: > Since the last thing that mem.h does is include mem-internal.h, > the symbols are not actually private. > > Signed-off-by: Richard Henderson > --- > trace/mem-internal.h | 50 > trace/mem.h | 50

[PATCH 13/13] docs/deprecated: deprecate passing plugin args through `arg=`

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/system/deprecated.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index e2e0090878..aaf0ee5777 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -126,6 +126,12

[PATCH 04/13] plugins/hotblocks: Added correct boolean argument parsing

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- contrib/plugins/hotblocks.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 4b08340143..062200a7a4 100644 --- a/contrib/plugins/hotblocks.c +++

[PATCH 09/13] tests/plugins/bb: adapt to the new arg passing scheme

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- tests/plugin/bb.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/plugin/bb.c b/tests/plugin/bb.c index de09bdde4e..7d470a1011 100644 --- a/tests/plugin/bb.c +++ b/tests/plugin/bb.c @@ -104,10 +104,17 @@

Re: [PATCH v2 08/11] accel/tcg: Remove ATOMIC_MMU_DECLS

2021-07-17 Thread Philippe Mathieu-Daudé
On 7/17/21 3:41 AM, Richard Henderson wrote: > All definitions are now empty. > > Signed-off-by: Richard Henderson > --- > accel/tcg/atomic_template.h | 12 > accel/tcg/cputlb.c | 1 - > accel/tcg/user-exec.c | 1 - > 3 files changed, 14 deletions(-) Reviewed-by:

[PATCH 08/13] docs/tcg-plugins: new passing parameters scheme for cache docs

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- docs/devel/tcg-plugins.rst | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 4ab9dc4bb1..be1256d50c 100644 --- a/docs/devel/tcg-plugins.rst +++

[PATCH 07/13] plugins/howvec: Adapting to the new argument passing scheme.

2021-07-17 Thread Mahmoud Mandour
Correctly parsing plugin argument since they now must be provided as full-form boolean parameters, e.g.: -plugin ./contrib/plugins/libhowvec.so,verbose=on,inline=on Also, introduced the argument "count" that accepts one opt to count individually at a time. Signed-off-by: Mahmoud Mandour ---

[PATCH 11/13] tests/plugins/mem: introduce "track" arg and make args not positional

2021-07-17 Thread Mahmoud Mandour
This commit makes the plugin adhere to the new plugins arg-passing scheme by expecting full-form boolean args instead of short-form booleans. This necessitates that we introduce a new argument, here "track", to accept "r", "w", or "rw". Also, it makes arguments not positional and we only care

[PATCH 10/13] tests/plugins/insn: made arg inline not positional and parse it as bool

2021-07-17 Thread Mahmoud Mandour
Made argument "inline" not positional, this has two benefits. First is that we adhere to how QEMU passes args generally, by taking the last value of an argument and drop the others. And the second is that this sets up a framework for potentially adding new args easily. Signed-off-by: Mahmoud

[PATCH 03/13] plugins/hotpages: introduce sortby arg and parsed bool args correctly

2021-07-17 Thread Mahmoud Mandour
Since plugin arguments now expect boolean arguments, a plugin argument name "sortby" now expects a value of "read", "write", or "address". "io" arg is now expected to be passed as a full-form boolean parameter, i.e. "io=on|true|yes|off|false|no" Signed-off-by: Mahmoud Mandour ---

[PATCH 02/13] plugins/api: added a boolean parsing plugin api

2021-07-17 Thread Mahmoud Mandour
This call will help boolean argument parsing since arguments are now passed to plugins as a name and value. Signed-off-by: Mahmoud Mandour --- include/qemu/qemu-plugin.h | 13 + plugins/api.c | 5 + 2 files changed, 18 insertions(+) diff --git

[PATCH 12/13] tests/plugins/syscalls: adhere to new arg-passing scheme

2021-07-17 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- tests/plugin/syscall.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tests/plugin/syscall.c b/tests/plugin/syscall.c index 6dd71092e1..484b48de49 100644 --- a/tests/plugin/syscall.c +++ b/tests/plugin/syscall.c @@

[PATCH 00/13] new plugin argument passing scheme

2021-07-17 Thread Mahmoud Mandour
Hello, This series removes passing arguments to plugins through "arg=" since it's redundant and reduces readability especially when the argument itself is composed of a name and a value. Also, passing arguments through "arg=" still works but is marked as deprecated and will produce a deprecation

  1   2   >