[PATCH v2 0/2] plugins/execlog: fix segfault and flush output on vcpu exit

Harry van Haaren posted 2 patches 1 week, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260716094126.787556-1-harry.vanhaaren@openchip.com
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, Alexandre Iooss <erdnaxe@crans.org>
contrib/plugins/execlog.c | 88 +++++++++++++++++++--------------------
1 file changed, 43 insertions(+), 45 deletions(-)
[PATCH v2 0/2] plugins/execlog: fix segfault and flush output on vcpu exit
Posted by Harry van Haaren 1 week, 3 days ago
From: Harry van Haaren <harry.vanhaaren@openchip.com>

Hi Qemu-Dev & CCs,

This is my first contribution to QEMU itself, but I have worked on
DPDK, OVS, and QEMU-RS a bit in the past. I have experience with
mailing lists for patches and some QEMU internals.

This is a "git publish" reply to the original patches that weren't in a patchset:
https://patchwork.kernel.org/project/qemu-devel/patch/20260616161242.267315-1-harry.vanhaaren@openchip.com/
https://patchwork.kernel.org/project/qemu-devel/patch/20260616161242.267315-2-harry.vanhaaren@openchip.com/

Thanks for reviews and input, the v2 reworks as follows:
- I expect email to no longer have "| OPENCHIP" in my name, and the email footer removed
- git publish used to send, with "--number 2" to hopefully get a v2 patchset out
- rebased to latest branch, atexit() function signatures changed
- avoid adding mutex for output, rely on QEMUs logging mutex (thanks Pierrick)
--- use single call to log to avoid line-breaks corrupting output

Please note that LLMs were used to investigate and fix this bug,
but all code in this patch has been reviewed by me, and I believe
it to be a good solution.

Regards, -Harry

Harry van Haaren (2):
  plugins/execlog: fix segfault/race-cond on per-vCPU structures
  plugins/execlog: fix execlog vcpu_exit execution print loss

 contrib/plugins/execlog.c | 88 +++++++++++++++++++--------------------
 1 file changed, 43 insertions(+), 45 deletions(-)

-- 
2.54.0

Re: [PATCH v2 0/2] plugins/execlog: fix segfault and flush output on vcpu exit
Posted by Pierrick Bouvier 5 days, 17 hours ago
On 7/16/2026 2:41 AM, Harry van Haaren wrote:
> From: Harry van Haaren <harry.vanhaaren@openchip.com>
> 
> Hi Qemu-Dev & CCs,
> 
> This is my first contribution to QEMU itself, but I have worked on
> DPDK, OVS, and QEMU-RS a bit in the past. I have experience with
> mailing lists for patches and some QEMU internals.
> 
> This is a "git publish" reply to the original patches that weren't in a patchset:
> https://patchwork.kernel.org/project/qemu-devel/patch/20260616161242.267315-1-harry.vanhaaren@openchip.com/
> https://patchwork.kernel.org/project/qemu-devel/patch/20260616161242.267315-2-harry.vanhaaren@openchip.com/
> 
> Thanks for reviews and input, the v2 reworks as follows:
> - I expect email to no longer have "| OPENCHIP" in my name, and the email footer removed
> - git publish used to send, with "--number 2" to hopefully get a v2 patchset out
> - rebased to latest branch, atexit() function signatures changed
> - avoid adding mutex for output, rely on QEMUs logging mutex (thanks Pierrick)
> --- use single call to log to avoid line-breaks corrupting output
> 
> Please note that LLMs were used to investigate and fix this bug,
> but all code in this patch has been reviewed by me, and I believe
> it to be a good solution.
> 
> Regards, -Harry
> 
> Harry van Haaren (2):
>   plugins/execlog: fix segfault/race-cond on per-vCPU structures
>   plugins/execlog: fix execlog vcpu_exit execution print loss
> 
>  contrib/plugins/execlog.c | 88 +++++++++++++++++++--------------------
>  1 file changed, 43 insertions(+), 45 deletions(-)
> 

This was merged into master (3b49fccda43ef0953d1b0e226c7b1d7b64b62dd7).
Thank you for your contribution!

