This fix has been introduced in v8.1.0, and apparently not backported to earlier versions (I don't know if it is normal or not). So it looks like it affects all Ubuntu versions from at least Jammy 22.04 (I didn't try with an older version) to Mantic 23.10 included. I guess it has not been seen before, because the bug is visible with TCG backend (without KVM) and with Linux kernel >=6.3.
If the plan is to backport the fix in Ubuntu, it looks like it depends on this commit:
cb62bd15e1 ("accel/tcg: Split out cpu_exec_longjmp_cleanup")
Hi Christian,
It took me a bit of time to have everything setup, but I managed to do a "git bisect" to find the fix (I had to switch from GCC-13 to GCC-11):
deba78709a ("accel/tcg: Always lock pages before translation")
https:/ /gitlab. com/qemu- project/ qemu/-/ commit/ deba78709a
This fix has been introduced in v8.1.0, and apparently not backported to earlier versions (I don't know if it is normal or not). So it looks like it affects all Ubuntu versions from at least Jammy 22.04 (I didn't try with an older version) to Mantic 23.10 included. I guess it has not been seen before, because the bug is visible with TCG backend (without KVM) and with Linux kernel >=6.3.
If the plan is to backport the fix in Ubuntu, it looks like it depends on this commit:
cb62bd15e1 ("accel/tcg: Split out cpu_exec_ longjmp_ cleanup" )
https:/ /gitlab. com/qemu- project/ qemu/-/ commit/ cb62bd15e1
And there is a fix as well:
ad17868eb1 ("accel/tcg: Clear tcg_ctx->gen_tb on buffer overflow")
https:/ /gitlab. com/qemu- project/ qemu/-/ commit/ ad17868eb1
There are some conflicts when backporting them to v8.0.4, but it is not blocking. I resolved the conflicts and pushed these 3 commits in this branch:
https:/ /gitlab. com/matttbe/ qemu/-/ commits/ lp-2051965/
Please tell me what else I need to do.