Re: [PATCH v5 06/12] tests/plugin/mem: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
Hi Pierrick, On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier > --- > tests/plugin/mem.c | 40 +--- > 1 file changed, 25 insertions(+), 15 deletions(-) > > diff --git a/tests/plugin/mem.c b/tests/plugin/mem.c > index 44e9106

Re: [PATCH v5 07/12] tests/plugin/insn: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier Reviewed-by: Luc Michel > --- > tests/plugin/insn.c | 106 +--- > 1 file changed, 50 insertions(+), 56 deletions(-) > > diff --git a/tests/plugin/ins

Re: [PATCH v5 08/12] tests/plugin/bb: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier Reviewed-by: Luc Michel > --- > tests/plugin/bb.c | 63 +++ > 1 file changed, 26 insertions(+), 37 deletions(-) > > diff --git a/tests/plugin/b

Re: [PATCH v5 09/12] contrib/plugins/hotblocks: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
Hi Pierrick, On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier > --- > contrib/plugins/hotblocks.c | 50 ++--- > 1 file changed, 30 insertions(+), 20 deletions(-) > > diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hot

Re: [PATCH v5 09/12] contrib/plugins/hotblocks: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
On 15:09 Tue 27 Feb , Pierrick Bouvier wrote: > On 2/27/24 2:54 PM, Luc Michel wrote: > > Hi Pierrick, > > > > On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > > > Signed-off-by: Pierrick Bouvier > > > --- &

Re: [PATCH v5 06/12] tests/plugin/mem: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
On 14:56 Tue 27 Feb , Pierrick Bouvier wrote: > Hi Luc, > > On 2/27/24 1:35 PM, Luc Michel wrote: > > Hi Pierrick, > > > > On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > > > Signed-off-by: Pierrick Bouvier >

Re: [PATCH v5 09/12] contrib/plugins/hotblocks: migrate to new per_vcpu API

2024-03-01 Thread Luc Michel
On 14:33 Thu 29 Feb , Alex Bennée wrote: > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Luc Michel writes: > > > On 15:09 Tue 27 Feb , Pierrick Bouvier wrote: >

Re: [PATCH 0/7] hw/i386: Cleanups around 'hw/i386/pc.h'

2024-02-13 Thread Luc Michel
rt92.c| 1 + > hw/isa/lpc_ich9.c | 1 - > hw/timer/hpet.c | 1 - > target/i386/monitor.c | 1 - > 9 files changed, 8 insertions(+), 12 deletions(-) > > -- > 2.41.0 > > For the series: Reviewed-by: Luc Michel

[PATCH] hw/arm/smmuv3: add support for stage 1 access fault

2024-02-09 Thread Luc Michel
An access fault is raised when the Access Flag is not set in the looked-up PTE and the AFFD field is not set in the corresponding context descriptor. This was already implemented for stage 2. Implement it for stage 1 as well. Signed-off-by: Luc Michel --- hw/arm/smmuv3-internal.h | 1

[PATCH v2] hw/arm/smmuv3: add support for stage 1 access fault

2024-02-13 Thread Luc Michel
An access fault is raised when the Access Flag is not set in the looked-up PTE and the AFFD field is not set in the corresponding context descriptor. This was already implemented for stage 2. Implement it for stage 1 as well. Signed-off-by: Luc Michel --- v2: drop erroneous submodule

Re: [PATCH-for-9.0 1/2] hw/clock: Let clock_set_mul_div() return boolean value

2024-03-25 Thread Luc Michel
On 16:58 Fri 22 Mar , Philippe Mathieu-Daudé wrote: > Let clock_set_mul_div() return a boolean value whether the > clock has been updated or not, similarly to clock_set(). > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Luc Michel > --- > include/hw/clock.h |

Re: [PATCH-for-9.0 2/2] hw/misc/stm32l4x5_rcc: Propagate period when enabling a clock

2024-03-25 Thread Luc Michel
On 16:39 Fri 22 Mar , Peter Maydell wrote: > On Fri, 22 Mar 2024 at 15:59, Philippe Mathieu-Daudé > wrote: > > > > From: Arnaud Minier > > > > The "clock_set_mul_div" function doesn't propagate the clock period > > to the children if it is changed (e.g. by enabling/disabling a clock > > mult

