[PATCH] target/riscv: fix a typo with interrupt names

2021-04-21 Thread Emmanuel Blot
Interrupt names have been swapped in 205377f8 and do not follow IRQ_*_EXT definition order. Signed-off-by: Emmanuel Blot --- target/riscv/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 7d6ed80f6b6..c79503ce967 100644 --- a

[PATCH] target/riscv: fix exception index on instruction access fault

2021-04-16 Thread Emmanuel Blot
When no MMU is used and the guest code attempts to fetch an instruction from an invalid memory location, the exception index defaults to a data load access fault, rather an instruction access fault. Signed-off-by: Emmanuel Blot --- target/riscv/cpu_helper.c | 4 +++- 1 file changed, 3

Re: ld: file not found: _PreallocMode_lookup on macOS Catalina

2020-10-19 Thread Emmanuel Blot
On 19 Oct 2020, at 19:14, Paolo Bonzini wrote: Sorry, I received your email just after I posted mine. > I think this could be the fix. The problem would be that > > awk '$2=="U"{print "-Wl,-u," $1}' / > Great, thanks. Can you check if my patch would also work, as it would > adhere more

Re: ld: file not found: _PreallocMode_lookup on macOS Catalina

2020-10-19 Thread Emmanuel Blot
On 19 Oct 2020, at 18:40, Emmanuel Blot wrote: On 19 Oct 2020, at 17:50, Philippe Mathieu-Daudé wrote: Cc'ing Markus/John/Paolo 604f3e4e90c011a6b94fdc1d13700f3ec2375f2a is the first bad commit commit 604f3e4e90c011a6b94fdc1d13700f3ec2375f2a Applying the reverse diff to the current m

Re: ld: file not found: _PreallocMode_lookup on macOS Catalina

2020-10-19 Thread Emmanuel Blot
On 19 Oct 2020, at 17:50, Philippe Mathieu-Daudé wrote: Cc'ing Markus/John/Paolo I never used `git bisect` up to now, so I might be wronb but it seems the issue would have been introduced with the following commit: 604f3e4e90c011a6b94fdc1d13700f3ec2375f2a is the first bad commit commit 604f

ld: file not found: _PreallocMode_lookup on macOS Catalina

2020-10-19 Thread Emmanuel Blot
Hi, I’m using the current master (ba2a9a9e) I tried to build with both ‘ninja’ and also with ‘make’, as I’m not sure of the current status of the meson refactoring. The build fails with a weird error message: ld: file not found: _PreallocMode_lookup PreallocMode_lookup should be a symbol, sh

Re: Meson build on macOS: undefined symbol treatment

2020-08-31 Thread Emmanuel Blot
On 30 Aug 2020, at 11:35, Paolo Bonzini wrote: This is done by "b_lundef=false". I think it was added for modules, but maybe it's not necessary. Emmanuel, can you try removing it (line 3 of meson.build) and seeing if --enable-modules still works for you? Removing this option does restore t

Re: Issue with submodules on macOS & meson

2020-08-26 Thread Emmanuel Blot
On 26 Aug 2020, at 15:50, Marc-André Lureau wrote: H Marc-André, >> You need to run 'make' (at least once - but still by preference for now). > Submodule handling is done by Makefile. Ok, thanks a lot for this tip.

Issue with submodules on macOS & meson

2020-08-26 Thread Emmanuel Blot
Hi, Using current master 78dca230 w/ Meson/ninja, build fails with capstone dependency. * ../configure --target-list=riscv64-softmmu && ninja fails because capstone is automatically enabled @ configure stage, but capstone is not installed on the host, and the local capstone/ submodule is n

Meson build on macOS: undefined symbol treatment

2020-08-26 Thread Emmanuel Blot
Hi, I’ve noticed that since meson builds have been enabled, on macOS, the build outcome with undefined symbols has changed: - prior to meson introduction (v5.1.0): * referencing an undeclared symbol in source code led to a warning at compile stage * referencing an undeclared symbol at lin

[Qemu-devel] Singlestepping on ARM

2014-08-19 Thread Emmanuel Blot
Hi, I'm trying to trace the execution of an ARM (32 bit) guest, with qemu-system-arm. v2.1.0 I've enabled the -singlestep and -d exec options. It seems that some guest instructions are not traced once they have been traced on the first call, as if the translation blocks were preventing from traci

Re: [Qemu-devel] Single stepping & GDB on ARM

