.
Signed-off-by: Julian Ganz
---
accel/tcg/cpu-exec.c | 3 +++
include/qemu/plugin-event.h | 1 +
include/qemu/plugin.h| 4
include/qemu/qemu-plugin.h | 11 +++
plugins/core.c | 12
plugins/qemu-plugins.symbols | 1 +
6 files changed
+0100
Alex Bennée wrote:
>
> Julian Ganz writes:
>
> > Some analysis greatly benefits, or depends on, information about
> > interrupts. For example, we may need to handle the execution of a
> > new translation block differently if it is not the result of normal
>
different architectures the callbacks are
`qemu_plugin_vcpu_simple_cb_t`. That is, they only receive the VCPU id
and may need to call other API functions for retrieving additional
information.
Signed-off-by: Julian Ganz
---
include/qemu/plugin-event.h | 3 +++
include/qemu/qemu-plugi
the (V)IRQ, (VI/VF)NMI, (V)FIQ and VSERR exceptions as interrupts
since they are, presumably, async in nature.
Signed-off-by: Julian Ganz
---
target/arm/helper.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 0a731a38e8
into multiple callbacks
- Added a target-agnostic definition of the relevant event(s)
- Call hooks from architecture-code rather than accel/tcg/cpu-exec.c
- Added a plugin showcasing API usage
Julian Ganz (7):
plugins: add API for registering trap related callbacks
plugins: add hooks fo
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for RISC-V targets.
Signed-off-by: Julian Ganz
only know interrupts.
Signed-off-by: Julian Ganz
---
target/avr/helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/avr/helper.c b/target/avr/helper.c
index 345708a1b3..be94552674 100644
--- a/target/avr/helper.c
+++ b/target/avr/helper.c
@@ -28,6 +28,7 @@
#include "
interrupt other than EXTINT and IVEC as exceptions as they appear to
be synchroneous events. Also note that SPARC targets do not have
semihosting events.
Signed-off-by: Julian Ganz
---
target/sparc/int32_helper.c | 7 +++
target/sparc/int64_helper.c | 10 ++
2 files changed, 17
corresponding hooks called from target
specific code inside qemu.
Signed-off-by: Julian Ganz
---
include/qemu/plugin.h | 12
plugins/core.c| 24
2 files changed, 36 insertions(+)
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index
00..2a38dbb8b3
--- /dev/null
+++ b/contrib/plugins/traps.c
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2024, Julian Ganz
+ *
+ * Traps - count traps
+ *
+ * License: GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include
+
+#include
+
+QEMU_PLUGIN_EXPORT
October 21, 2024 at 8:07 PM, "Pierrick Bouvier" wrote:
> On 10/19/24 09:39, Julian Ganz wrote:
> > + max_vcpus = info->system.max_vcpus;
> > + traps = calloc(max_vcpus, sizeof(TrapCounters));
> >
> Instead of allocating data for max number of vcpu, you can u
Thanks for the quick reply!
October 21, 2024 at 2:58 PM, Peter Maydell wrote:
> This omits M-profile Arm CPUs (whose interrupt/exception
> handling is rather more complicated, and lives in
> m_helper.c.)
Yes, I forgot about the M-profile. I'll include those changes wiith the
next patch-series.
>
Hi, Pierrick,
October 21, 2024 at 8:00 PM, "Pierrick Bouvier" wrote:
> I agree it would be useful. Beyond the scope of this series, it would be
> nice if we could add a control flow related API instead of asking to
> plugins to do it themselves.
>
> If we would provide something like this, is t
Hi, Alex,
October 22, 2024 at 10:58 AM, "Alex Bennée" wrote:
> How easy would it be to expose a Rust API? I'm curious because now we
> are looking to integrate Rust into QEMU we could consider transitioning
> to a Rust API for plugins. It has been done before:
>
> https://github.com/novafacing/q
Hi, Pierrick,
October 21, 2024 at 11:59 PM, "Pierrick Bouvier" wrote:
> On 10/21/24 14:02, Julian Ganz wrote:
> > The motivation for this API is a plugin that simulates a RISC-V tracing
> > unit (and produces a trace). For that we actually also needed to
> > t
Hi, Pierrick,
October 23, 2024 at 5:16 PM, "Pierrick Bouvier" wrote:
>
> Hi Julian,
>
> On 10/23/24 05:56, Julian Ganz wrote:
>
> > October 22, 2024 at 11:15 PM, "Pierrick Bouvier" wrote:
> >
> > >
> > > On 10/22/24 01:21, J
Hi, Pierrick,
resent as I was too stupid to hit reply instead of reply-all.
October 22, 2024 at 11:15 PM, "Pierrick Bouvier" wrote:
>
> On 10/22/24 01:21, Julian Ganz wrote:
>
> >
> > Hi, Pierrick,
> > October 21, 2024 at 11:59 PM, "Pierrick Bouvie
Hi, Pierrick,
October 23, 2024 at 6:39 PM, "Pierrick Bouvier" wrote:
>
> So we could have something like:
>
> /* plugin side */
> void on_cf_event(qemu_plugin_cf_event_type, uint64_t from, uint64_t to) {
> ...
> }
We also need the VCPU id, but yes.
> /* API side */
> void qemu_plugin_register
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for ARM (and Aarch64) targets. We decided to
treat th
The plugin API allows registration of callbacks for a variety of VCPU
related events, such as VCPU reset, idle and resume. In addition to
those events, we recently defined discontinuity events, which include
traps.
This change introduces a function to register callbacks for these
events. We define
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places the hook for AVR targets. That architecture appears
to only
/discons.c
new file mode 100644
index 00..54e52f563a
--- /dev/null
+++ b/tests/tcg/plugins/discons.c
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2024, Julian Ganz
+ *
+ * License: GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include
+
+#include
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for SPARC (32bit and 64bit) targets. We treat
any int
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for MIPS targets.
---
target/mips/tcg/sysemu/tlb_hel
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for Alpha targets.
---
target/alpha/helper.c | 12 ++
The plugin API allows registration of callbacks for a variety of VCPU
related events, such as VCPU reset, idle and resume. However, traps of
any kind, i.e. interrupts or exceptions, were previously not covered.
These kinds of events are arguably quite significant and usually go hand
in hand with a
Since v1:
- Split the one callback into multiple callbacks
- Added a target-agnostic definition of the relevant event(s)
- Call hooks from architecture-code rather than accel/tcg/cpu-exec.c
- Added a plugin showcasing API usage
Julian Ganz (11):
plugins: add types for callbacks relat
The plugin API allows registration of callbacks for a variety of VCPU
related events, such as VCPU reset, idle and resume. In addition, we
recently introduced API for registering callbacks for discontinuity
events, specifically for interrupts, exceptions and host calls.
This change introduces the
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for RISC-V targets.
---
target/riscv/cpu_helper.c |
#x27;lockstep'
diff --git a/contrib/plugins/traps.c b/contrib/plugins/traps.c
new file mode 100644
index 00..ecd4beac5f
--- /dev/null
+++ b/contrib/plugins/traps.c
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2024, Julian Ganz
+ *
+ * Traps - count traps
+ *
+ * License: GNU GPL, version 2 or later
Hi,
I just realized that I forgot to run the checkpatch script on the
patches again before sending and did not include the Sign-Off. Sorry
about that.
Regards,
Julian Ganz
Hi,
December 2, 2024 at 8:26 PM, "Julian Ganz" wrote:
> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
> index 0fba36ae02..9c67374b7e 100644
> --- a/include/qemu/qemu-plugin.h
> +++ b/include/qemu/qemu-plugin.h
> @@ -154,
Hi Pierrick,
December 4, 2024 at 11:41 PM, "Pierrick Bouvier" wrote:
> On 12/3/24 00:45, Julian Ganz wrote:
>
> >
> > Hi,
> > December 2, 2024 at 8:26 PM, "Julian Ganz" wrote:
> >
> > >
> > > diff --git a/include/qem
Hi Pierrick,
December 4, 2024 at 11:45 PM, "Pierrick Bouvier" wrote:
> On 12/2/24 11:26, Julian Ganz wrote:
> > include/qemu/plugin.h | 1 +
> > include/qemu/qemu-plugin.h | 43 ++
> > 2 files changed, 44 insertions(+)
> >
Hi Pierrick,
December 5, 2024 at 12:14 AM, "Pierrick Bouvier" wrote:
> On 12/2/24 11:26, Julian Ganz wrote:
> > +typedef struct {
> > + uint64_t interrupts;
> > + uint64_t exceptions;
> > + uint64_t hostcalls;
> > + bool active;
> >
&g
Hi Pierrick,
December 5, 2024 at 10:50 PM, "Julian Ganz" wrote:
> December 5, 2024 at 6:56 PM, "Pierrick Bouvier" wrote:
> > Let's try to move forward, and solve the problems we have with from_pc. The
> > testing part can be solved already (as explain
Hi Pierrick,
December 5, 2024 at 11:28 PM, "Pierrick Bouvier" wrote:
> On 12/5/24 13:22, Julian Ganz wrote:
> > December 5, 2024 at 6:30 PM, "Pierrick Bouvier" wrote:
> > > We can store the next_expected pc for each instruction (from
> > > curre
Hi Pierrick,
December 6, 2024 at 12:03 AM, "Pierrick Bouvier" wrote:
> On 12/5/24 13:50, Julian Ganz wrote:
> > If you cannot rely on an input being a sensible value, doesn't that
> > render the input useless?
> >
> I agree. If for a specific event it
Hi Pierrick,
December 5, 2024 at 12:33 AM, "Pierrick Bouvier" wrote:
> On 12/2/24 11:41, Julian Ganz wrote:
> > +static void insn_exec(unsigned int vcpu_index, void *userdata)
> > +{
> > + struct cpu_state *state = qemu_plugin_scoreboard_find(states,
>
Hi Pierrick,
December 5, 2024 at 12:33 AM, "Pierrick Bouvier" wrote:
> On 12/2/24 11:41, Julian Ganz wrote:
>
> > +/*
> > + * Copyright (C) 2024, Julian Ganz
> > + *
> > + * License: GNU GPL, version 2 or later.
> > + * S
Hi Pierrick,
December 5, 2024 at 6:30 PM, "Pierrick Bouvier" wrote:
> On 12/5/24 05:10, Julian Ganz wrote:
> > December 5, 2024 at 12:33 AM, "Pierrick Bouvier" wrote:
> > > Trap target PC mismatch
> > > Expected: 23faf3a80
> > > Encount
Hi Pierrick,
December 5, 2024 at 6:56 PM, "Pierrick Bouvier" wrote:
> On 12/5/24 04:40, Julian Ganz wrote:
>
> >
> > Hi Pierrick,
> > December 4, 2024 at 11:41 PM, "Pierrick Bouvier" wrote:
> > > Does it mean that information return
Hi Pierrick,
December 5, 2024 at 6:35 PM, "Pierrick Bouvier" wrote:
> On 12/5/24 04:44, Julian Ganz wrote:
>
> >
> > Hi Pierrick,
> > December 4, 2024 at 11:45 PM, "Pierrick Bouvier" wrote:
> >
> > >
> > > On 12/
Hi Pierrick,
December 6, 2024 at 7:59 PM, "Pierrick Bouvier" wrote:
> On 12/6/24 00:58, Julian Ganz wrote:
> > December 6, 2024 at 12:03 AM, "Pierrick Bouvier" wrote:
> > > It's an interesting conversation. For the scope of this series, I agree
Hi Richard,
December 6, 2024 at 8:42 PM, "Richard Henderson" wrote:
> On 12/6/24 13:02, Pierrick Bouvier wrote:
> > On 12/6/24 00:42, Julian Ganz wrote:
> > > IIUC qemu will schedule interrupts "opportunistically" between tb
> > > executio
Hi Richard,
December 6, 2024 at 11:56 PM, "Richard Henderson" wrote:
> On 12/6/24 14:40, Pierrick Bouvier wrote:
>
> >
> > Do we have an architecture agnostic pc representation, or do we have to add
> > this for every > target in {arch}_cpu_exec_interrupt?
> >
> We have CPUClass.get_pc, which
n the block, we should also suppress IRQs.
>
> Signed-off-by: Alex Bennée
> Cc: Richard Henderson
> Cc: Julian Ganz
> ---
> accel/tcg/translate-all.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/accel/tcg/translate-all.c b/accel/tcg/tran
Hi Alex,
January 9, 2025 at 2:57 PM, "Alex Bennée" wrote:
> Julian Ganz writes:
> > diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
> > index 9c67374b7e..f998a465e5 100644
> > --- a/include/qemu/qemu-plugin.h
> > +++ b/include/qemu
Hi Alex,
January 9, 2025 at 3:04 PM, "Alex Bennée" wrote:
> Julian Ganz writes:
> > We recently introduced new plugin API for registration of discontinuity
> > related callbacks. This change introduces a minimal plugin showcasing
> > the new API. It simply coun
Hi Alex,
Sorry for tha late reply.
January 9, 2025 at 5:33 PM, "Alex Bennée" wrote:
> "Julian Ganz" writes:
>
> (Add Richard to CC)
>
> >
> > Hi Pierrick,
> >
> > December 5, 2024 at 12:33 AM, "Pierrick Bouvier" wrote:
>
Hi Alex,
January 9, 2025 at 2:52 PM, "Alex Bennée" wrote:
> Pierrick Bouvier writes:
> > On 12/2/24 11:26, Julian Ganz wrote:
> > > diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
> > > index 0fba36ae02..9c67374b7e 100644
&g
Hi list,
I messed up the last messages From-address when drafting the mail by
hand. Sorry for the noise.
> Hi David,
>
> It appears you only replied to the qemu-devel list? I just saw this when
> informing a co-worker about this series.
>
>> On 11.05.25 15:14, Julian Ganz wr
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for xtensa targets.
Signed-off-by: Julian Ganz
the (V)IRQ, (VI/VF)NMI, (V)FIQ and VSERR exceptions as interrupts
since they are, presumably, async in nature.
Signed-off-by: Julian Ganz
---
target/arm/helper.c | 24
target/arm/tcg/m_helper.c | 18 ++
2 files changed, 42 insertions(+)
diff --git a
ed to such events. Since possible modes and the
enumeration of interupts and exceptions vary greatly between different
architectures, the callback type only receives the VCPU id, the type of
event as well as the old and new PC.
Signed-off-by: Julian Ganz
---
include/qemu/plugin.h | 1 +
in
address bits via the `compare-addr-bits` option.
Signed-off-by: Julian Ganz
---
tests/tcg/plugins/discons.c | 219 ++
tests/tcg/plugins/meson.build | 2 +-
2 files changed, 220 insertions(+), 1 deletion(-)
create mode 100644 tests/tcg/plugins/discons.c
diff
special "exception" for interrupts and no host calls.
Signed-off-by: Julian Ganz
---
target/loongarch/cpu.c | 4
1 file changed, 4 insertions(+)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index f7535d1be7..d1ed56d15e 100644
--- a/target/loongarch/cpu.c
+++ b/target
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for RISC-V targets.
Signed-off-by: Julian Ganz
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for Motorola 68000 targets.
Signed-off-by: Julian
only know interrupts.
Signed-off-by: Julian Ganz
---
target/avr/helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/avr/helper.c b/target/avr/helper.c
index b9cd6d5ef2..f28cc08637 100644
--- a/target/avr/helper.c
+++ b/target/avr/helper.c
@@ -28,6 +28,7 @@
#include "
corresponding hooks called from target
specific code inside qemu.
Signed-off-by: Julian Ganz
---
include/qemu/plugin.h | 12 ++
plugins/core.c| 53 +++
2 files changed, 65 insertions(+)
diff --git a/include/qemu/plugin.h b/include/qemu
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for Renesas Xtreme targets.
Signed-off-by: Julian
interrupt other than EXTINT and IVEC as exceptions as they appear to
be synchroneous events.
Signed-off-by: Julian Ganz
---
target/sparc/int32_helper.c | 7 +++
target/sparc/int64_helper.c | 10 ++
2 files changed, 17 insertions(+)
diff --git a/target/sparc/int32_helper.c b/target
ltiple callbacks
- Added a target-agnostic definition of the relevant event(s)
- Call hooks from architecture-code rather than accel/tcg/cpu-exec.c
- Added a plugin showcasing API usage
Julian Ganz (23):
plugins: add types for callbacks related to certain discontinuities
plugins: add AP
special "exception" for interrupts and no host calls.
Signed-off-by: Julian Ganz
---
target/microblaze/helper.c | 8
1 file changed, 8 insertions(+)
diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c
index 9203192483..27283c5dc4 100644
--- a/target/microblaz
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for Power PC targets.
Signed-off-by: Julian Ganz
#x27;windows'
# lockstep uses socket.h
contrib_plugins += 'lockstep'
diff --git a/contrib/plugins/traps.c b/contrib/plugins/traps.c
new file mode 100644
index 00..5fa5a853ee
--- /dev/null
+++ b/contrib/plugins/traps.c
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2025, Julian Ganz
define one distinct plugin event type for each type of
discontinuity, granting fine control to plugins in term of which events
they receive.
Signed-off-by: Julian Ganz
---
include/qemu/plugin-event.h | 3 +++
include/qemu/qemu-plugin.h | 16
plugins/core.c | 15
resets, timer and device interrupts as exceptions.
Signed-off-by: Julian Ganz
---
target/openrisc/interrupt.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/target/openrisc/interrupt.c b/target/openrisc/interrupt.c
index 486823094c..08f0ed9b89 100644
--- a/target/openrisc
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places the hook for x86 targets.
Signed-off-by: Julian Ganz
ogram
interrupts" and service calls as exceptions. We treat external and io
"exceptions" as well as resets as interrupts.
Signed-off-by: Julian Ganz
---
target/s390x/tcg/excp_helper.c | 8
1 file changed, 8 insertions(+)
diff --git a/target/s390x/tcg/excp_helper.c b/target/s39
We identified a number of exceptions as interrupts, and we assume any
unknown exception is also an interrupt. HPPA appears to not have any
form of host-call.
This change places the hook for PA-RISC targets.
Signed-off-by: Julian Ganz
---
target/hppa/int_helper.c | 44
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for Alpha targets.
Signed-off-by: Julian Ganz
We do have a number of test-caes for various architectures exercising
their interrupt/exception logic. However, for the recently introduced
trap API we also want to exercise the logic for double traps on at leat
one architecture.
Signed-off-by: Julian Ganz
---
tests/tcg/riscv64/Makefile.softmmu
EXT_INTERRUPT to be asynchronous interrupts rather than
exceptions.
Signed-off-by: Julian Ganz
---
target/mips/tcg/system/tlb_helper.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/target/mips/tcg/system/tlb_helper.c
b/target/mips/tcg/system/tlb_helper.c
index eccaf3624c
interactions on faster machines.
Signed-off-by: Julian Ganz
---
tests/tcg/riscv64/Makefile.softmmu-target | 6 ++
tests/tcg/riscv64/interruptedmemory.S | 67 +++
2 files changed, 73 insertions(+)
create mode 100644 tests/tcg/riscv64/interruptedmemory.S
diff --git a
Hi Rowan,
May 22, 2025 at 5:02 PM, Rowan Hart wrote:
> > Again, what was the reason for moving `qemu_plugin_read_register`?
>
> I moved it so it's grouped with get_registers above instead of being
> separated below the memory functions. I can move it back, just seemed nicer
> that way.
The mov
e_t len)
> return true;
> }
>
> -int qemu_plugin_read_register(struct qemu_plugin_register *reg, GByteArray
> *buf)
> -{
> -g_assert(current_cpu);
> -
> -return gdb_read_register(current_cpu, buf, GPOINTER_TO_INT(reg) - 1);
> -}
> -
Again, what was the reason for moving `qemu_plugin_read_register`?
Reviewed-By: Julian Ganz
Regards,
Julian
Hi Rowan,
> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
> index eff8430b4a..d4f229abd9 100644
> --- a/include/qemu/qemu-plugin.h
> +++ b/include/qemu/qemu-plugin.h
> @@ -1014,6 +1014,102 @@ QEMU_PLUGIN_API
> bool qemu_plugin_write_memory_vaddr(uint64_t addr,
>
In this case maybe one
motivating the change in one or two sentences. It's obvious enough from
context here, but you want at least some context when stumbling accross
a commit in isolation (e.g. after consulting git blame).
Reviewed-By: Julian Ganz
Regards,
Julian
Hi Pierrick,
May 13, 2025 at 12:45 AM, Pierrick Bouvier wrote:
> On 5/11/25 6:13 AM, Julian Ganz wrote:
>
> >
> > We recently introduced new plugin API for registration of discontinuity
> > related callbacks. This change introduces a minimal plugin showcasing
> >
Hi Pierrick,
May 13, 2025 at 2:25 AM, Pierrick Bouvier wrote:
> On 5/11/25 6:14 AM, Julian Ganz wrote:
> > +static void vcpu_discon(qemu_plugin_id_t id, unsigned int vcpu_index,
> > + enum qemu_plugin_discon_type type, uint64_t from_pc,
> > + uint64_t to_pc)
> >
Hi Pierrick,
May 13, 2025 at 9:45 AM, Julian Ganz wrote:
> May 13, 2025 at 2:25 AM, Pierrick Bouvier wrote:
> > [...]
> > + if (trace_all_insns) {
> > + g_autoptr(GString) report = g_string_new(NULL);
> > + g_string_append_printf(report, "Exec insn at %"PRI
Hi Pierrick,
May 20, 2025 at 10:01 PM, Pierrick Bouvier wrote:
> Regarding the issue with the same tb being mapped at different virtual
> addresses, I'm ok with the current solution of comparing only page bits.
>
> That said, a better solution could be to compare physical addresses when a
> dis
define one distinct plugin event type for each type of
discontinuity, granting fine control to plugins in term of which events
they receive.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Julian Ganz
---
include/qemu/plugin-event.h | 3 +++
include/qemu/qemu-plugin.h | 16
plugins
ed to such events. Since possible modes and the
enumeration of interupts and exceptions vary greatly between different
architectures, the callback type only receives the VCPU id, the type of
event as well as the old and new PC.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Julian Ganz
---
in
implemented for this target and it has no host calls.
Signed-off-by: Julian Ganz
---
target/tricore/op_helper.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c
index 9910c13f4b..9bd6ce55d1 100644
--- a/target/tricore/op_helper.c
Signed-off-by: Julian Ganz
---
target/xtensa/exc_helper.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/target/xtensa/exc_helper.c b/target/xtensa/exc_helper.c
index b611c9bf97..fdc522698d 100644
--- a/target/xtensa/exc_helper.c
+++ b/target/xtensa/exc_helper.c
@@ -32,6 +32,7 @@
#include
EXT_INTERRUPT to be asynchronous interrupts rather than
exceptions.
Signed-off-by: Julian Ganz
---
target/mips/tcg/system/tlb_helper.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/target/mips/tcg/system/tlb_helper.c
b/target/mips/tcg/system/tlb_helper.c
index eccaf3624c
interrupt other than EXTINT and IVEC as exceptions as they appear to
be synchroneous events.
Signed-off-by: Julian Ganz
---
target/sparc/int32_helper.c | 7 +++
target/sparc/int64_helper.c | 10 ++
2 files changed, 17 insertions(+)
diff --git a/target/sparc/int32_helper.c b/target
only know interrupts.
Signed-off-by: Julian Ganz
---
target/avr/helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/avr/helper.c b/target/avr/helper.c
index b9cd6d5ef2..f28cc08637 100644
--- a/target/avr/helper.c
+++ b/target/avr/helper.c
@@ -28,6 +28,7 @@
#include "
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for Renesas Xtreme targets.
Signed-off-by: Julian
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for Power PC targets.
Signed-off-by: Julian Ganz
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places the hook for x86 targets.
Signed-off-by: Julian Ganz
Barboza
Reviewed-by: Alistair Francis
Signed-off-by: Julian Ganz
---
target/riscv/cpu_helper.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c
index d5039f69a9..dce7e34cba 100644
--- a/target/riscv/cpu_helper.c
+++ b/target/riscv
special "exception" for interrupts and no host calls.
Signed-off-by: Julian Ganz
---
target/loongarch/cpu.c | 4
1 file changed, 4 insertions(+)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index f7535d1be7..d1ed56d15e 100644
--- a/target/loongarch/cpu.c
+++ b/target
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.
This change places hooks for Motorola 68000 targets.
Signed-off-by: Julian
the (V)IRQ, (VI/VF)NMI, (V)FIQ and VSERR exceptions as interrupts
since they are, presumably, async in nature.
Signed-off-by: Julian Ganz
---
target/arm/helper.c | 24
target/arm/tcg/m_helper.c | 18 ++
2 files changed, 42 insertions(+)
diff --git a
target-agnostic definition of the relevant event(s)
- Call hooks from architecture-code rather than accel/tcg/cpu-exec.c
- Added a plugin showcasing API usage
Julian Ganz (25):
plugins: add types for callbacks related to certain discontinuities
plugins: add API for registering discontinuity c
resets, timer and device interrupts as exceptions.
Signed-off-by: Julian Ganz
---
target/openrisc/interrupt.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/target/openrisc/interrupt.c b/target/openrisc/interrupt.c
index 486823094c..08f0ed9b89 100644
--- a/target/openrisc
1 - 100 of 216 matches
Mail list logo