* [PULL 0/1] Plugins update for 2026-06-18
@ 2026-06-18 23:47 Pierrick Bouvier
2026-06-18 23:47 ` [PULL 1/1] plugins: use int64_t for the syscall filter return value Pierrick Bouvier
2026-06-20 12:40 ` [PULL 0/1] Plugins update for 2026-06-18 Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Pierrick Bouvier @ 2026-06-18 23:47 UTC (permalink / raw)
To: qemu-devel, peter.maydell, richard.henderson, pbonzini, stefanha
Cc: pierrick.bouvier
The following changes since commit 3b50303f9563a42538a1fd5c0ea7f952e23016e1:
Merge tag 'accel-20260618' of https://github.com/philmd/qemu into staging (2026-06-18 16:28:12 -0400)
are available in the Git repository at:
https://gitlab.com/p-b-o/qemu tags/pbouvier/pr/plugins-20260618
for you to fetch changes up to 731525c27607bbe392abe3b8be2bce3ab65ae4f5:
plugins: use int64_t for the syscall filter return value (2026-06-18 16:47:12 -0700)
----------------------------------------------------------------
Changes:
- [PATCH v2 0/1] plugins: fix syscall filter return value type (Ziyang Zhang <functioner@sjtu.edu.cn>)
Link: https://lore.kernel.org/qemu-devel/20260618082426.790315-1-functioner@sjtu.edu.cn
----------------------------------------------------------------
Ziyang Zhang (1):
plugins: use int64_t for the syscall filter return value
include/plugins/qemu-plugin.h | 2 +-
include/qemu/plugin.h | 4 ++--
linux-user/syscall.c | 2 +-
plugins/core.c | 2 +-
tests/tcg/plugins/setpc.c | 2 +-
tests/tcg/plugins/syscall.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PULL 1/1] plugins: use int64_t for the syscall filter return value
2026-06-18 23:47 [PULL 0/1] Plugins update for 2026-06-18 Pierrick Bouvier
@ 2026-06-18 23:47 ` Pierrick Bouvier
2026-06-20 12:40 ` [PULL 0/1] Plugins update for 2026-06-18 Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Pierrick Bouvier @ 2026-06-18 23:47 UTC (permalink / raw)
To: qemu-devel, peter.maydell, richard.henderson, pbonzini, stefanha
Cc: pierrick.bouvier
From: Ziyang Zhang <functioner@sjtu.edu.cn>
The syscall return value passed back through the syscall filter
callback is semantically signed: negative values encode errno codes.
Declaring the sysret pointer as uint64_t * is therefore misleading and
forces callers to launder the value through an unsigned temporary.
Change the sysret pointer to int64_t * across the public plugin API
typedef (qemu_plugin_vcpu_syscall_filter_cb_t), the internal
qemu_plugin_vcpu_syscall_filter() prototypes and stub, its
implementation in plugins/core.c, the linux-user caller, and the
in-tree example plugins.
Signed-off-by: Ziyang Zhang <functioner@sjtu.edu.cn>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260618082426.790315-2-functioner@sjtu.edu.cn
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
---
include/plugins/qemu-plugin.h | 2 +-
include/qemu/plugin.h | 4 ++--
linux-user/syscall.c | 2 +-
plugins/core.c | 2 +-
tests/tcg/plugins/setpc.c | 2 +-
tests/tcg/plugins/syscall.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h
index d8d4b373842..3e913cd89ce 100644
--- a/include/plugins/qemu-plugin.h
+++ b/include/plugins/qemu-plugin.h
@@ -871,7 +871,7 @@ typedef bool
int64_t num, uint64_t a1, uint64_t a2,
uint64_t a3, uint64_t a4, uint64_t a5,
uint64_t a6, uint64_t a7, uint64_t a8,
- uint64_t *sysret,
+ int64_t *sysret,
void *userdata);
/**
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index 9356ee836ac..9c2ec8ceaeb 100644
--- a/include/qemu/plugin.h
+++ b/include/qemu/plugin.h
@@ -172,7 +172,7 @@ bool
qemu_plugin_vcpu_syscall_filter(CPUState *cpu, int64_t num, uint64_t a1,
uint64_t a2, uint64_t a3, uint64_t a4,
uint64_t a5, uint64_t a6, uint64_t a7,
- uint64_t a8, uint64_t *sysret);
+ uint64_t a8, int64_t *sysret);
void qemu_plugin_vcpu_mem_cb(CPUState *cpu, uint64_t vaddr,
uint64_t value_low,
@@ -288,7 +288,7 @@ static inline bool
qemu_plugin_vcpu_syscall_filter(CPUState *cpu, int64_t num, uint64_t a1,
uint64_t a2, uint64_t a3, uint64_t a4,
uint64_t a5, uint64_t a6, uint64_t a7,
- uint64_t a8, uint64_t *sysret)
+ uint64_t a8, int64_t *sysret)
{
return false;
}
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index fbe357b7e0f..d257fb9ca90 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -14619,7 +14619,7 @@ static bool send_through_syscall_filters(CPUState *cpu, int num,
abi_long arg7, abi_long arg8,
abi_long *sysret)
{
- uint64_t sysret64 = 0;
+ int64_t sysret64 = 0;
bool filtered = qemu_plugin_vcpu_syscall_filter(cpu, num, arg1, arg2,
arg3, arg4, arg5, arg6,
arg7, arg8, &sysret64);
diff --git a/plugins/core.c b/plugins/core.c
index 4b55aacd2d7..1113bfe5673 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -573,7 +573,7 @@ bool
qemu_plugin_vcpu_syscall_filter(CPUState *cpu, int64_t num, uint64_t a1,
uint64_t a2, uint64_t a3, uint64_t a4,
uint64_t a5, uint64_t a6, uint64_t a7,
- uint64_t a8, uint64_t *sysret)
+ uint64_t a8, int64_t *sysret)
{
struct qemu_plugin_cb *cb, *next;
enum qemu_plugin_event ev = QEMU_PLUGIN_EV_VCPU_SYSCALL_FILTER;
diff --git a/tests/tcg/plugins/setpc.c b/tests/tcg/plugins/setpc.c
index 7c78f182f01..76b2efc61b2 100644
--- a/tests/tcg/plugins/setpc.c
+++ b/tests/tcg/plugins/setpc.c
@@ -27,7 +27,7 @@ static bool vcpu_syscall_filter(unsigned int vcpu_index,
int64_t num, uint64_t a1, uint64_t a2,
uint64_t a3, uint64_t a4, uint64_t a5,
uint64_t a6, uint64_t a7, uint64_t a8,
- uint64_t *sysret, void *userdata)
+ int64_t *sysret, void *userdata)
{
if (num == MAGIC_SYSCALL) {
if (a1 == SETPC) {
diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c
index a28d1087840..debec9f09b5 100644
--- a/tests/tcg/plugins/syscall.c
+++ b/tests/tcg/plugins/syscall.c
@@ -176,7 +176,7 @@ static bool vcpu_syscall_filter(unsigned int vcpu_index,
int64_t num, uint64_t a1, uint64_t a2,
uint64_t a3, uint64_t a4, uint64_t a5,
uint64_t a6, uint64_t a7, uint64_t a8,
- uint64_t *sysret, void *userdata)
+ int64_t *sysret, void *userdata)
{
/* Special syscall to test the filter functionality. */
if (num == 4096 && a1 == 0x66CCFF) {
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PULL 0/1] Plugins update for 2026-06-18
2026-06-18 23:47 [PULL 0/1] Plugins update for 2026-06-18 Pierrick Bouvier
2026-06-18 23:47 ` [PULL 1/1] plugins: use int64_t for the syscall filter return value Pierrick Bouvier
@ 2026-06-20 12:40 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2026-06-20 12:40 UTC (permalink / raw)
To: Pierrick Bouvier
Cc: qemu-devel, peter.maydell, richard.henderson, pbonzini, stefanha,
pierrick.bouvier
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.1 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-20 13:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 23:47 [PULL 0/1] Plugins update for 2026-06-18 Pierrick Bouvier
2026-06-18 23:47 ` [PULL 1/1] plugins: use int64_t for the syscall filter return value Pierrick Bouvier
2026-06-20 12:40 ` [PULL 0/1] Plugins update for 2026-06-18 Stefan Hajnoczi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.