2013-09-17 Thread Emmanuel Blot
> No, it should cause an external abort exception, really. Ok. > It's just nobody's needed it (guest OSes should never do anything > that provokes an external abort unless they're buggy) so nobody's > bothered doing it yet. Understood. Thanks. I'm using QEMU to debug a platform (ARM7TDMI) + OS

[Qemu-devel] Single stepping & GDB on ARM

2013-09-17 Thread Emmanuel Blot
Hi, Is there a way to halt the execution of the VM on the *first* unassigned memory access, and let the guest GDB take over to debug the invalid access? I noticed that cpu_unassigned_access() is not implemented on ARM. Is this a missing feature - yet to be implemented, or something that cannot be

[Qemu-devel] Using GDB with invalid memory access

2013-07-30 Thread Emmanuel Blot
Hi, I'm trying to give the hand back to the target GDB whenever an invalid memory access occurs within the target. I'm using an ARMv4T target w/o MMU with a hardly modified version of QEMU 1.5 QEMU successfully detects invalid memory accesses, and cpu_unassigned_access is invoked. However, I'm no

[Qemu-devel] QEMU 1.5, QOM and composition tree

2013-05-13 Thread Emmanuel Blot
Hi, I'm trying to port an implementation of an ARM-based SoC from QEMU 1.4 to QEMU 1.5. I bumped into the following error: qom/object.c:919:void object_property_add_child(Object *, const char *, Object *, Error **): assertion failed: (child->parent == NULL) which is due to an explicit call to:

Re: [Qemu-devel] QEMU & multithreaded device emulation

2013-01-23 Thread Emmanuel Blot
(I forgot to CC: the list) On Wed, Jan 23, 2013 at 2:16 PM, Emmanuel Blot wrote: >> Today you cannot use cpu_physical_memory_*() from a thread without >> holding the QEMU global mutex. > Ok. I have not looked at this part, which API handles this global mutex? > >> Have yo

[Qemu-devel] QEMU & multithreaded device emulation

2013-01-23 Thread Emmanuel Blot
Hi, I need to emulate a ARM-based SoC that handles a continuous datastream, extracting and injection data with DMA tranfers from/to the guest main memory. I've been using the cpu_physical_memory_* (read/write/map/unmap) functions to perform data transfer, but I'd like to use several dedicated nat

[Qemu-devel] Singlestepping & Target assembly instructions

2012-10-16 Thread Emmanuel Blot
Hi, I'm using QEmu to debug an ARM target (OS-less code). I searched/googled for help on how to trace all instructions executed on the target CPU. Using -singlestep and -d in_asm option switches generate the data I'm looking for, however as the translation blocks are cached, the instructions are

Re: [Qemu-devel] ARM7TDMI support

2012-05-31 Thread Emmanuel Blot
Hi Vinicius, > I'm a new dev/user of QEMU. I was wondering if it supports the > ARM7TDMI/ARM7TDMI-S natively. Is that possible or do I have to apply some > additional patch? I'm wondering it because of those differences related to > Branch instructions and some missing instructions and coprocessor

[Qemu-devel] ARM target w/ self modifying code

2012-04-30 Thread Emmanuel Blot
Hi, I'm porting QEMU (1.0.x) to a new ARM based platform (qemu-system-arm on a x86/64 host) The platform is using an ARM7TDMI core with no cache. Up to now everything was working fine, but I've recently bumped into an issue I have real hard time to solve: The native ARM code is replicating time

Re: [Qemu-devel] Implementing new serial virtual HW w/ redirection

2012-02-22 Thread Emmanuel Blot
On Tue, Feb 21, 2012 at 7:58 AM, Markus Armbruster wrote: >> Any advice would be greatly appreciated, > Hope this helps. Yes, definitely. It works fine, thanks a lot. Now I need to understand why the *qdev.init function is called twice, but it's another issue. Thanks again for your help, Emman

Re: [Qemu-devel] Implementing new serial virtual HW w/ redirection

2012-02-20 Thread Emmanuel Blot
Hi All, > I've looked at several examples on virtual serial port in existing Qemu > drivers, > but I don't know what is the best and simplest way to go. > > Any advice would be greatly appreciated, Any pointer? Should I better ask this kind of questions to another QEmu ML (users, …?) Thanks, Ma

[Qemu-devel] Implementing new serial virtual HW w/ redirection

2012-02-20 Thread Emmanuel Blot
Hi All, I'm new to the ML. I've started to port Qemu to a new HW based on ARM926EJ-S core. So far so good, I've implemented some basic HW (INT controller, System register, UART, …) I'd like to redirect the virtual serial port not to the current default stdin/stdout of the Qemu application, but t