Re: [PATCH-for-9.0 1/2] hw/clock: Let clock_set_mul_div() return boolean value

2024-03-25 Thread Luc Michel
On 09:40 Mon 25 Mar , Luc Michel wrote: > On 16:58 Fri 22 Mar , Philippe Mathieu-Daudé wrote: > > Let clock_set_mul_div() return a boolean value whether the > > clock has been updated or not, similarly to clock_set(). > > > > Signed-off-by: Philippe Mathie

Re: [PATCH for-9.0] Fix some typos in documentation (found by codespell)

2024-04-01 Thread Luc Michel
On 18:15 Sun 31 Mar , Stefan Weil wrote: > Signed-off-by: Stefan Weil Reviewed-by: Luc Michel > --- > docs/devel/atomics.rst | 2 +- > docs/devel/ci-jobs.rst.inc | 2 +- > docs/devel/clocks.rst | 2 +- > docs/system/i386/sgx.rst | 2 +- > qapi/qom.json

Re: [PATCH 2/6] allwinner-i2c, adm1272: Use device_cold_reset() for software-triggered reset

2024-04-16 Thread Luc Michel
ture for the hold and exit reset methods. > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > --- > hw/i2c/allwinner-i2c.c | 3 +-- > hw/sensor/adm1272.c| 2 +- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/hw/i2c/allwinner-i2c.c b/hw/i2c

Re: [PATCH 3/6] scripts/coccinelle: New script to add ResetType to hold and exit phases

2024-04-16 Thread Luc Michel
#x27;s reset method directly >calls the implementation of a different device's method > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel (I'm not a coccinelle expert but LGTM) > --- > The structure here is a bit of an experiment: usually I would make > the

Re: [PATCH 4/6] hw, target: Add ResetType argument to hold and exit phase methods

2024-04-16 Thread Luc Michel
--sp-file scripts/coccinelle/reset-type.cocci \ > --keep-comments --smpl-spacing --in-place \ > --include-headers --dir $dir; done > > and no manual edits. > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > --- > incl

Re: [PATCH 5/6] docs/devel/reset: Update to new API for hold and exit phase methods

2024-04-16 Thread Luc Michel
On 17:08 Fri 12 Apr , Peter Maydell wrote: > Update the reset documentation's example code to match the new API > for the hold and exit phase method APIs where they take a ResetType > argument. > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > --- >

Re: [PATCH 1/6] hw/misc: Don't special case RESET_TYPE_COLD in npcm7xx_clk, gcr

2024-04-16 Thread Luc Michel
't know > about should be handled like RESET_TYPE_COLD"; switch these > devices to do that. Then adding a new reset type will only > need to touch those devices where its behaviour really needs > to be different from the standard cold reset. > > Signed-off-by: Peter Mayde

Re: [PATCH 6/6] reset: Add RESET_TYPE_SNAPSHOT_LOAD

2024-04-16 Thread Luc Michel
ht reset type for the ShutdownCause it is passed. This > allows us to get rid of the device_reset_reason global we > were using to implement qemu_register_reset_nosnapshotload(). > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > --- > docs/devel/reset.rst| 17 ++

Re: [PATCH 1/8] tests/acceptance/boot_linux_console: Use raspi console model as key

2020-02-17 Thread Luc Michel
On 2/15/20 8:22 PM, Philippe Mathieu-Daudé wrote: > Python dictionary are not that expensive. Use a key makes the > code easier to review. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > tests/acceptance/boot_linux_console.py | 8 &g

Re: [PATCH 2/8] tests/acceptance/boot_linux_console: Add raspi version=2 parameter

2020-02-17 Thread Luc Michel
On 2/15/20 8:22 PM, Philippe Mathieu-Daudé wrote: > We want to tests different Raspberry Pi machines. Refactor to > take the board version as argument. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > tests/acceptance/boot_lin

Re: [PATCH 3/8] tests/acceptance/boot_linux_console: Test the raspi1 console

2020-02-17 Thread Luc Michel
| > CANCEL 0 > JOB TIME : 13.18 s > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > tests/acceptance/boot_linux_console.py | 12 > 1 file changed, 12 insertions(+) > > diff --git a/tests/acceptance/boot_linux_console.

Re: [PATCH 6/8] tests/boot_linux_console: Test booting U-Boot on the Raspberry Pi 2

