[PATCH v3] hw/arm/boot: Report error msg if loading elf/dtb failed

2024-09-03 Thread Changbin Du via
Print errors before exit. Do not exit silently. Cc: Philippe Mathieu-Daudé Signed-off-by: Changbin Du --- v3: use load_elf_strerror() to format errno. v2: remove msg for arm_load_dtb. --- hw/arm/boot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index

[PATCH v2] hw/arm/boot: Report error msg if loading elf/dtb failed

2024-08-30 Thread Changbin Du via
Print errors before exit. Do not exit silently. Signed-off-by: Changbin Du --- v2: remove msg for arm_load_dtb. --- hw/arm/boot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index d480a7da02cf..e15bf097a559 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c

[PATCH] hw/arm/boot: Report error msg if loading elf/dtb failed

2024-08-30 Thread Changbin Du via
Print errors before exit. Do not exit silently. Signed-off-by: Changbin Du --- hw/arm/boot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index d480a7da02cf..17c01f299831 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -839,6 +839,7 @@ static ssize_t

arm: gdb-stub is broken by FEAT_HAFDBS

2022-11-23 Thread Changbin Du via
is_secure(env), -.in_debug = true, +.in_debug = false, }; Could you take a look at this? Thank you! -- Cheers, Changbin Du

Re: [PATCH 0/3] gdbstub: add support for switchable endianness

2021-08-27 Thread Changbin Du
On Tue, Aug 24, 2021 at 10:11:14AM +0100, Peter Maydell wrote: > On Tue, 24 Aug 2021 at 00:05, Changbin Du wrote: > > > > On Mon, Aug 23, 2021 at 04:30:05PM +0100, Peter Maydell wrote: > > > changes to be more capable of handling dynamic target changes > > &

Re: [PATCH 0/3] gdbstub: add support for switchable endianness

2021-08-23 Thread Changbin Du
On Mon, Aug 23, 2021 at 04:30:05PM +0100, Peter Maydell wrote: > On Mon, 23 Aug 2021 at 16:21, Philippe Mathieu-Daudé > wrote: > > > > On 8/23/21 4:20 PM, Changbin Du wrote: > > > To resolve the issue to debug switchable targets, this serias introduces > > >

Re: [PATCH 0/3] gdbstub: add support for switchable endianness

2021-08-23 Thread Changbin Du
On Mon, Aug 23, 2021 at 05:21:07PM +0200, Philippe Mathieu-Daudé wrote: > On 8/23/21 4:20 PM, Changbin Du wrote: > > To resolve the issue to debug switchable targets, this serias introduces > > basic infrastructure for gdbstub and enable support for ARM and RISC-V > > targets.

[PATCH 2/3] arm: gdbstub: add support for switchable endianness

2021-08-23 Thread Changbin Du
Apply new gdbstub interfaces we added previously to support both little and big endian guest debugging for ARM. And enable the TARGET_SWICHABLE_ENDIANNESS option. Signed-off-by: Changbin Du --- configs/targets/aarch64-softmmu.mak | 1 + configs/targets/arm-softmmu.mak | 1 + target/arm

[PATCH 1/3] gdbstub: add basic infrastructure to support switchable endianness

2021-08-23 Thread Changbin Du
t for ARM and RISC-V targets. For other switchable targets them can be supported in future. Signed-off-by: Changbin Du --- gdbstub.c | 11 +++ include/exec/gdbstub.h | 72 +++--- qemu-options.hx| 7 ++-- softmmu

[PATCH 3/3] riscv: gdbstub: add support for switchable endianness

2021-08-23 Thread Changbin Du
Apply new gdbstub interfaces we added previously to support both little and big endian guest debugging for RISC-V. And enable the TARGET_SWICHABLE_ENDIANNESS option. Signed-off-by: Changbin Du --- configs/targets/riscv32-softmmu.mak | 1 + configs/targets/riscv64-softmmu.mak | 1 + target

[PATCH 0/3] gdbstub: add support for switchable endianness

2021-08-23 Thread Changbin Du
... Changbin Du (3): gdbstub: add basic infrastructure to support switchable endianness arm: gdbstub: add support for switchable endianness riscv: gdbstub: add support for switchable endianness configs/targets/aarch64-softmmu.mak | 1 + configs/targets/arm-softmmu.mak | 1 + configs

[PATCH v2] target/riscv: Dump CSR mscratch/sscratch/satp

2021-05-19 Thread Changbin Du
This dumps the CSR mscratch/sscratch/satp and meanwhile aligns the output of CSR mtval/stval. Signed-off-by: Changbin Du Reviewed-by: Alistair Francis Reviewed-by: Bin Meng --- v2: Rebase to latest mainline. --- target/riscv/cpu.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions

[PATCH] target/riscv: Dump CSR mscratch/sscratch/satp

2021-04-28 Thread Changbin Du
This dumps the CSR mscratch/sscratch/satp and meanwhile aligns the output of CSR mtval/stval. Signed-off-by: Changbin Du --- target/riscv/cpu.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 7d6ed80f6b67..73af6f5445ba

[PATCH v3] arm/monitor: Add support for 'info tlb' command

2020-11-14 Thread Changbin Du
001000 RWAF PXN UXN 80005000 40005000 1000 RWAF PXN UXN 80006000 40006000 1000 RWAF PXN UXN Signed-off-by: Changbin Du --- v3: rebase to latest mainline. v2: o fix coding style

[PATCH v2] arm/monitor: Add support for 'info tlb' command

2020-11-14 Thread Changbin Du
including regime_translation_disabled(), pt_start_level_stage1(), regime_ttbr(). Signed-off-by: Changbin Du --- v2: o fix coding style o extract common code pt_start_level_stage1() Signed-off-by: Changbin Du --- hmp-commands-info.hx | 3 +- target/arm/helper.c| 30 +-- target/arm/i

Re: [PATCH] arm/monitor: Add support for 'info tlb' command

2020-11-14 Thread Changbin Du
On Fri, Nov 13, 2020 at 01:13:42PM +, Dr. David Alan Gilbert wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > On Fri, 13 Nov 2020 at 09:59, Changbin Du wrote: > > > > > > This adds hmp 'info tlb' command support for the arm platform. &

[PATCH] arm/monitor: Add support for 'info tlb' command

2020-11-13 Thread Changbin Du
This adds hmp 'info tlb' command support for the arm platform. The limitation is that this only implements a page walker for ARMv8-A AArch64 Long Descriptor format, 32bit addressing is not supported yet. Signed-off-by: Changbin Du --- hmp-commands-info.hx | 3 +- target/ar

Re: [PATCH v2] ui/sdl2: fix segment fault caused by null pointer dereference

2020-05-08 Thread Changbin Du
hello, is this ready to merge now? On Mon, Apr 27, 2020 at 09:24:12PM +0800, Changbin Du wrote: > I found SDL_GetWindowFromID() sometimes return NULL when I start qemu via > ssh forwarding even the window has been crated already. I am not sure > whether this is a bug of SDL, but we'

[PATCH v2] ui/sdl2: fix segment fault caused by null pointer dereference

2020-04-27 Thread Changbin Du
I found SDL_GetWindowFromID() sometimes return NULL when I start qemu via ssh forwarding even the window has been crated already. I am not sure whether this is a bug of SDL, but we'd better check it carefully. Signed-off-by: Changbin Du --- v2: fix typo. --- ui/sdl2.c | 12 1

Re: [PATCH] ui/sdl2: fix segment fault caused by null pointer dereference

2020-04-27 Thread Changbin Du
On Mon, Apr 27, 2020 at 02:11:59PM +0100, Peter Maydell wrote: > On Mon, 27 Apr 2020 at 13:19, Changbin Du wrote: > > > > I found SDL_GetWindowFromID() sometimes return NULL when I start qemu via > > ssh forwarding even the window has been crated already. I am not sure >

[PATCH] ui/sdl2: fix segment fault caused by null pointer dereference

2020-04-27 Thread Changbin Du
I found SDL_GetWindowFromID() sometimes return NULL when I start qemu via ssh forwarding even the window has been crated already. I am not sure whether this is a bug of SDL, but we'd better check it carefully. Signed-off-by: Changbin Du --- ui/sdl2.c | 9 + 1 file changed, 9 inser

Re: [PATCH] gdbstub: Fix segment fault for i386 and m68k

2020-04-12 Thread Changbin Du
On Sun, Apr 12, 2020 at 02:58:56PM +0200, Laurent Vivier wrote: > CC: Alex Bennée > > The one for m68k is already queued by Alex. > Great. I will send x86 fix only. Thanks! > Thanks, > Laurent > -- Cheers, Changbin Du

[PATCH v2] gdbstub: Fix segment fault for i386 target

2020-04-12 Thread Changbin Du
/multiarch/memmove-vec-unaligned-erms.S: No such file or directory. Fixes: a010bdbe71 ("gdbstub: extend GByteArray to read register helpers") Signed-off-by: Changbin Du --- v2: remove m68k fix since it's already queued. --- target/i386/gdbstub.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] gdbstub: Fix segment fault for i386 and m68k

2020-04-12 Thread Changbin Du
/multiarch/memmove-vec-unaligned-erms.S: No such file or directory. Fixes: a010bdbe71 ("gdbstub: extend GByteArray to read register helpers") Signed-off-by: Changbin Du --- target/i386/gdbstub.c | 2 +- target/m68k/helper.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff

Re: [PATCH] target/arm: fix incorrect current EL bug in aarch32 exception emulation

2020-03-30 Thread Changbin Du
Hi, Peter, Could you take this fix as high priority? This bug has made qemu-system-arm broken. On Sat, Mar 28, 2020 at 10:02:32PM +0800, Changbin Du wrote: > The arm_current_el() should be invoked after mode switching. Otherwise, we > get a wrong current EL value, since current EL i

[PATCH] target/arm: fix incorrect current EL bug in aarch32 exception emulation

2020-03-28 Thread Changbin Du
The arm_current_el() should be invoked after mode switching. Otherwise, we get a wrong current EL value, since current EL is also determined by current mode. Fixes: 4a2696c0d4 ("target/arm: Set PAN bit as required on exception entry") Signed-off-by: Changbin Du --- target/arm/he

Re: [PATCH v2] gdbstub: Fix single-step issue by confirming 'vContSupported+' feature to gdb

2020-03-09 Thread Changbin Du
hello, is this patch ready to merge now? Thanks! On Fri, Feb 21, 2020 at 08:25:59AM +0800, Changbin Du wrote: > Recently when debugging an arm32 system on qemu, I found sometimes the > single-step command (stepi) is not working. This can be reproduced by > below steps: > 1) start qem

Re: [PATCH] tcg: gdbstub: Fix single-step issue on arm target

2020-02-21 Thread Changbin Du
needs some modifications. This fix > is not specific to ARM or TCG, but to the gdbstub itself. You also > mention this bug you have with PC, which is not related to the bug you > are fixing here. Could you rewrite it in a more generic way? You simply > need to emphasis the effect of advertising the 'vContSupported+' feature > on GDB. > > Thanks. > > -- > Luc -- Cheers, Changbin Du

[PATCH v2] gdbstub: Fix single-step issue by confirming 'vContSupported+' feature to gdb

2020-02-20 Thread Changbin Du
: vCont;c;C;s;S gdb_handle_packet: vCont;s:p1.1;c:p1.-1 Signed-off-by: Changbin Du Tested-by: Philippe Mathieu-Daudé --- v2: polish commit message. --- gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index ce304ff482..adccd938e2 100644 --- a/gdbs

Re: [PATCH] tcg: gdbstub: Fix single-step issue on arm target

2020-02-20 Thread Changbin Du
On Thu, Feb 20, 2020 at 06:47:26PM +0100, Philippe Mathieu-Daudé wrote: > On 2/20/20 4:58 PM, Changbin Du wrote: > > Recently when debugging an arm32 system on qemu, I found sometimes the > > single-step command (stepi) is not working. This can be reproduced by > > below steps

Re: [PATCH] tcg: gdbstub: Fix single-step issue on arm target

2020-02-20 Thread Changbin Du
On Thu, Feb 20, 2020 at 10:24:37PM +0100, Luc Michel wrote: > Hi, > > On 2/20/20 4:58 PM, Changbin Du wrote: > > Recently when debugging an arm32 system on qemu, I found sometimes the > > single-step command (stepi) is not working. This can be reproduced by > > belo

[PATCH] tcg: gdbstub: Fix single-step issue on arm target

2020-02-20 Thread Changbin Du
tep: gdb_handle_packet: Z0,4,4 After this change, gdb send "vCont;s.." which is expected: gdb_handle_packet: vCont? put_packet: vCont;c;C;s;S gdb_handle_packet: vCont;s:p1.1;c:p1.-1 Signed-off-by: Changbin Du --- gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] tcg: gdbstub: Fix missing breakpoint issue

2020-02-05 Thread Changbin Du
On Wed, Feb 05, 2020 at 11:03:23AM +, Richard Henderson wrote: > On 1/24/20 2:17 AM, Changbin Du wrote: > > When inserting breakpoints, we need to invalidate related TBs to apply > > helper call. This is done by breakpoint_invalidate(). But many users > > found the BP

Re: [PATCH] tcg: gdbstub: Fix missing breakpoint issue

2020-02-03 Thread Changbin Du
Hello, Any review? Thanks! On Fri, Jan 24, 2020 at 10:17:28AM +0800, Changbin Du wrote: > When inserting breakpoints, we need to invalidate related TBs to apply > helper call. This is done by breakpoint_invalidate(). But many users > found the BPs sometimes never hit. > >

[PATCH] tcg: gdbstub: Fix missing breakpoint issue

2020-01-23 Thread Changbin Du
this problem.) Signed-off-by: Changbin Du --- exec.c | 29 + 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/exec.c b/exec.c index 67e520d18e..9d9fd48519 100644 --- a/exec.c +++ b/exec.c @@ -997,36 +997,9 @@ static void breakpoint_invalidate(CPUState

Re: [Qemu-devel] [PATCH 00/39] Windbg supporting

2018-12-01 Thread Changbin Du
2 insertions(+), 10 deletions(-) > create mode 100644 include/exec/windbgkd.h > create mode 100644 include/exec/windbgstub-utils.h > create mode 100644 include/exec/windbgstub.h > create mode 100644 stubs/windbgstub.c > create mode 100644 target/i386/windbgstub.c > create mode 100644 windbgstub-utils.c > create mode 100644 windbgstub.c > > -- > Mikhail Abakumov > -- Cheers, Changbin Du