Regards,
Pierrick
Re: [PATCH v2 0/2] plugins/execlog: fix segfault and flush output on vcpu exit
Posted by Pierrick Bouvier 1 week, 2 days ago
On 7/16/2026 2:41 AM, Harry van Haaren wrote:
> From: Harry van Haaren <harry.vanhaaren@openchip.com>
> 
> Hi Qemu-Dev & CCs,
> 
> This is my first contribution to QEMU itself, but I have worked on
> DPDK, OVS, and QEMU-RS a bit in the past. I have experience with
> mailing lists for patches and some QEMU internals.
> 
> This is a "git publish" reply to the original patches that weren't in a patchset:
> https://patchwork.kernel.org/project/qemu-devel/patch/20260616161242.267315-1-harry.vanhaaren@openchip.com/
> https://patchwork.kernel.org/project/qemu-devel/patch/20260616161242.267315-2-harry.vanhaaren@openchip.com/
> 
> Thanks for reviews and input, the v2 reworks as follows:
> - I expect email to no longer have "| OPENCHIP" in my name, and the email footer removed
> - git publish used to send, with "--number 2" to hopefully get a v2 patchset out
> - rebased to latest branch, atexit() function signatures changed
> - avoid adding mutex for output, rely on QEMUs logging mutex (thanks Pierrick)
> --- use single call to log to avoid line-breaks corrupting output
> 
> Please note that LLMs were used to investigate and fix this bug,
> but all code in this patch has been reviewed by me, and I believe
> it to be a good solution.
> 
> Regards, -Harry
> 
> Harry van Haaren (2):
>   plugins/execlog: fix segfault/race-cond on per-vCPU structures
>   plugins/execlog: fix execlog vcpu_exit execution print loss
> 
>  contrib/plugins/execlog.c | 88 +++++++++++++++++++--------------------
>  1 file changed, 43 insertions(+), 45 deletions(-)
> 

For the series:

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Tested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

I'll pull this today.

Regards,
Pierrick
Re: [PATCH v2 0/2] plugins/execlog: fix segfault and flush output on vcpu exit
Posted by Pierrick Bouvier 1 week, 2 days ago
Hi Harry,

On 7/16/2026 2:41 AM, Harry van Haaren wrote:
> From: Harry van Haaren <harry.vanhaaren@openchip.com>
> 
> Hi Qemu-Dev & CCs,
> 
> This is my first contribution to QEMU itself, but I have worked on
> DPDK, OVS, and QEMU-RS a bit in the past. I have experience with
> mailing lists for patches and some QEMU internals.
> 
> This is a "git publish" reply to the original patches that weren't in a patchset:

When sending new version, you should not reply to v1 series, but send a
proper new thread. Not sure if you added some extra parameters to
git-publish, but it should not be needed.

No need to resend that now, but just an information for your future
series :).

> https://patchwork.kernel.org/project/qemu-devel/patch/20260616161242.267315-1-harry.vanhaaren@openchip.com/
> https://patchwork.kernel.org/project/qemu-devel/patch/20260616161242.267315-2-harry.vanhaaren@openchip.com/
> 
> Thanks for reviews and input, the v2 reworks as follows:
> - I expect email to no longer have "| OPENCHIP" in my name, and the email footer removed
> - git publish used to send, with "--number 2" to hopefully get a v2 patchset out
> - rebased to latest branch, atexit() function signatures changed
> - avoid adding mutex for output, rely on QEMUs logging mutex (thanks Pierrick)
> --- use single call to log to avoid line-breaks corrupting output
> 
> Please note that LLMs were used to investigate and fix this bug,
> but all code in this patch has been reviewed by me, and I believe
> it to be a good solution.
> 
> Regards, -Harry
> 
> Harry van Haaren (2):
>   plugins/execlog: fix segfault/race-cond on per-vCPU structures
>   plugins/execlog: fix execlog vcpu_exit execution print loss
> 
>  contrib/plugins/execlog.c | 88 +++++++++++++++++++--------------------
>  1 file changed, 43 insertions(+), 45 deletions(-)
> 

Regards,
Pierrick