2020-02-17 Thread Luc Michel
000) > console: gcc (Debian 8.3.0-7) 8.3.0 > console: GNU ld (GNU Binutils for Debian) 2.31.1 > console: U-Boot> reset > console: resetting ... > PASS (0.46 s) > > U-Boot is built by the Debian project, see: > https://wiki.debian.org/InstallingDebianOn/Al

Re: [PATCH 4/8] tests/acceptance/boot_linux_console: Test the raspi0 console

2020-02-17 Thread Luc Michel
| > CANCEL 0 > JOB TIME : 12.88 s > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > tests/acceptance/boot_linux_console.py | 12 > 1 file changed, 12 insertions(+) > > diff --git a/tests/acceptance/boot_linux_console.

Re: [PATCH 5/8] tests/acceptance/boot_linux_console: Test the raspi1 AUX console

2020-02-17 Thread Luc Michel
line: printk.time=0 > earlycon=uart8250,mmio32,0x3f215040 console=ttyS1,115200 > PASS (12.46 s) > RESULTS: PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | > CANCEL 0 > JOB TIME : 39.60 s > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Mi

Re: [PATCH 7/8] tests/boot_linux_console: Test booting U-Boot on the Raspberry Pi 3

2020-02-17 Thread Luc Michel
bian project, see: > https://wiki.debian.org/InstallingDebianOn/Allwinner#Creating_a_bootable_SD_Card_with_u-boot > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > tests/acceptance/boot_linux_console.py | 25 + > 1 file chan

Re: [PATCH 8/8] tests/acceptance: Count Raspberry Pi logos displayed on framebuffer

2020-02-17 Thread Luc Michel
pberry at position (x, y) = (71, 0) > framebuffer: found raspberry at position (x, y) = (142, 0) > framebuffer: found raspberry at position (x, y) = (213, 0) > PASS (11.06 s) > RESULTS: PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | > CANCEL 0 > JOB TI

Re: [PATCH v2] tests/boot_linux_console: Boot Trusted Firmware-A on the Raspberry Pi 3

2020-02-18 Thread Luc Michel
0 | WARN 0 | INTERRUPT 0 | > CANCEL 0 > JOB TIME : 1.88 s > > [1] https://github.com/pbatard/RPi3#summary > [2] > https://github.com/ARM-software/arm-trusted-firmware/blob/v2.1/docs/plat/rpi3.rst > [3] http://www.skylyrac.net/2018-02-01-port-arm-tf-to-rpi3.html > &

Re: [PATCH v2 04/13] hw/arm/raspi: Introduce RaspiProcessorId enum

2020-02-18 Thread Luc Michel
RaspiProcessorId board_processor_id(uint32_t board_rev) > { > +int proc_id = FIELD_EX32(board_rev, REV_CODE, PROCESSOR);; You have a superfluous semicolon here. Apart from that: Reviewed-by: Luc Michel > + > assert(FIELD_EX32(board_rev, REV_CODE, STYLE)); /* Only new styl

Re: [PATCH v2 05/13] hw/arm/raspi: Remove use of the 'version' value in the board code

2020-02-18 Thread Luc Michel
{ > +firmware_addr = FIRMWARE_ADDR_2; Maybe rename those constants too, because now that the version is gone, we can wonder what those 2 and 3 mean. By the way since this firmware address seems processor ID specific, maybe you can put them in your soc_property structure? A

Re: [PATCH v2 12/13] hw/arm/raspi: Add the Raspberry Pi B+ machine

2020-02-18 Thread Luc Michel
On 2/17/20 12:45 PM, Philippe Mathieu-Daudé wrote: > $ qemu-system-arm -M raspi1b -serial stdio \ > -kernel raspberrypi/firmware/boot/kernel.img \ > -dtb raspberrypi/firmware/boot/bcm2708-rpi-b.dtb \ > -append 'printk.time=0 earlycon=pl011,0x20201000 console=ttyAMA0' > [0.

Re: [PATCH v2 13/13] hw/arm/raspi: Add the Raspberry Pi Zero machine

2020-02-18 Thread Luc Michel
6, preallocated irqs: 16 > sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every > 2147483647500ns > clocksource: timer: mask: 0x max_cycles: 0x, max_idle_ns: > 1911260446275 ns > bcm2835: system timer (irq = 27) > Console: colour dummy device 80

Re: [PATCH v2 06/13] hw/arm/bcm2836: Restrict BCM283XClass declaration to C source

2020-02-18 Thread Luc Michel
On 2/17/20 12:45 PM, Philippe Mathieu-Daudé wrote: > No code out of bcm2836.c uses (or requires) this declarations. > Move it locally to the C source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/bcm2836.h | 12 &

Re: [PATCH v2 08/13] hw/arm/bcm2836: Introduce BCM283XClass::core_count

2020-02-18 Thread Luc Michel
On 2/17/20 12:45 PM, Philippe Mathieu-Daudé wrote: > The BCM2835 has only one core. Introduce the core_count field to > be able to use values different than BCM283X_NCPUS (4). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > hw/arm/bcm2836.c | 7

Re: [PATCH v2 09/13] hw/arm/bcm2836: Only provide "enabled-cpus" property to multicore SoCs

2020-02-18 Thread Luc Michel
On 2/17/20 12:45 PM, Philippe Mathieu-Daudé wrote: > It makes no sense to set enabled-cpus=0 on single core SoCs. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > hw/arm/bcm2836.c | 15 +++ > 1 file changed, 7 insertions(+), 8 deletions(

Re: [PATCH v2 10/13] hw/arm/bcm2836: Split out common realize() code

2020-02-18 Thread Luc Michel
ller (and mailboxes, etc.) */ > ... >} > > Split the two part, so we can reuse the common part with other > SoCs from this family. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > hw/arm/bcm2836.c | 23 +++ > 1 file changed,

