[PATCH v2 27/30] linux-user/s390x: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/s390x/cpu_loop.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/linux-user/s390x/cpu_loop.c

[PATCH v2 21/30] linux-user/microblaze: Fix SIGFPE si_codes

2021-08-21 Thread Richard Henderson
Fix a typo for ESR_EC_DIVZERO, which is integral not floating-point. Fix the if ladder for decoding floating-point exceptions. Signed-off-by: Richard Henderson --- linux-user/microblaze/cpu_loop.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git

Re: [PATCH 2/5] qemu/qarray.h: weak scalar type check in QARRAY_CREATE()

2021-08-21 Thread Richard Henderson
On 8/21/21 1:30 PM, Christian Schoenebeck wrote: Unfortunately something like _Static_assert(typeof(a) == typeof(b), "type mismatch"); is currently not suported by C. So for the time being at least check that the size of the scalar types match at compile time. Did you try

[PATCH v2 20/30] linux-user/microblaze: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/microblaze/cpu_loop.c | 73 +--- 1 file changed, 29 insertions(+), 44 deletions(-) diff --git a/linux-user/microblaze/cpu_loop.c

[PATCH v2 30/30] linux-user/xtensa: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/xtensa/cpu_loop.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/linux-user/xtensa/cpu_loop.c

[PATCH v2 16/30] linux-user/hppa: Set FPE_CONDTRAP for COND

2021-08-21 Thread Richard Henderson
This si_code was changed in 75abf64287cab, for linux 4.17. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 1 + linux-user/hppa/cpu_loop.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 55ccc6ae03..f9efbffe0c

[PATCH v2 23/30] linux-user/mips: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/mips/cpu_loop.c | 45 -- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/linux-user/mips/cpu_loop.c

[PATCH v2 26/30] linux-user/riscv: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/riscv/cpu_loop.c | 36 +++- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/linux-user/riscv/cpu_loop.c

[PATCH v2 29/30] linux-user/sparc: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 38 +++-- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/linux-user/sparc/cpu_loop.c

[PATCH v2 18/30] linux-user/i386: Use force_sig, force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Replace the local gen_signal with the generic functions that match how the kernel raises signals. Signed-off-by: Richard Henderson --- linux-user/i386/cpu_loop.c | 46 +- 1 file changed, 16 insertions(+), 30 deletions(-) diff --git

[PATCH v2 17/30] linux-user/i386: Split out maybe_handle_vm86_trap

2021-08-21 Thread Richard Henderson
Reduce the number of ifdefs within cpu_loop(). Signed-off-by: Richard Henderson --- linux-user/i386/cpu_loop.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/linux-user/i386/cpu_loop.c b/linux-user/i386/cpu_loop.c index

[PATCH v2 22/30] linux-user/mips: Improve do_break

2021-08-21 Thread Richard Henderson
Rename to do_tr_or_bp, as per the kernel function. Add a 'trap' argument, akin to the kernel's si_code, but clearer. The return value is always 0, so change the return value to void. Use force_sig and force_sig_fault. Signed-off-by: Richard Henderson --- linux-user/mips/cpu_loop.c | 47

[PATCH v2 28/30] linux-user/sh4: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/sh4/cpu_loop.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/linux-user/sh4/cpu_loop.c b/linux-user/sh4/cpu_loop.c index

[PATCH v2 14/30] linux-user/hppa: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/hppa/cpu_loop.c | 32 +++- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/linux-user/hppa/cpu_loop.c

[PATCH v2 15/30] linux-user/hppa: Use the proper si_code for PRIV_OPR, PRIV_REG, OVERFLOW

2021-08-21 Thread Richard Henderson
These si_codes have been properly set by the kernel since the beginning. Signed-off-by: Richard Henderson --- linux-user/hppa/cpu_loop.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c index

[PATCH v2 12/30] linux-user/cris: Use force_sig_fault, force_sigsegv_code

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/cris/cpu_loop.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/linux-user/cris/cpu_loop.c

[PATCH v2 25/30] linux-user/ppc: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. The user-only version of ppc_cpu_tlb_fill does not distinguish between the various hw codes. Drop all of that and just use the new force_sigsegv_for_addr function. The fault address for POWERPC_EXCP_ISI is

[PATCH v2 13/30] linux-user/hexagon: Use force_sigsegv_code

