Hi all, this is my first post to the mailing list! I've spent the last
couple weeks building QEMU Rust crates to enable a couple goals:
- Install QEMU binaries using cargo, the Rust package manager
- Use git-latest QEMU binaries in Rust projects as a dependency
- Write QEMU TCG plugins entirely in
Signed-off-by: Rowan Hart
---
docs/about/emulation.rst | 16 -
include/qemu/qemu-plugin.h | 24 +++-
plugins/api.c| 21 +++
plugins/qemu-plugins.symbols | 1 +
tests/tcg/plugins/mem.c | 37 +++-
tests/tcg/plugins/syscall.c | 113
Alex & Pierrick,
Thank you for the feedback! This is my first contribution to QEMU, so I'm glad
it at least passes the initial smell test :)
> I'll make my comments in this patch, but for v2, please split those individual
> commits, and a cover letter, describing your changes (https://github.com/
Alex,
Thanks for the additional information.
>>
>> A key aspect of what you propose here, is that the memory may have
>> changed during the write time, and when you read it, while what we
>> propose guarantees to track every change correctly.
>>
>> It's not a bad thing, and both API are definitel
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 32 +++-
plugins/api.c| 20
plugins/qemu-plugins.symbols | 1 +
3 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu
)
* Accurate and easier execution trace extraction
* Debugging and logging tools
An example of its use is added to the existing syscalls plugin,
which now has an option to hexdump the buf argument to any write(2)
syscalls which occur.
Rowan Hart (2):
plugins: add plugin API to read guest memory
Signed-off-by: Rowan Hart
---
docs/about/emulation.rst| 14 -
tests/tcg/plugins/syscall.c | 117
2 files changed, 130 insertions(+), 1 deletion(-)
diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst
index eea1261baa..e85d494ff0 100644
Signed-off-by: Rowan Hart
Reviewed-by: Pierrick Bouvier
---
include/qemu/qemu-plugin.h | 32 +++-
plugins/api.c| 20
plugins/qemu-plugins.symbols | 1 +
3 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/include
doc build issue.
Rowan Hart (2):
plugins: add plugin API to read guest memory
plugins: add option to dump write argument to syscall plugin
docs/about/emulation.rst | 14 -
include/qemu/qemu-plugin.h | 32 +-
plugins/api.c| 20 ++
plugins/qemu-plugi
Signed-off-by: Rowan Hart
Reviewed-by: Pierrick Bouvier
Tested-by: Pierrick Bouvier
---
docs/about/emulation.rst| 14 -
tests/tcg/plugins/syscall.c | 117
2 files changed, 130 insertions(+), 1 deletion(-)
diff --git a/docs/about/emulation.rst b
00 00 00 00 00 00 00 00 00 00 00 00 00 |
Hello, RISC-V!
Rowan Hart (1):
plugins: add API to read guest CPU memory from hwaddr
include/qemu/qemu-plugin.h | 22 ++
plugins/api.c| 17 +
plugins/qemu-plugins.symbols | 2 ++
3
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 22 ++
plugins/api.c| 17 +
plugins/qemu-plugins.symbols | 2 ++
3 files changed, 41 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index
> + qemu_plugin_read_cpu_memory_hwaddr;
> + qemu_plugin_read_io_memory_hwaddr;
This second symbol name should be removed, I initially wanted to implement
for IO as well but there is no good generic way I can see to access a list
of IO AddressSpace to read from.
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 22 ++
plugins/api.c| 17 +
plugins/qemu-plugins.symbols | 1 +
3 files changed, 40 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index
00 00 00 00 00 00 00 00 00 00 00 00 00 |
Hello, RISC-V!
For v2, removes a symbol left in qemu-plugins.symbols accidentally.
Rowan Hart (1):
plugins: add API to read guest CPU memory from hwaddr
include/qemu/qemu-plugin.h | 22 ++
plugins/
>
> See:
>
> tests/tcg/i386/system/boot.S
> tests/tcg/alpha/system/boot.S
> tests/tcg/loongarch64/system/boot.S
> tests/tcg/aarch64/system/boot.S
> tests/tcg/x86_64/system/boot.S
> tests/tcg/arm/system/boot.S
>
> for what is needed (basically a MMU-enabled flat memory map and some
>
From: novafacing
---
include/qemu/qemu-plugin.h | 116 +
plugins/api.c | 66 -
2 files changed, 168 insertions(+), 14 deletions(-)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index 0fba36ae02..b812593
This patch set follows a previous patch which added the
qemu_plugin_read_memory_vaddr function and adds a set of similar
functions to read and write registers, virtual memory, and
physical memory.
The use case I have in mind is for use of QEMU for program analysis and
testing. For example, a fuzze
tests/tcg/plugins/inject.c
create mode 100644 tests/tcg/x86_64/inject-target.c
diff --git a/tests/tcg/plugins/inject.c b/tests/tcg/plugins/inject.c
new file mode 100644
index 00..9edc2cd34e
--- /dev/null
+++ b/tests/tcg/plugins/inject.c
@@ -0,0 +1,206 @@
+/*
+ * Copyright (C) 2024, Rowan
From: novafacing
---
gdbstub/gdbstub.c | 2 +-
include/exec/gdbstub.h | 14 ++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index b1def7e71d..7d87a3324c 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -536,7 +536
This patch set follows a previous patch which added the
qemu_plugin_read_memory_vaddr function and adds a set of similar
functions to read and write registers, virtual memory, and
physical memory.
The use case I have in mind is for use of QEMU for program analysis and
testing. For example, a fuzze
From: novafacing
---
gdbstub/gdbstub.c | 2 +-
include/exec/gdbstub.h | 14 ++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index b1def7e71d..7d87a3324c 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -536,7 +536
From: novafacing
---
include/qemu/qemu-plugin.h | 116 +
plugins/api.c | 66 -
2 files changed, 168 insertions(+), 14 deletions(-)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index 0fba36ae02..b812593
>> +++ b/tests/tcg/plugins/inject.c
>
> Could we find a better name?
For sure, maybe "hypercalls.c" since that's really what it's mostly about.
>> @@ -0,0 +1,206 @@
>> +/*
>> + * Copyright (C) 2024, Rowan Hart
>> + *
>> + * Licen
> I am personally in favor to adding such features in upstream QEMU, but we
> should discuss it with the maintainers, because it would allow to change the
> state of execution, which is something qemu plugins actively didn't try to
> do. It's a real paradigm shift for plugins.
>
> By writing to
From: novafacing
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 21 +
plugins/api.c | 18 ++
2 files changed, 39 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index
This patch series adds several new API functions focused on enabling use
cases around reading and writing guest memory from QEMU plugins. To support
these new APIs, some utility functionality around retrieving information about
address spaces is added as well.
The new qemu_plugin_write_register ut
From: novafacing
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 96 +++
plugins/api.c | 100 +
2 files changed, 196 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b
From: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index d4f229abd9..4cf2955560 100644
--- a/include/qemu/qemu-plugin.h
+++ b/include
From: novafacing
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
tests/tcg/Makefile.target | 1 +
tests/tcg/plugins/meson.build | 2 +-
tests/tcg/plugins/patch.c | 324 ++
tests/tcg/x86_64/Makefile.softmmu-target
From: novafacing
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/plugin.h | 6 +++
include/qemu/qemu-plugin.h | 45 ++
plugins/api.c | 79 ++
3 files changed, 130 insertions(+)
diff --git a
From: novafacing
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
tests/tcg/Makefile.target | 1 +
tests/tcg/plugins/hypercalls.c| 552 ++
tests/tcg/plugins/meson.build | 2 +-
tests/tcg/x86_64/Makefile.softmmu
From: novafacing
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
gdbstub/gdbstub.c | 2 +-
include/exec/gdbstub.h | 14 ++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index 565f6b33a9..5846e481be 100644
--- a
From: novafacing
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 57 +-
plugins/api.c | 26 -
2 files changed, 56 insertions(+), 27 deletions(-)
diff --git a/include/qemu/qemu-plugin.h b
Hi Julian,
> 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.
-Rowan
On Thu, May 22, 2025, 4:59 AM Julian Ganz wrote:
>
> a) handle the QEMU_PLUGIN_CB_RW_REGS
I missed that this was not already handled. I'll fix that.
> b) try and enforce we are only being called from such callbacks
Sure, beyond documentation I suppose we can add and check a flag to ensure
this. I think it's a good idea to reduce foot guns from
>
>
> > This definition strikes me as odd. What was your reason to assert
> > `current_cpu` here, but not in the other two functions? Also a bit
> > surprising is the declaration of `cpu` if you use it in just one place
> > (rather than just use `current_cpu` directly as for the assertion).
> >
> >
Well, first I just noticed that I left a debug print in this function!
So I'll fix that.
Reading this patch, and patch 3 (Add address space API), I am not sure
AddressSpace is something we want to leak in plugins interface.
It is a concept *very* internal to QEMU, and not reflecting directly
s
From: novafacing
This patch adds a plugin that implements a simple form of hypercalls
from guest code to the plugin by using the register read API. It accepts
only one hypercall, which writes a magic value to guest memory.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
tests/tcg
: novafacing
Signed-off-by: Rowan Hart
---
tests/tcg/Makefile.target | 1 +
tests/tcg/plugins/meson.build | 2 +-
tests/tcg/plugins/patch.c | 302 ++
tests/tcg/x86_64/Makefile.softmmu-target | 32 ++-
tests/tcg/x86_64/system/patch
flags are enforced and qemu_plugin_read_register
can no longer be called from a vcpu_init callback because it does not
request the QEMU_PLUGIN_CB_ flag (nor does it have a mechanism to do
so).
Signed-off-by: Rowan Hart
---
tests/tcg/plugins/insn.c | 22 +-
1 file changed, 1
functions (in particular, the register read and write API)
will call qemu_plugin_get_cb_flags() to check the level is at least the
level they require.
Signed-off-by: Rowan Hart
---
accel/tcg/plugin-gen.c | 27 +
include/qemu/plugin.h | 12
include/qemu/qemu-plugin.h
to
permit a specified address space, for example to facilitate
architecture-specific plugins that want to operate on them, for example
reading ARM secure memory.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 93
plugins
of these functions in the future if we change our minds!
Rowan Hart (2):
plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W
callbacks
plugins: Remove use of qemu_plugin_read_register where it is not
permitted
novafacing (7):
gdbstub: Expose gdb_write_register functio
x27;t currently
in the context of the plugin.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 21 +
plugins/api.c | 18 ++
2 files changed, 39 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu
From: novafacing
This patch adds a function to the plugins API to allow plugins to write
register contents. It also moves the qemu_plugin_read_register function
so all the register-related functions are grouped together in the file.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
From: novafacing
This patch exposes the gdb_write_register function from
gdbstub/gdbstub.c via the exec/gdbstub.h header file to support use in
plugins to write register contents.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
gdbstub/gdbstub.c | 2 +-
include/exec/gdbstub.h
From: novafacing
This patch updates the plugin version to gate new APIs and adds notes
describing what has been added.
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu
From: novafacing
This patch adds a function to the plugins API to allow plugins to write
register contents. It also moves the qemu_plugin_read_register function
so all the register-related functions are grouped together in the file.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
flags are enforced and qemu_plugin_read_register
can no longer be called from a vcpu_init callback because it does not
request the QEMU_PLUGIN_CB_ flag (nor does it have a mechanism to do
so).
Signed-off-by: Rowan Hart
---
tests/tcg/plugins/insn.c | 22 +-
1 file changed, 1
functions (in particular, the register read and write API)
will call qemu_plugin_get_cb_flags() to check the level is at least the
level they require.
Signed-off-by: Rowan Hart
---
accel/tcg/plugin-gen.c | 30 ++
include/hw/core/cpu.h | 1 +
include/qemu/plugin.h
: novafacing
Signed-off-by: Rowan Hart
---
tests/tcg/Makefile.target | 1 +
tests/tcg/plugins/meson.build | 2 +-
tests/tcg/plugins/patch.c | 302 ++
tests/tcg/x86_64/Makefile.softmmu-target | 32 ++-
tests/tcg/x86_64/system/patch
rsions of these functions in the future if we change our minds!
For v4, I've just updated the enforcement of the QEMU_PLUGIN_CB_ flags to just
use immediate stores, which simplifies the implementation quite a lot and
should be more efficient too. Thanks Pierrick for the suggestion!
From: novafacing
This patch adds a plugin that implements a simple form of hypercalls
from guest code to the plugin by using the register read API. It accepts
only one hypercall, which writes a magic value to guest memory.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
tests/tcg
to
permit a specified address space, for example to facilitate
architecture-specific plugins that want to operate on them, for example
reading ARM secure memory.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 93
plugins
x27;t currently
in the context of the plugin.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 21 +
plugins/api.c | 18 ++
2 files changed, 39 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu
x27;t currently
in the context of the plugin.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 21 +
plugins/api.c | 18 ++
2 files changed, 39 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu
From: novafacing
This patch updates the plugin version to gate new APIs and adds notes
describing what has been added.
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu
flags are enforced and qemu_plugin_read_register
can no longer be called from a vcpu_init callback because it does not
request the QEMU_PLUGIN_CB_ flag (nor does it have a mechanism to do
so).
Signed-off-by: Rowan Hart
---
tests/tcg/plugins/insn.c | 22 +-
1 file changed, 1
a formatting pass, I left some whitespace that needed removal, some
license text was wrong, and so forth.
Rowan Hart (2):
plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W
callbacks
plugins: Remove use of qemu_plugin_read_register where it is not
permitted
nov
functions (in particular, the register read and write API)
will call qemu_plugin_get_cb_flags() to check the level is at least the
level they require.
Signed-off-by: Rowan Hart
---
accel/tcg/plugin-gen.c | 30 ++
include/hw/core/cpu.h | 1 +
include/qemu/plugin.h
From: novafacing
This patch adds a plugin that implements a simple form of hypercalls
from guest code to the plugin by using the register read API. It accepts
only one hypercall, which writes a magic value to guest memory.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
tests/tcg
From: novafacing
This patch adds a function to the plugins API to allow plugins to write
register contents. It also moves the qemu_plugin_read_register function
so all the register-related functions are grouped together in the file.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
From: novafacing
This patch updates the plugin version to gate new APIs and adds notes
describing what has been added.
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu
From: novafacing
This patch exposes the gdb_write_register function from
gdbstub/gdbstub.c via the exec/gdbstub.h header file to support use in
plugins to write register contents.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
gdbstub/gdbstub.c | 2 +-
include/exec/gdbstub.h
: novafacing
Signed-off-by: Rowan Hart
---
tests/tcg/Makefile.target | 1 +
tests/tcg/plugins/meson.build | 2 +-
tests/tcg/plugins/patch.c | 297 ++
tests/tcg/x86_64/Makefile.softmmu-target | 32 ++-
tests/tcg/x86_64/system/patch
From: novafacing
This patch exposes the gdb_write_register function from
gdbstub/gdbstub.c via the exec/gdbstub.h header file to support use in
plugins to write register contents.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
gdbstub/gdbstub.c | 2 +-
include/exec/gdbstub.h
to
permit a specified address space, for example to facilitate
architecture-specific plugins that want to operate on them, for example
reading ARM secure memory.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 93
plugins
From: novafacing
This patch adds a function to the plugins API to allow plugins to write
register contents. It also moves the qemu_plugin_read_register function
so all the register-related functions are grouped together in the file.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
Reviewed
: novafacing
Signed-off-by: Rowan Hart
---
tests/tcg/Makefile.target | 1 +
tests/tcg/plugins/meson.build | 2 +-
tests/tcg/plugins/patch.c | 297 ++
tests/tcg/x86_64/Makefile.softmmu-target | 32 ++-
tests/tcg/x86_64/system/patch
functions (in particular, the register read and write API)
will call qemu_plugin_get_cb_flags() to check the level is at least the
level they require.
Signed-off-by: Rowan Hart
---
accel/tcg/plugin-gen.c | 30 ++
include/hw/core/cpu.h | 1 +
include/qemu/plugin.h
From: novafacing
This patch updates the plugin version to gate new APIs and adds notes
describing what has been added.
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu
From: novafacing
This patch adds a plugin that implements a simple form of hypercalls
from guest code to the plugin by using the register read API. It accepts
only one hypercall, which writes a magic value to guest memory.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
---
tests/tcg
a formatting pass, I left some whitespace that needed removal, some
license text was wrong, and so forth.
Rowan Hart (2):
plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W
callbacks
plugins: Remove use of qemu_plugin_read_register where it is not
permitted
nov
x27;t currently
in the context of the plugin.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 21 +
plugins/api.c | 18 ++
2 files changed, 39 insertions(+)
flags are enforced and qemu_plugin_read_register
can no longer be called from a vcpu_init callback because it does not
request the QEMU_PLUGIN_CB_ flag (nor does it have a mechanism to do
so).
Signed-off-by: Rowan Hart
---
tests/tcg/plugins/insn.c | 22 +-
1 file changed, 1
From: novafacing
This patch exposes the gdb_write_register function from
gdbstub/gdbstub.c via the exec/gdbstub.h header file to support use in
plugins to write register contents.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
Reviewed-by: Alex Benée
Reviewed-by: Julian Ganz
Reviewed
@@ -437,6 +437,10 @@ int qemu_plugin_read_register(struct
qemu_plugin_register *reg, GByteArray *buf)
{
g_assert(current_cpu);
+ if (qemu_plugin_get_cb_flags() == QEMU_PLUGIN_CB_NO_REGS) {
+ return -1;
+ }
+
return gdb_read_register(current_cpu, buf, GPOINTER_TO_INT
to
permit a specified address space, for example to facilitate
architecture-specific plugins that want to operate on them, for example
reading ARM secure memory.
Signed-off-by: novafacing
Signed-off-by: Rowan Hart
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
include/qemu/qemu
x27;t currently
in the context of the plugin.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 21 +
plugins/api.c | 18 ++
2 files changed, 39 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu
: Rowan Hart
---
tests/tcg/Makefile.target | 7 +-
tests/tcg/plugins/meson.build | 2 +-
tests/tcg/plugins/patch.c | 241 ++
tests/tcg/x86_64/Makefile.softmmu-target | 7 +
tests/tcg/x86_64/system/patch-target.c| 22 ++
tests
From: novafacing
This patch adds a function to the plugins API to allow plugins to write
register contents. It also moves the qemu_plugin_read_register function
so all the register-related functions are grouped together in the file.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
functions (in particular, the register read and write API)
will call qemu_plugin_get_cb_flags() to check the level is at least the
level they require.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
accel/tcg/plugin-gen.c | 30 ++
include/hw/core/cpu.h
From: novafacing
This patch exposes the gdb_write_register function from
gdbstub/gdbstub.c via the exec/gdbstub.h header file to support use in
plugins to write register contents.
Reviewed-by: Alex Bennée
Reviewed-by: Julian Ganz
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
to
permit a specified address space, for example to facilitate
architecture-specific plugins that want to operate on them, for example
reading ARM secure memory.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 93
ch.so only runs with the patch
test.
Rowan Hart (1):
plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W
callbacks
novafacing (6):
gdbstub: Expose gdb_write_register function to consumers of gdbstub
plugins: Add register write API
plugins: Add memory virtual address write
From: novafacing
This patch updates the plugin version to gate new APIs and adds notes
describing what has been added.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include
I've updated this patch to address some notes about the build/test
configuration for the patch plugin. Please check
https://lore.kernel.org/qemu-devel/20250619161547.1401448-1-rowanbh...@gmail.com/T/#t
instead.
On 6/11/25 4:24 PM, Rowan Hart wrote:
This patch series adds several ne
-off-by: Rowan Hart
---
tests/tcg/Makefile.target | 7 +-
tests/tcg/plugins/meson.build | 2 +-
tests/tcg/plugins/patch.c | 241 ++
tests/tcg/x86_64/Makefile.softmmu-target | 7 +
tests/tcg/x86_64/system/patch-target.c| 22
This patch updates the plugin version to gate new APIs and adds notes
describing what has been added.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/qemu/qemu-plugin.h b
This patch adds a function to the plugins API to allow plugins to write
register contents. It also moves the qemu_plugin_read_register function
so all the register-related functions are grouped together in the file.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
include/qemu/qemu
ntext of the plugin.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 21 +
plugins/api.c | 18 ++
2 files changed, 39 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
The x86_64-softmmu Makefile seems to have been copy-pasted from the i386
Makefile at some point in the past. Cleaning up a vestigial unused
variable and removing some outdated comments.
Signed-off-by: Rowan Hart
---
tests/tcg/x86_64/Makefile.softmmu-target | 12 +---
1 file changed, 5
specified address space, for example to facilitate
architecture-specific plugins that want to operate on them, for example
reading ARM secure memory.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 93
plugins/api.c
make[1]: *** No rule to make target 'patch-target', needed by
'run-plugin-patch-target-with-libpatch.so'. Stop.
make: *** [/home/alex/lsrc/qemu.git/tests/Makefile.include:56:
run-tcg-tests-x86_64-softmmu] Error 2
You need to ensure vpath is set, something like:
Thanks for the note Alex.
functions (in particular, the register read and write API)
will call qemu_plugin_get_cb_flags() to check the level is at least the
level they require.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
accel/tcg/plugin-gen.c | 30 ++
include/hw/core/cpu.h
This patch exposes the gdb_write_register function from
gdbstub/gdbstub.c via the exec/gdbstub.h header file to support use in
plugins to write register contents.
Reviewed-by: Alex Bennée
Reviewed-by: Julian Ganz
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
gdbstub/gdbstub.c
My main concern about the long list of caveats for writing memory is the
user will almost certainly cause weird things to happen which will then
be hard to debug. I can see the patcher example however it would be
useful to know what other practical uses this interface provides.
Of course! My main
From: novafacing
This patch adds a function to the plugins API to allow plugins to write
register contents. It also moves the qemu_plugin_read_register function
so all the register-related functions are grouped together in the file.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
x27;t currently
in the context of the plugin.
Reviewed-by: Pierrick Bouvier
Signed-off-by: Rowan Hart
---
include/qemu/qemu-plugin.h | 21 +
plugins/api.c | 18 ++
2 files changed, 39 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu
1 - 100 of 151 matches
Mail list logo