Re: [PATCH v2 11/13] hw/arm/bcm2836: Introduce the BCM2835 SoC

2020-02-18 Thread Luc Michel
On 2/17/20 12:45 PM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/bcm2836.h | 1 + > hw/arm/bcm2836.c | 40 > hw/arm/raspi.c | 2 ++ > 3

Re: [PATCH v2 03/13] hw/arm/raspi: Use more specific machine names

2020-02-18 Thread Luc Michel
o. For backward compatibility, add > an alias to the previous generic name. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > hw/arm/raspi.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/hw/arm/raspi.c b/hw/arm

Re: [PATCH v2 01/13] hw/arm/raspi: Remove ignore_memory_transaction_failures on the raspi2

2020-02-18 Thread Luc Michel
ed-by: Richard Henderson > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > hw/arm/raspi.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c > index 90ad9b8115..221356933e 100644 > --- a/hw/arm

Re: [PATCH RESEND 01/13] scripts/checkpatch.pl: Detect superfluous semicolon in C code

2020-02-18 Thread Luc Michel
ENOSPC;; > total: 1 errors, 1 warnings, 485 lines checked > > Reported-by: Luc Michel > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > Cc: Paolo Bonzini > --- > scripts/checkpatch.pl | 5 + > 1 file changed, 5 insertions(+) >

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

2020-02-20 Thread Luc Michel
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 > below steps: > 1) start qemu-system-arm -s -S .. and wait for gdb connection. > 2) start gdb and connect t

Re: [PATCH] hw/arm/virt: Simplify by moving the gic in the machine state

2019-12-09 Thread Luc Michel
On 12/9/19 10:03 AM, Philippe Mathieu-Daudé wrote: > Make the gic a field in the machine state, and instead of filling > an array of qemu_irq and passing it around, directly call > qdev_get_gpio_in() on the gic field. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed

Re: [PATCH] gdbstub: change GDBState.last_packet to GByteArray

2019-12-09 Thread Luc Michel
On 12/6/19 2:42 PM, Damien Hedde wrote: > Remove the packet size upper limit by using a GByteArray > instead of a statically allocated array for last_packet. > Thus we can now send big packets. > > Also remove the last_packet_len field and use last_packet->len > instead. > > Signed-off-by: Dam

Re: [PATCH v2 1/2] gdbstub: change GDBState.last_packet to GByteArray

2019-12-12 Thread Luc Michel
d. > > Signed-off-by: Damien Hedde > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > gdbstub.c | 39 +-- > 1 file changed, 21 insertions(+), 18 deletions(-) > > diff --git a/gdbstub.c b/gdbstub.c > index 7b695bd

Re: [PATCH 1/2] hw/core/loader: return image sizes as ssize_t