2021-08-21 Thread Richard Henderson
Use the new function instead of setting up a target_siginfo_t and calling queue_signal. Note that we were incorrectly using QEMU_SI_KILL instead of QEMU_SI_FAULT for raising SIGSEGV. Signed-off-by: Richard Henderson --- linux-user/hexagon/cpu_loop.c | 22 -- 1 file changed,

[PATCH v2 09/30] linux-user/alpha: Set TRAP_UNK for bugchk and unknown gentrap

2021-08-21 Thread Richard Henderson
These si_codes were changed in 535906c684fca, for linux 4.17. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 1 + linux-user/alpha/cpu_loop.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index

[PATCH v2 11/30] linux-user/alpha: Use force_sig_fault, force_sigsegv_code

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/alpha/cpu_loop.c | 76 +++-- 1 file changed, 23 insertions(+), 53 deletions(-) diff --git a/linux-user/alpha/cpu_loop.c

[PATCH v2 08/30] linux-user/aarch64: Use force_sig_fault()

2021-08-21 Thread Richard Henderson
From: Peter Maydell Use the new force_sig_fault() function instead of setting up a target_siginfo_t and calling queue_signal(). Signed-off-by: Peter Maydell Message-Id: <20210813131809.28655-8-peter.mayd...@linaro.org> Signed-off-by: Richard Henderson --- linux-user/aarch64/cpu_loop.c | 34

[PATCH v2 10/30] linux-user/alpha: Set FPE_FLTUNK for gentrap ROPRAND

2021-08-21 Thread Richard Henderson
This si_code was changed in 4cc13e4f6d441, for linux 4.17. Signed-off-by: Richard Henderson --- linux-user/alpha/cpu_loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/alpha/cpu_loop.c b/linux-user/alpha/cpu_loop.c index b2e9503c50..e5f78a439a 100644 ---

[PATCH v2 24/30] linux-user/openrisc: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/openrisc/cpu_loop.c | 37 +- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/linux-user/openrisc/cpu_loop.c

[PATCH v2 07/30] linux-user/arm: Use force_sig_fault()

2021-08-21 Thread Richard Henderson
From: Peter Maydell Use the new force_sig_fault() function instead of setting up a target_siginfo_t and calling queue_signal(). Signed-off-by: Peter Maydell Message-Id: <20210813131809.28655-7-peter.mayd...@linaro.org> Signed-off-by: Richard Henderson --- linux-user/arm/cpu_loop.c | 53

[PATCH v2 03/30] linux-user/arm: Use force_sig() to deliver fpa11 emulation SIGFPE

2021-08-21 Thread Richard Henderson
From: Peter Maydell In the Arm target code, when the fpa11 emulation code tells us we need to send the guest a SIGFPE, we do this with queue_signal(), but we are using the wrong si_type, and we aren't setting the _sifields union members corresponding to either the si_type we are using or the

[PATCH v2 06/30] linux-user: Provide new force_sigsegv_for_addr() function

2021-08-21 Thread Richard Henderson
Most linux-user targets so far do not distinguish between SEGV_MAPERR and SEGV_ACCERR. This function will be used to fix that. Signed-off-by: Richard Henderson --- linux-user/signal-common.h | 1 + linux-user/signal.c| 18 ++ 2 files changed, 19 insertions(+) diff

[PATCH v2 19/30] linux-user/m68k: Use force_sig_fault, force_sigsegv_for_addr

2021-08-21 Thread Richard Henderson
Use the new functions instead of setting up a target_siginfo_t and calling queue_signal. Signed-off-by: Richard Henderson --- linux-user/m68k/cpu_loop.c | 35 +++ 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/linux-user/m68k/cpu_loop.c

[PATCH v2 02/30] linux-user/arm: Set siginfo_t addr field for SIGTRAP signals

2021-08-21 Thread Richard Henderson
From: Peter Maydell When generating a TRAP_BRKPT SIGTRAP, set the siginfo_t addr field to the PC where the breakpoint/singlestep trap occurred; this is what the kernel does for this signal for this architecture. Signed-off-by: Peter Maydell Message-Id:

[PATCH v2 04/30] linux-user: Zero out target_siginfo_t in force_sig()

2021-08-21 Thread Richard Henderson
From: Peter Maydell The target_siginfo_t we populate in force_sig() will eventually get copied onto the target's stack. Zero it out so that any extra padding in the sifields union is consistently zero when the guest sees it. Signed-off-by: Peter Maydell Message-Id:

[PATCH v2 01/30] linux-user/aarch64: Set siginfo_t addr field for SIGTRAP signals

2021-08-21 Thread Richard Henderson
From: Peter Maydell When generating a TRAP_BRKPT SIGTRAP, set the siginfo_t addr field to the PC where the breakpoint/singlestep trap occurred; this is what the kernel does for this signal for this architecture. Fixes: Coverity 1459154 Signed-off-by: Peter Maydell Message-Id:

[PATCH v2 00/30] linux-user: Clean up siginfo_t handling

2021-08-21 Thread Richard Henderson
Supercedes: 20210813131809.28655-1-peter.mayd...@linaro.org ("linux-user: Clean up siginfo_t handling for arm, aarch64") Changes from Peter's v1: * Introduce force_sigsegv_for_addr(). * Convert the rest of the targets, except nios2 (nios2 looks very wrong, and I can't test it). * Other

[PATCH v2 05/30] linux-user: Provide new force_sig_fault() function

2021-08-21 Thread Richard Henderson
From: Peter Maydell In many places in the linux-user code we need to queue a signal for the guest using the QEMU_SI_FAULT si_type. This requires that the caller sets up and passes us a target_siginfo, including setting the appropriate part of the _sifields union for the si_type. In a number of

Re: [PATCH v4 3/7] python/aqmp-tui: Add AQMP TUI draft

2021-08-21 Thread Niteesh G. S.
On Sun, Aug 22, 2021 at 1:36 AM John Snow wrote: > On Thu, Aug 19, 2021 at 1:39 PM G S Niteesh Babu > wrote: > >> Added a draft of AQMP TUI. >> >> Implements the follwing basic features: >> 1) Command transmission/reception. >> 2) Shows events asynchronously. >> 3) Shows server status in the

Re: [PATCH v4 0/7] AQMP TUI Draft

2021-08-21 Thread Niteesh G. S.
On Sat, Aug 21, 2021 at 9:39 AM John Snow wrote: > > > On Thu, Aug 19, 2021 at 1:39 PM G S Niteesh Babu > wrote: > >> Hello all, >> >> Gitlab: >> https://gitlab.com/niteesh.gs/qemu/-/commits/aqmp-tui-prototype-v4 >> CI: https://gitlab.com/niteesh.gs/qemu/-/pipelines/356024270 >> >> Revision

[PATCH 5/5] 9pfs: use QArray in v9fs_walk()

2021-08-21 Thread Christian Schoenebeck
Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index b59572fa79..91062ee4d6 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1707,13 +1707,14 @@ static void coroutine_fn

[PATCH 4/5] 9pfs: make V9fsPath usable via QArray API

2021-08-21 Thread Christian Schoenebeck
Signed-off-by: Christian Schoenebeck --- fsdev/file-op-9p.h | 2 ++ hw/9pfs/9p.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h index 42f677cf38..7630f0e538 100644 --- a/fsdev/file-op-9p.h +++ b/fsdev/file-op-9p.h @@ -18,6 +18,7 @@ #include

[PATCH 3/5] 9pfs: make V9fsString usable via QArray API

2021-08-21 Thread Christian Schoenebeck
Signed-off-by: Christian Schoenebeck --- fsdev/9p-marshal.c | 2 ++ fsdev/9p-marshal.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/fsdev/9p-marshal.c b/fsdev/9p-marshal.c index a01bba6908..fbfc2a62cd 100644 --- a/fsdev/9p-marshal.c +++ b/fsdev/9p-marshal.c @@ -18,6 +18,8 @@

[PATCH 2/5] qemu/qarray.h: weak scalar type check in QARRAY_CREATE()

2021-08-21 Thread Christian Schoenebeck
Unfortunately something like _Static_assert(typeof(a) == typeof(b), "type mismatch"); is currently not suported by C. So for the time being at least check that the size of the scalar types match at compile time. Signed-off-by: Christian Schoenebeck --- include/qemu/qarray.h | 6 ++ 1

[PATCH 0/5] introduce QArray

2021-08-21 Thread Christian Schoenebeck
Patches 1 and 2 introduce include/qemu/qarray.h which implements a deep auto free mechanism for arrays. Unlike GArray it does not require special macros, function calls or member dereferencing to access the individual array elements. So existing C-style array code can be retained with only very

[PATCH 1/5] qemu/qarray.h: introduce QArray

2021-08-21 Thread Christian Schoenebeck
Implements deep auto free of arrays while retaining common C-style squared bracket access. Signed-off-by: Christian Schoenebeck --- include/qemu/qarray.h | 148 ++ 1 file changed, 148 insertions(+) create mode 100644 include/qemu/qarray.h diff --git

Re: [PATCH v2 6/8] target/arm: Assert thumb pc is aligned

2021-08-21 Thread Philippe Mathieu-Daudé
On 8/21/21 9:59 PM, Richard Henderson wrote: > Misaligned thumb PC is architecturally impossible. > Assert is better than proceeding, in case we've missed > something somewhere. > > Expand a comment about aligning the pc in gdbstub. > Fail an incoming migrate if a thumb pc is misaligned. > >

[PATCH v2 8/8] tests/tcg: Add arm and aarch64 pc alignment tests

2021-08-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tests/tcg/aarch64/pcalign-a64.c | 37 + tests/tcg/arm/pcalign-a32.c | 46 +++ tests/tcg/aarch64/Makefile.target | 4 +-- tests/tcg/arm/Makefile.target | 4 +++ 4 files changed, 89

Re: [PATCH v4 3/7] python/aqmp-tui: Add AQMP TUI draft

2021-08-21 Thread John Snow
On Thu, Aug 19, 2021 at 1:39 PM G S Niteesh Babu wrote: > Added a draft of AQMP TUI. > > Implements the follwing basic features: > 1) Command transmission/reception. > 2) Shows events asynchronously. > 3) Shows server status in the bottom status bar. > > Also added type annotations and necessary

[PATCH v2 6/8] target/arm: Assert thumb pc is aligned

2021-08-21 Thread Richard Henderson
Misaligned thumb PC is architecturally impossible. Assert is better than proceeding, in case we've missed something somewhere. Expand a comment about aligning the pc in gdbstub. Fail an incoming migrate if a thumb pc is misaligned. Signed-off-by: Richard Henderson --- target/arm/gdbstub.c |

[PATCH v2 7/8] target/arm: Suppress bp for exceptions with more priority

2021-08-21 Thread Richard Henderson
Both single-step and pc alignment faults have priority over breakpoint exceptions. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/debug_helper.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/target/arm/debug_helper.c

[PATCH v2 5/8] target/arm: Take an exception if PC is misaligned

2021-08-21 Thread Richard Henderson
For A64, any input to an indirect branch can cause this. For A32, many indirect branch paths force the branch to be aligned, but BXWritePC does not. This includes the BX instruction but also other interworking changes to PC. Prior to v8, this case is UNDEFINED. With v8, this is CONSTRAINED

[PATCH v2 4/8] linux-user/arm: Report SIGBUS and SIGSEGV correctly

2021-08-21 Thread Richard Henderson
Pull the fault information from where we placed it, in arm_cpu_tlb_fill and arm_cpu_do_unaligned_access. Signed-off-by: Richard Henderson --- Pulled out from the larger unaligned data patch set. For short-form FSC, pc misalignment is reported in the same way. --- linux-user/arm/cpu_loop.c | 39

[PATCH v2 2/8] target/arm: Merge disas_a64_insn into aarch64_tr_translate_insn

2021-08-21 Thread Richard Henderson
It is confusing to have different exits from translation for various conditions in separate functions. Merge disas_a64_insn into its only caller. Standardize on the "s" name for the DisasContext, as the code from disas_a64_insn had more instances. Reviewed-by: Peter Maydell Signed-off-by:

[PATCH v2 3/8] linux-user/aarch64: Handle EC_PCALIGNMENT

2021-08-21 Thread Richard Henderson
This will shortly be raised for execution with a misaligned pc. Signed-off-by: Richard Henderson --- linux-user/aarch64/cpu_loop.c | 44 +-- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/linux-user/aarch64/cpu_loop.c

[PATCH v2 1/8] target/arm: Take an exception if PSTATE.IL is set

2021-08-21 Thread Richard Henderson
From: Peter Maydell In v8A, the PSTATE.IL bit is set for various kinds of illegal exception return or mode-change attempts. We already set PSTATE.IL (or its AArch32 equivalent CPSR.IL) in all those cases, but we weren't implementing the part of the behaviour where attempting to execute an