2021-11-12 Thread Luc Michel
oad. > > Cc: Luc Michel > Signed-off-by: Jamie Iles Reviewed-by: Luc Michel > --- > hw/arm/armv7m.c | 2 +- > hw/arm/boot.c| 8 ++-- > hw/core/generic-loader.c | 2 +- > hw/core/loader.c | 81 +--- >

[PATCH v2 3/7] semihosting/arm-compat-semi: use semihosting_exit_request

2022-06-21 Thread Luc Michel
Use the new semihosting_exit_request instead of a call to exit when handling a semihosted exit syscall. Signed-off-by: Luc Michel --- semihosting/arm-compat-semi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c

[PATCH v2 4/7] target/m68k: use semihosting_exit_request on semihosted exit syscall

2022-06-21 Thread Luc Michel
Use the new semihosting_exit_request instead of a call to exit when handling a semihosted exit syscall. Signed-off-by: Luc Michel --- target/m68k/m68k-semi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c index

[PATCH v2 5/7] target/mips: use semihosting_exit_request on semihosted exit syscall

2022-06-21 Thread Luc Michel
Use the new semihosting_exit_request instead of a call to exit when handling a semihosted exit syscall. Signed-off-by: Luc Michel --- target/mips/tcg/sysemu/mips-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg

[PATCH v2 2/7] semihosting: add the semihosting_exit_request function

2022-06-21 Thread Luc Michel
because it does not allow other CPU threads to exit properly, leading to e.g. at_exit callbacks being called while other CPUs still run. This can lead to strange bugs, especially in plugins with a registered at_exit function. Signed-off-by: Luc Michel --- qapi/run-state.json|

[PATCH v2 1/7] softmmu: add qemu_[set|get]_exit_status functions

2022-06-21 Thread Luc Michel
Add the two function qemu_set_exit_status() and qemu_get_exit_status(). Use qemu_get_exit_status() in main instead of 0 as the return value. This is in preparation for the semihosting exit request implementation. Signed-off-by: Luc Michel --- include/sysemu/sysemu.h | 2 ++ softmmu/main.c

[PATCH v2 0/7] semihosting: proper QEMU exit on semihosted exit syscall

2022-06-21 Thread Luc Michel
T) used in this case. The CPU is stopped and returns to the main CPU loop so that no more instruction get executed (the semihosting_exit_request is declared G_NORETURN). All targets are converted to use this new function. Thanks, Luc Luc Michel (7): softmmu: add qemu_[set|get]_exit_status

[PATCH v2 7/7] target/xtensa: use semihosting_exit_request on semihosted exit syscall

2022-06-21 Thread Luc Michel
Use the new semihosting_exit_request instead of a call to exit when handling a semihosted exit syscall. Signed-off-by: Luc Michel --- target/xtensa/xtensa-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/xtensa/xtensa-semi.c b/target/xtensa/xtensa-semi.c index

Re: [PATCH v2 0/7] semihosting: proper QEMU exit on semihosted exit syscall

2022-06-22 Thread Luc Michel
On 07:37 Tue 21 Jun , Richard Henderson wrote: > On 6/21/22 05:59, Luc Michel wrote: > > v2: > >- fix linux-user compilation. Declare semihosting_exit_request "static > > inline G_NORETURN" on CONFIG_USER_ONLY side. Use > > g_assert_not_reac

Re: [PATCH v4 05/53] accel/stubs: Add tcg stub for probe_access_flags

2022-06-22 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > accel/stubs/tcg-stub.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c > index ea4a0dd2

Re: [PATCH v4 19/53] gdbstub: Convert GDB error numbers to host error numbers

2022-06-22 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Provide the callback with consistent state -- always use > host error numbers. The individual callback can then > decide if the errno requires conversion for the guest. > > Signed-off-by: Richard Henderson Reviewed

Re: [PATCH v4 25/53] semihosting: Use env more often in do_common_semihosting

2022-06-22 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > We've already loaded cs->env_ptr into a local variable; use it. > Since env is unconditionally used, we don't need a dummy use. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > se

Re: [PATCH v4 27/53] semihosting: Split out semihost_sys_open

2022-06-22 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_OPEN to a > reusable function. This handles gdb and host file i/o. > > Add helpers to validate the length of the filename string. > Prepare for usage by other semihosting by allowing the > filename

Re: [PATCH v4 28/53] semihosting: Split out semihost_sys_close

2022-06-22 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_CLOSE to a > reusable function. This handles all GuestFD. > > Note that gdb_do_syscall %x reads target_ulong, not int. > > Signed-off-by: Richard Henderson Revie

Re: [PATCH v4 29/53] semihosting: Split out semihost_sys_read

2022-06-22 Thread Luc Michel
rw_cb(CPUState *cs, target_ulong ret, target_ulong > err) > +{ > +/* Recover the original length from the third argument. */ > +CPUArchState *env G_GNUC_UNUSED = cs->env_ptr; > +target_ulong args = common_semi_arg(cs, 1); > +target_ulong arg2; > +GET_ARG(2); > +

Re: [PATCH v4 30/53] semihosting: Split out semihost_sys_write

2022-06-22 Thread Luc Michel
; > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 6 > semihosting/arm-compat-semi.c | 52 +--- > semihosting/syscalls.c | 54 ++ > 3 files cha

Re: [PATCH v4 31/53] semihosting: Bound length for semihost_sys_{read, write}

2022-06-22 Thread Luc Michel
rson Reviewed-by: Luc Michel > --- > semihosting/syscalls.c | 16 > 1 file changed, 16 insertions(+) > > diff --git a/semihosting/syscalls.c b/semihosting/syscalls.c > index 5cb12d6adc..eefbae74f1 100644 > --- a/semihosting/syscalls.c > +++ b/semihosting

Re: [PATCH v4 32/53] semihosting: Split out semihost_sys_lseek

2022-06-22 Thread Luc Michel
ternal type of the offset to int64_t, and > provide the whence argument, which will be required by > m68k and nios2 semihosting. > > Note that gdb_do_syscall %x reads target_ulong, not int. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/

Re: [PATCH v4 33/53] semihosting: Split out semihost_sys_isatty

2022-06-22 Thread Luc Michel
gt; success result. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/arm-compat-semi.c | 40 -- > semihosting/syscalls.c | 36 ++ >

Re: [PATCH v2 2/7] semihosting: add the semihosting_exit_request function

2022-06-23 Thread Luc Michel
On 20:09 Wed 22 Jun , Peter Maydell wrote: > On Tue, 21 Jun 2022 at 13:59, Luc Michel wrote: > > > > Add the semihosting_exit_request function to be used by targets when > > handling an `exit' semihosted syscall. This function calls gdb_exit to > > clo

Re: [PATCH v4 34/53] semihosting: Split out semihost_sys_flen

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > The ARM-specific SYS_FLEN isn't really something that can be > reused by other semihosting apis, but there are parts that can > reused for the implementation of semihost_sys_fstat. > > Signed-off-by: Richard Henderson Rev

Re: [PATCH v4 36/53] semihosting: Split out semihost_sys_rename

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_RENAME to a > reusable function. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 4 +++ > semihosting/ar

Re: [PATCH v4 35/53] semihosting: Split out semihost_sys_remove

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_REMOVE to a > reusable function. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/ar

Re: [PATCH v4 37/53] semihosting: Split out semihost_sys_system

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_SYSTEM to a > reusable function. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/ar

Re: [PATCH v4 38/53] semihosting: Create semihost_sys_{stat,fstat}

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > These syscalls will be used by m68k and nios2 semihosting. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 7 ++ > semihosting/syscal

Re: [PATCH v4 39/53] semihosting: Create semihost_sys_gettimeofday

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > This syscall will be used by m68k and nios2 semihosting. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/sysca

Re: [PATCH v4 38/53] semihosting: Create semihost_sys_{stat,fstat}

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > These syscalls will be used by m68k and nios2 semihosting. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 7 ++ > semihosting/syscal

Re: [PATCH v4 41/53] semihosting: Fix docs comment for qemu_semihosting_console_inc

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > The implementation of qemu_semihosting_console_inc does not > defer to gdbstub, but only reads from the fifo in console.c. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihos

Re: [PATCH v4 42/53] semihosting: Pass CPUState to qemu_semihosting_console_inc

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > We don't need CPUArchState, and we do want the CPUState of the > thread performing the operation -- use this instead of current_cpu. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Luc Miche

Re: [PATCH v4 40/53] gdbstub: Adjust gdb_syscall_complete_cb declaration

2022-06-24 Thread Luc Michel
ed ("TARGET_FMT_ld")", > - __func__, err); > +if (err) { > +qemu_log("%s: gdb console output failed (%d)", __func__, err); While you're at it, this qemu_log() call probably lacks a '\n'. Reviewed-by: Luc Michel > } > }

Re: [PATCH v4 43/53] semihosting: Expand qemu_semihosting_console_inc to read

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Allow more than one character to be read at one time. > Will be used by m68k and nios2 semihosting for stdio. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/console.h | 12 +++

Re: [PATCH v4 44/53] semihosting: Cleanup chardev init

2022-06-24 Thread Luc Michel
which lets us drop > semihosting_get_chardev. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/semihost.h | 13 ++--- > semihosting/config.c | 17 +++-- > semihosting/console.c | 31

Re: [PATCH v4 45/53] semihosting: Create qemu_semihosting_console_write

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Will replace qemu_semihosting_console_{outs,outc}, > but we need more plumbing first. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/console.h | 12 >

Re: [PATCH v4 46/53] semihosting: Add GuestFDConsole

2022-06-27 Thread Luc Michel
iptor > exposed to the guest. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/guestfd.h | 7 ++-- > semihosting/syscalls.c| 68 +++ > 2 files changed, 72 insertions(+), 3 deletions(-) &

Re: [PATCH v4 47/53] semihosting: Create qemu_semihosting_guestfd_init

2022-06-27 Thread Luc Michel
by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/guestfd.h | 7 + > include/semihosting/semihost.h | 1 + > linux-user/main.c | 9 ++ > semihosting/console.c | 2 ++ > semihosting/guestfd.c | 52 ++

Re: [PATCH v4 48/53] semihosting: Use console_in_gf for SYS_READC

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > semihosting/arm-compat-semi.c | 27 ++- > 1 file changed, 18 insertions(+), 9 deletions(-) > > diff --git a/semihosting/a

Re: [PATCH v4 49/53] semihosting: Use console_out_gf for SYS_WRITEC

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > semihosting/arm-compat-semi.c | 20 > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/semihosting/arm-compat-semi.c

Re: [PATCH v4 50/53] semihosting: Remove qemu_semihosting_console_outc

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > This function has been replaced by *_write. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/console.h | 13 - > linux-user/semihost.c | 16 -

Re: [PATCH v4 52/53] semihosting: Remove qemu_semihosting_console_outs

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > This function has been replaced by *_write. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/console.h | 13 -- > linux-user/semihost.c | 17 >

Re: [PATCH v4 51/53] semihosting: Use console_out_gf for SYS_WRITE0

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > semihosting/arm-compat-semi.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/semihosting/arm-compat-semi.c b/semi

Re: [PATCH v4 53/53] semihosting: Create semihost_sys_poll_one

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > This will be used for implementing the xtensa select_one > system call. Choose "poll" over "select" so that we can > reuse Glib's g_poll constants and to avoid struct timeval. > > Signed-off-by: Ric

Re: [PATCH v4 24/53] semihosting: Split out common-semi-target.h

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Move the ARM and RISCV specific helpers into > their own header file. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > target/arm/common-semi-target.h | 62 > target/riscv

Re: [PATCH v4 27/53] semihosting: Split out semihost_sys_open

2022-06-27 Thread Luc Michel
On 08:05 Wed 22 Jun , Richard Henderson wrote: > On 6/22/22 02:35, Luc Michel wrote: > > On 13:45 Tue 07 Jun , Richard Henderson wrote: > > > Split out the non-ARM specific portions of SYS_OPEN to a > > > reusable function. This handles gdb and host file i/o.

Re: [PATCH] accel/tcg/cpu-exec: fix precise single-stepping after interrupt

2022-02-23 Thread Luc Michel
On 14:26 Mon 14 Feb , Luc Michel wrote: > In some cases, cpu->exit_request can be false after handling the > interrupt, leading to another TB being executed instead of returning > to the main loop. > > Fix this by returning true unconditionally when in single-ste

[PATCH] hw/elf_ops.h: switch to ssize_t for elf loader return type

2021-10-06 Thread Luc Michel
emove this limitation. Signed-off-by: Luc Michel --- include/hw/elf_ops.h | 25 +- include/hw/loader.h | 60 ++-- hw/core/loader.c | 60 +++- 3 files changed, 74 insertions(+), 71 deletions(-) di

Re: [PATCH v1 4/6] hw/arm/xlnx-zynqmp: Connect the ZynqMP CRF

2022-02-03 Thread Luc Michel
On 00:12 Mon 31 Jan , Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Connect the ZynqMP CRF - Clock Reset FPD device. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Luc Michel > --- > include/hw/arm/xlnx-zynqmp.h | 2 ++ >

Re: [PATCH v2 5/6] hw/misc: Add a model of the Xilinx ZynqMP APU Control

2022-02-03 Thread Luc Michel
On 15:01 Thu 03 Feb , Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add a model of the Xilinx ZynqMP APU Control. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Luc Michel > --- > include/hw/misc/xlnx-zynqmp-apu-ctrl.h | 95 + &g

Re: [PATCH v1] hw/arm/xlnx-zynqmp: 'Or' the QSPI / QSPI DMA IRQs

2022-02-03 Thread Luc Michel
> is lost and will not reach guest SW). > > Signed-off-by: Francisco Iglesias Reviewed-by: Luc Michel > --- > > Hi, > > I noted this after receiving a review comment (from Peter Maydell) on a > similar > issue on the Versal machine while working on the OSP

Re: [PATCH v2 2/6] target/arm: Make rvbar settable after realize

2022-02-03 Thread Luc Michel
Hi Edgar, Oops I mistakenly answered on v1 :) On 15:01 Thu 03 Feb , Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Make the rvbar property settable after realize. This is done > in preparation to model the ZynqMP's runtime configurable rvbar. > > Signed-off-by: Edgar E. Iglesias

Re: [PATCH v1 2/6] target/arm: Make rvbar settable after realize

2022-02-03 Thread Luc Michel
Hi Edgar, On 00:12 Mon 31 Jan , Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Make the rvbar property settable after realize. This is done > in preparation to model the ZynqMP's runtime configurable rvbar. > > Signed-off-by: Edgar E. Iglesias > --- > target/arm/cpu.c | 7 +++---

Re: [PATCH v1 6/6] hw/arm/xlnx-zynqmp: Connect the ZynqMP APU Control

2022-02-03 Thread Luc Michel
On 00:12 Mon 31 Jan , Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Connect the ZynqMP APU Control device. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Luc Michel > --- > include/hw/arm/xlnx-zynqmp.h | 4 +++- >

Re: [PATCH v2 6/6] hw/arm/xlnx-zynqmp: Connect the ZynqMP APU Control

2022-02-03 Thread Luc Michel
Hi Edgar, On 15:01 Thu 03 Feb , Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Connect the ZynqMP APU Control device. Somehow you don't seem to connect the "wfi_in" pins. I guess it's because currently QEMU ARM CPUs do not expose a "

Re: [PATCH v6 07/12] hw/ssi: Add a model of Xilinx Versal's OSPI flash memory controller

2022-01-18 Thread Luc Michel
Hi Francisco, Impressive beast :-) Nicely done. Maybe I would have split it in a couple of commits to ease review. Also, you can use [diff] orderFile = scripts/git.orderfile as a local config in your QEMU git so that files are placed in a sensible order (.h files will come first), which eas

Re: [PATCH v6 03/12] hw/arm/xlnx-versal: Connect Versal's PMC SLCR

2022-01-18 Thread Luc Michel
On 15:28 Fri 14 Jan , Francisco Iglesias wrote: > Connect Versal's PMC SLCR (system-level control registers) model. > > Signed-off-by: Francisco Iglesias Reviewed-by: Luc Michel > --- > hw/arm/xlnx-versal.c | 71 > +++

Re: [PATCH v6 02/12] hw/arm/xlnx-versal: 'Or' the interrupts from the BBRAM and RTC models

2022-01-18 Thread Luc Michel
On 15:28 Fri 14 Jan , Francisco Iglesias wrote: > Add an orgate and 'or' the interrupts from the BBRAM and RTC models. > > Signed-off-by: Francisco Iglesias > Reviewed-by: Peter Maydell Reviewed-by: Luc Michel > --- > hw/arm/xlnx-versal-virt.c|

  1   2   3   4   5   6   7   >