[PATCH v2 0/8] target/arm: Fix insn exception priorities

2021-08-21 Thread Richard Henderson
Raise pc alignment faults. Fix single-step and pc-align priority over breakpoints. Not yet fixing insn abort priority over breakpoints. Based-on: 20210813131809.28655-1-peter.mayd...@linaro.org ("linux-user: Clean up siginfo_t handling for arm, aarch64") Changes for v2: * Handle the exceptions

Re: [PATCH v4 2/7] python: Add dependencies for AQMP TUI

2021-08-21 Thread John Snow
On Thu, Aug 19, 2021 at 1:39 PM G S Niteesh Babu wrote: > Added dependencies for the upcoming AQMP TUI under the optional > 'tui' group. > > The same dependencies have also been added under the devel group > since no work around has been found for optional groups to imply > other optional

Re: [PATCH] target/arm: Take an exception if PSTATE.IL is set

2021-08-21 Thread Peter Maydell
On Sat, 21 Aug 2021 at 19:59, Richard Henderson wrote: > > > +static inline uint32_t syn_illegalstate(void) > > +{ > > +return EC_ILLEGALSTATE << ARM_EL_EC_SHIFT; > > +} > > I just noticed this should have the IL bit set. Yep. (I remembered about that for the BXJ trap in the other patch, but

[PATCH 1/1] python: Update for pylint 2.10

2021-08-21 Thread John Snow
A few new annoyances. Of note is the new warning for an unspecified encoding when opening a text file, which actually does indicate a potentially real problem; see https://www.python.org/dev/peps/pep-0597/#motivation I was under the impression that open would try to figure out the encoding of a

[PATCH 0/1] Update check-python-tox test for pylint 2.10

2021-08-21 Thread John Snow
The 'check-python-tox' CI test will probably start showing warnings without this. This can go into the next release, just ignore the CI warning until the tree opens. John Snow (1): python: Update for pylint 2.10 python/qemu/machine/machine.py | 6 -- python/setup.cfg | 1 +

Re: [PATCH] target/arm: Take an exception if PSTATE.IL is set

2021-08-21 Thread Richard Henderson
> +static inline uint32_t syn_illegalstate(void) > +{ > +return EC_ILLEGALSTATE << ARM_EL_EC_SHIFT; > +} I just noticed this should have the IL bit set. r~

Re: [For 6.1 PATCH] hw/arm: xilinx_zynq: Disconnect the UART clocks temporarily

2021-08-21 Thread Peter Maydell
On Sat, 21 Aug 2021 at 16:45, Bin Meng wrote: > > As of today, when booting upstream U-Boot for Xilinx Zynq, the UART > does not receive anything. Initial debugging shows that the UART clock > frequency is 0 somehow which prevents the UART from receiving anything. > Note the U-Boot can still

Re: [PATCH v2 0/5] target/mips: Replace TARGET_WORDS_BIGENDIAN by cpu_is_bigendian()

2021-08-21 Thread Philippe Mathieu-Daudé
On 8/18/21 11:55 PM, Philippe Mathieu-Daudé wrote: > MIPS CPU store its endianess in the CP0 Config0 register. > Use that runtime information instead of #ifdef'ry checking > TARGET_WORDS_BIGENDIAN by introducing the cpu_is_bigendian() > helper. > > Philippe Mathieu-Daudé (5): > target/mips:

Re: [PATCH 0/8] target/mips: Housekeeping in gen_helper() macros

2021-08-21 Thread Philippe Mathieu-Daudé
On 8/17/21 4:52 PM, Richard Henderson wrote: > On 8/16/21 10:50 AM, Philippe Mathieu-Daudé wrote: >> Trivial patches: >> - Remove unused macros >> - Use tcg_constant_i32() >> - Inline the macros when few uses >> - Move macro definitions in translate.h >> >> Philippe Mathieu-Daudé (8): >>   

Re: [PATCH v2] net/colo: check vnet_hdr_support flag when using virtio-net

2021-08-21 Thread Lukas Straub
On Thu, 19 Aug 2021 09:27:17 +0800 Tao Xu wrote: > When COLO use only one vnet_hdr_support parameter between > COLO network filter(filter-mirror, filter-redirector or > filter-rewriter and colo-compare, packet will not be parsed > correctly. Acquire network driver related to COLO, if it is >

[For 6.1 PATCH] hw/arm: xilinx_zynq: Disconnect the UART clocks temporarily

2021-08-21 Thread Bin Meng
As of today, when booting upstream U-Boot for Xilinx Zynq, the UART does not receive anything. Initial debugging shows that the UART clock frequency is 0 somehow which prevents the UART from receiving anything. Note the U-Boot can still output data to the UART tx fifo, which should not happen, as

[PATCH] hw/acpi/pcihp: validate bsel property of the bus before unplugging device

2021-08-21 Thread Ani Sinha
Bsel property of the pci bus indicates whether the bus supports acpi hotplug. We need to validate the presence of this property before performing any hotplug related callback operations. Currently validation of the existence of this property was absent from acpi_pcihp_device_unplug_cb() function

[Bug 1905521] Re: assert issue locates in hw/scsi/lsi53c895a.c:624: lsi_do_dma: Assertion `s->current' failed

2021-08-21 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/552 ** Changed in: qemu Status: Incomplete => Expired **

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-21 Thread Philippe Mathieu-Daudé
On 8/21/21 12:01 PM, Bin Meng wrote: > On Fri, Aug 20, 2021 at 11:52 PM Philippe Mathieu-Daudé > wrote: >> >> When Linux refuses to overcommit a seriously wild allocation we get: >> >> $ qemu-system-i386 -m 4000 >> qemu-system-i386: cannot set up guest memory 'pc.ram': Cannot allocate >>

Re: [RFC PATCH 1/1] QEMU plugin interface extension

2021-08-21 Thread Peter Maydell
On Sat, 21 Aug 2021 at 10:48, Florian Hauschild wrote: > > This extension covers functions: > * to read and write guest memory > * to read and write guest registers > * to flush tb cache > * to control single stepping of qemu from plugin > > These changes allow the user to > * collect

Re: [RFC PATCH 0/1] QEMU TCG plugin interface extensions

2021-08-21 Thread Alexandre IOOSS
On 8/21/21 11:45 AM, Florian Hauschild wrote: Hi all, I extended the plugin interface with additional functionalities. I wrote the extensions for fault injection/exploration reasearch using QEMU. The additional functionalities for a plugin are: * Read and write guest memory * Read and

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-21 Thread Peter Maydell
On Sat, 21 Aug 2021 at 11:03, Bin Meng wrote: > Does g_autofree work with every compiler we support? Yes. We use it extensively: $ git grep g_autofree |wc -l 329 > Looks it only applies to GCC and clang? > https://www.gitmemory.com/issue/linuxwacom/libwacom/142/518787578 Those are the only

Re: [PATCH v3 13/14] tcg/arm: Reserve a register for guest_base

2021-08-21 Thread Peter Maydell
On Fri, 20 Aug 2021 at 19:47, Richard Henderson wrote: > > On 8/20/21 2:03 AM, Peter Maydell wrote: > >> -} else if (datalo != addend) { > >> +} else if (scratch_addend) { > >> tcg_out_ld32_rwb(s, COND_AL, datalo, addend, addrlo); > >>

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-21 Thread Bin Meng
On Fri, Aug 20, 2021 at 11:52 PM Philippe Mathieu-Daudé wrote: > > When Linux refuses to overcommit a seriously wild allocation we get: > > $ qemu-system-i386 -m 4000 > qemu-system-i386: cannot set up guest memory 'pc.ram': Cannot allocate > memory > > Slighly improve the error message,

[RFC PATCH 1/1] QEMU plugin interface extension

2021-08-21 Thread Florian Hauschild
This extension covers functions: * to read and write guest memory * to read and write guest registers * to flush tb cache * to control single stepping of qemu from plugin These changes allow the user to * collect more information about the behaviour of the system * change the guest

[RFC PATCH 0/1] QEMU TCG plugin interface extensions

2021-08-21 Thread Florian Hauschild
Hi all, I extended the plugin interface with additional functionalities. I wrote the extensions for fault injection/exploration reasearch using QEMU. The additional functionalities for a plugin are: * Read and write guest memory * Read and write guest registers * Allow plugin to force QEMU

Re: [PATCH V6 00/27] Live Update

2021-08-21 Thread Zheng Chuan
Hi, steve It seems the VM will stuck after cpr-load on AArch64 environment? My AArch64 environment and test steps: 1. linux kernel: 5.14-rc6 2. QEMU version: v6.1.0-rc2 (patch your patchset), and configure with `../configure --target-list=aarch64-softmmu --disable-werror --enable-kvm` 4. Steps

[Bug 1905521] Re: assert issue locates in hw/scsi/lsi53c895a.c:624: lsi_do_dma: Assertion `s->current' failed

2021-08-21 Thread Thomas Huth
** Changed in: qemu Assignee: Gaoning Pan (hades0506) => (unassigned) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1905521 Title: assert issue locates in hw/scsi/lsi53c895a.c:624:

[Bug 1914117] Re: Short files returned via FTP on Qemu with various architectures and OSes

2021-08-21 Thread Thomas Huth
slirp has been updated for QEMU 6.1-rc2, so this should be fixed in the latest 6.1 release candidate. If you've got some spare minutes, could you please check whether it's working for you now in 6.1-rc4 ? ** Changed in: qemu Status: In Progress => Fix Committed -- You received this bug

[Bug 1921664] Re: Coroutines are racy for risc64 emu on arm64 - crash on Assertion

2021-08-21 Thread Thomas Huth
@Christian & Tommy : Could you please check whether the problematic binaries were built with link-time optimization, i.e. with -flto ? If so, does the problem go away when you rebuild the package without LTO? ** Changed in: qemu Status: New => Incomplete ** Changed in: qemu (Ubuntu)

[Bug 1878057] Re: null-ptr dereference in megasas_command_complete

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Incomplete => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1878057 Title:

[Bug 1913667] Re: FPE in npcm7xx_clk_update_pll

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Incomplete ** Changed in: qemu Status: Incomplete => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed

[Bug 1913669] Re: FPE in npcm7xx_adc_convert

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1913669 Title:

[Bug 1918321] Re: [OSS-Fuzz] Issue 31875 megasas: Null-ptr dereference in megasas_finish_dcmd

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1918321 Title:

Re: [PATCH v3 02/16] tcg/mips: Support unaligned access for softmmu

2021-08-21 Thread Jiaxun Yang
在2021年8月19日八月 上午4:19,Richard Henderson写道: > We can use the routines just added for user-only to emit > unaligned accesses in softmmu mode too. > > Signed-off-by: Richard Henderson Reviewed-by: Jiaxun Yang Thanks! > --- > tcg/mips/tcg-target.c.inc | 91

[Bug 1917082] Re: [OSS-Fuzz] Issue 27574 e1000: Loopback-related stack-overflow

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1917082 Title:

[Bug 1911216] Re: abort issue locates in hw/usb/hcd-ohci.c:1297:ohci_frame_boundary

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1911216 Title:

[Bug 1914638] Re: [OSS-Fuzz] Issue 30219: Global-buffer-overflow in mode_sense_page

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1914638 Title:

[Bug 1891354] Re: Heap-use-after-free in usb_packet_unmap

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1891354 Title:

[Bug 1890155] Re: Abort in vmxnet3_validate_interrupt_idx

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1890155 Title:

[Bug 1892963] Re: Heap-use-after-free in put_dwords through ehci_flush_qh

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1892963 Title:

[Bug 1907938] Re: [OSS-Fuzz] Issue 28524 virtio-blk: ASSERT: !s->dataplane_started

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1907938 Title:

[Bug 1907497] Re: [OSS-Fuzz] Issue 28435 qemu:qemu-fuzz-i386-target-generic-fuzz-intel-hda: Stack-overflow in ldl_le_dma

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1907497 Title:

[Bug 1909261] Re: [OSS-Fuzz] Issue 28929 xhci: ASSERT: xfer->packet.status != USB_RET_NAK

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1909261 Title:

[Bug 1878250] Re: Assertion failure in iov_from_buf_full through the e1000e

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1878250 Title:

[Bug 1878645] Re: null-ptr dereference in ich9_apm_ctrl_changed

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1878645 Title:

[Bug 1878034] Re: memcpy param-overlap through e1000e_write_to_rx_buffers

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1878034 Title:

[Bug 1888714] Re: Memory Leak in hpet_timer results in unusable machine

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1888714 Title:

[Bug 1878651] Re: Assertion failure in e1000e_write_to_rx_buffers

2021-08-21 Thread Thomas Huth
Thanks for moving it over! ... let's close this one here on Launchpad now. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1878651 Title: