* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
@ 2026-04-24 16:22 elisey.konstantinov
2026-04-24 20:02 ` Paolo Bonzini
0 siblings, 1 reply; 21+ messages in thread
From: elisey.konstantinov @ 2026-04-24 16:22 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, peter.maydell, philmd, berrange, marcandre.lureau
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
A special thanks for the patch; I’ll definitely give it a go, though I’m not sure about x86, as the bug doesn’t occur on x86This patch should work on PPC as well, shouldn’t it?
[-- Attachment #2: Type: text/html, Size: 338 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 16:22 [PATCH] build: prefer sigaltstack over ucontext on Linux elisey.konstantinov
@ 2026-04-24 20:02 ` Paolo Bonzini
0 siblings, 0 replies; 21+ messages in thread
From: Paolo Bonzini @ 2026-04-24 20:02 UTC (permalink / raw)
To: elisey.konstantinov
Cc: qemu-devel, peter.maydell, philmd, berrange, marcandre.lureau
On Fri, Apr 24, 2026 at 6:22 PM elisey.konstantinov
<elisey.konstantinov@gmail.com> wrote:
>
> A special thanks for the patch; I’ll definitely give it a go, though I’m not sure about x86, as the bug doesn’t occur on x86
> This patch should work on PPC as well, shouldn’t it?
The patch is for x86 hosts, and any guest including PPC.
Paolo
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
@ 2026-04-27 15:30 elisey.konstantinov
2026-04-29 13:46 ` Daniel P. Berrangé
0 siblings, 1 reply; 21+ messages in thread
From: elisey.konstantinov @ 2026-04-27 15:30 UTC (permalink / raw)
To: Fabiano Rosas
Cc: philmd, peter.maydell, marcandre.lureau, pbonzini, berrange,
mark.cave-ayland, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 159 bytes --]
Yeah, this sounds weird, could you please test on the old distribution, like Debian 12?See three of my latest messages in the main thread for more information
[-- Attachment #2: Type: text/html, Size: 334 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-27 15:30 elisey.konstantinov
@ 2026-04-29 13:46 ` Daniel P. Berrangé
0 siblings, 0 replies; 21+ messages in thread
From: Daniel P. Berrangé @ 2026-04-29 13:46 UTC (permalink / raw)
To: elisey.konstantinov
Cc: Fabiano Rosas, philmd, peter.maydell, marcandre.lureau, pbonzini,
mark.cave-ayland, qemu-devel
On Mon, Apr 27, 2026 at 06:30:56PM +0300, elisey.konstantinov wrote:
> Yeah, this sounds weird, could you please test on the old distribution,
> like Debian 12?See three of my latest messages in the main thread for
> more information
Note, as upstream maintainers we don't generally have the resources to
troubleshoot older distribution packages. If something only reproduces
on distro packages, not QEMU git master, then it needs to be reported
to the relevant OS distro bug tracker and the downsteam maintainer(s)
need to take responsibility for it.
With regards,
Daniel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
@ 2026-04-27 8:12 Elisey Konstantinov
2026-04-27 8:18 ` Elisey Konstantinov
0 siblings, 1 reply; 21+ messages in thread
From: Elisey Konstantinov @ 2026-04-27 8:12 UTC (permalink / raw)
To: qemu-devel
Cc: mark.cave-ayland, qemu-devel, berrange, pbonzini,
marcandre.lureau, peter.maydell, philmd
Oh-uh.
I’m baffled
At the time of writing this issue, it wouldn’t load on either the source code version or the Debian Mac OS X version. However, now — without any changes to the code whatsoever — it works on the source code version, but still does NOT work on the Debian version
I even tried checking out version 10.0.1, on which the bug was reproducible, but it no longer reproduces! Has someone done a rebase?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-27 8:12 Elisey Konstantinov
@ 2026-04-27 8:18 ` Elisey Konstantinov
2026-04-27 8:30 ` Elisey Konstantinov
0 siblings, 1 reply; 21+ messages in thread
From: Elisey Konstantinov @ 2026-04-27 8:18 UTC (permalink / raw)
To: qemu-devel
Cc: mark.cave-ayland, berrange, pbonzini, marcandre.lureau,
peter.maydell, philmd
Update:
Maybe it’s system libraries like GLibC?
But then why does the build from source work, whereas the APT build doesn’t, on the very same machine?
Mind you, I’m not very good at compiling, so.. but it seems to me that perhaps the source version of QEMU is somehow linked against more up-to-date libraries than the Debian Auto-Build version
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-27 8:18 ` Elisey Konstantinov
@ 2026-04-27 8:30 ` Elisey Konstantinov
0 siblings, 0 replies; 21+ messages in thread
From: Elisey Konstantinov @ 2026-04-27 8:30 UTC (permalink / raw)
To: qemu-devel
Cc: mark.cave-ayland, berrange, pbonzini, marcandre.lureau,
peter.maydell, philmd
So, later on I’ll try building it on an older version of Debian (12) and see what happens
If it compiles and the bug is reproducible, this suggests two things:
1. The bug was in the system libraries; the issue can be closed
2. Debian Auto-Build has simply been linking against the old libraries up to now, but will catch up in the foreseeable future
P.S. Apologies if I’ve made any mistakes with the metadata in my emails (To, CC, et cetera), I simply don’t use mailing lists very often, and secondly, I write via Apple Mail (I really must set up git send-mail; I think this is the second time I’ve said this:)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
@ 2026-04-24 15:38 elisey.konstantinov
0 siblings, 0 replies; 21+ messages in thread
From: elisey.konstantinov @ 2026-04-24 15:38 UTC (permalink / raw)
To: Paolo Bonzini, peter.maydell
Cc: qemu-devel, berrange, marcandre.lureau, philmd
[-- Attachment #1: Type: text/plain, Size: 589 bytes --]
Thank you very much for your feedbackI’ve understood the leitmotif of your messages, and after giving it some thought, I’ve come to fully agree with itWell then, I’m ready to take on the task of identifying the UContext bug or how QEMU interacts with itHowever, please keep in mind that I’ll only be able to get to it in about a week’s time, and I’d also appreciate any help on GitLab :]Mind you, something tells me (which is why I mentioned that investigating the UContext issue would take some time) that the problem lies not with QEMU after all, but with UContext itself...
[-- Attachment #2: Type: text/html, Size: 834 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH] build: prefer sigaltstack over ucontext on Linux
@ 2026-04-24 8:19 Elisey Konstantinov
2026-04-24 8:57 ` Daniel P. Berrangé
2026-04-24 12:03 ` Paolo Bonzini
0 siblings, 2 replies; 21+ messages in thread
From: Elisey Konstantinov @ 2026-04-24 8:19 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, marcandre.lureau, berrange, philmd
From 517099e65de1e2ad3d0f33d3c4a7a71f8728279c Mon Sep 17 00:00:00 2001
From: Elisey <elisey.konstantinov@gmail.com>
Date: Mon, 23 Mar 2026 16:02:45 +0100
Subject: [PATCH] build: prefer sigaltstack over ucontext on Linux
sigaltstack coroutine backend is more stable on some Linux
configurations, while ucontext causes boot failures for certain
PPC Mac OS X guests (issue #3276).
Select sigaltstack first when available, keeping ucontext as fallback
until the underlying issue is resolved.
Signed-off-by: Elisey Konstantinov <elisey.konstantinov@gmail.com>
---
meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index ab3e97eb9f..742655e007 100644
--- a/meson.build
+++ b/meson.build
@@ -505,10 +505,12 @@ if host_os == 'windows'
elif host_os == 'emscripten'
supported_backends += ['wasm']
else
+ # FIXME: This is a temporary workaround!
+ # SigAltStack is in higher priority to fix #3276
+ supported_backends += ['sigaltstack']
if host_os != 'darwin' and cc.links(ucontext_probe)
supported_backends += ['ucontext']
endif
- supported_backends += ['sigaltstack']
endif
if coroutine_backend == 'auto'
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 21+ messages in thread* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 8:19 Elisey Konstantinov
@ 2026-04-24 8:57 ` Daniel P. Berrangé
2026-04-24 9:19 ` Elisey Konstantinov
2026-04-24 12:03 ` Paolo Bonzini
1 sibling, 1 reply; 21+ messages in thread
From: Daniel P. Berrangé @ 2026-04-24 8:57 UTC (permalink / raw)
To: Elisey Konstantinov; +Cc: qemu-devel, pbonzini, marcandre.lureau, philmd
On Fri, Apr 24, 2026 at 11:19:39AM +0300, Elisey Konstantinov wrote:
> From 517099e65de1e2ad3d0f33d3c4a7a71f8728279c Mon Sep 17 00:00:00 2001
> From: Elisey <elisey.konstantinov@gmail.com>
> Date: Mon, 23 Mar 2026 16:02:45 +0100
> Subject: [PATCH] build: prefer sigaltstack over ucontext on Linux
>
> sigaltstack coroutine backend is more stable on some Linux
> configurations, while ucontext causes boot failures for certain
> PPC Mac OS X guests (issue #3276).
> Select sigaltstack first when available, keeping ucontext as fallback
> until the underlying issue is resolved.
IMHO there needs to be a greater investigation in to why ucontext
would be demonstrating the failure. ucontext has been the default
on Linux for QEMU for decades without significant issues, so my
concern is that switching to sigaltstack is not fixing the root
cause of the bug you see, just masking it by luck.
The choice of coroutine backend can also be performance sensitive
and so changing it is something that would need to also bring
along performance benchmark data to illustrate the likely impact
of the change.
>
> Signed-off-by: Elisey Konstantinov <elisey.konstantinov@gmail.com>
> ---
> meson.build | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index ab3e97eb9f..742655e007 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -505,10 +505,12 @@ if host_os == 'windows'
> elif host_os == 'emscripten'
> supported_backends += ['wasm']
> else
> + # FIXME: This is a temporary workaround!
> + # SigAltStack is in higher priority to fix #3276
> + supported_backends += ['sigaltstack']
> if host_os != 'darwin' and cc.links(ucontext_probe)
> supported_backends += ['ucontext']
> endif
> - supported_backends += ['sigaltstack']
> endif
>
> if coroutine_backend == 'auto'
> --
> 2.50.1 (Apple Git-155)
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 8:57 ` Daniel P. Berrangé
@ 2026-04-24 9:19 ` Elisey Konstantinov
2026-04-24 9:32 ` Daniel P. Berrangé
0 siblings, 1 reply; 21+ messages in thread
From: Elisey Konstantinov @ 2026-04-24 9:19 UTC (permalink / raw)
To: "Daniel P. Berrangé"
Cc: qemu-devel, pbonzini, marcandre.lureau, philmd
I completely agree, but in my opinion, investigating UContext will take a considerable amount of time, which is why I took the liberty of proposing this patch; in the commit message, I actually mention that this is merely a “temporary workaround”
So, I suggest:
- Merging the patch into the mainstream for the convenience of users (as, from what I’ve observed, SigAltStack is coping quite well with the task, at least for now...)
- Whilst leaving #3276 open for the time being and continuing the UContext diagnostics there
- And accordingly, as soon as UContext is fully functional, we can switch QEMU back from SigAltStack
Also the another arrangement is to use UContext ONLY if PPC is in the build targets, but I am unable to do this, as my knowledge of Meson is insufficient for such a task; nevertheless, I would be grateful for any assistance :)
P. S. Anticipating such a reaction, I DELIBERATELY did not include “Resolves” in the patch notes, so I am fully aware of all the proposed precautions
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 9:19 ` Elisey Konstantinov
@ 2026-04-24 9:32 ` Daniel P. Berrangé
2026-04-24 11:31 ` Elisey Konstantinov
0 siblings, 1 reply; 21+ messages in thread
From: Daniel P. Berrangé @ 2026-04-24 9:32 UTC (permalink / raw)
To: Elisey Konstantinov; +Cc: qemu-devel, pbonzini, marcandre.lureau, philmd
On Fri, Apr 24, 2026 at 12:19:19PM +0300, Elisey Konstantinov wrote:
> I completely agree, but in my opinion, investigating UContext will take a considerable amount of time, which is why I took the liberty of proposing this patch; in the commit message, I actually mention that this is merely a “temporary workaround”
>
> So, I suggest:
> - Merging the patch into the mainstream for the convenience of users (as, from what I’ve observed, SigAltStack is coping quite well with the task, at least for now...)
> - Whilst leaving #3276 open for the time being and continuing the UContext diagnostics there
> - And accordingly, as soon as UContext is fully functional, we can switch QEMU back from SigAltStack
>
> Also the another arrangement is to use UContext ONLY if PPC is in the build targets, but I am unable to do this, as my knowledge of Meson is insufficient for such a task; nevertheless, I would be grateful for any assistance :)
>
> P. S. Anticipating such a reaction, I DELIBERATELY did not include “Resolves” in the patch notes, so I am fully aware of all the proposed precautions
PPC MacOS guest is such a niche use case, that I don't see a compelling
reason to make such a change in git until the ticket has been fully
investigated and the problem root caused.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 9:32 ` Daniel P. Berrangé
@ 2026-04-24 11:31 ` Elisey Konstantinov
2026-04-24 11:51 ` Peter Maydell
0 siblings, 1 reply; 21+ messages in thread
From: Elisey Konstantinov @ 2026-04-24 11:31 UTC (permalink / raw)
To: "Daniel P. Berrangé"
Cc: qemu-devel, pbonzini, marcandre.lureau, philmd
I understand it’s a niche use case, however, “niche” doesn't mean “broken”
Currently, QEMU advertises support for PPC Mac OS X guests, but it doesn’t work on Linux
for certain versions
My patch fixes this breakage with a 3-line change, proven to work
If the root cause in UContext takes months to fix, will you leave the feature broken for all Linux users that long?
Can we apply this workaround to unblock users now, and continue the investigation in the issue tracker?
If not, what is the official status of PPC Mac OS X support in QEMU?
P. S.
For example, SigAltStack is the only one way to use QEMU on macOS, and it works.. pretty good
To be clear, only Linux and maybe BSD (which I can’t test, see details in the issue) works on UContext by the meantime...
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 11:31 ` Elisey Konstantinov
@ 2026-04-24 11:51 ` Peter Maydell
2026-04-24 19:52 ` Mark Cave-Ayland
0 siblings, 1 reply; 21+ messages in thread
From: Peter Maydell @ 2026-04-24 11:51 UTC (permalink / raw)
To: Elisey Konstantinov
Cc: Daniel P. Berrangé, qemu-devel, pbonzini, marcandre.lureau,
philmd
On Fri, 24 Apr 2026 at 12:32, Elisey Konstantinov
<elisey.konstantinov@gmail.com> wrote:
>
> I understand it’s a niche use case, however, “niche” doesn't mean “broken”
> Currently, QEMU advertises support for PPC Mac OS X guests, but it doesn’t work on Linux
> for certain versions
> My patch fixes this breakage with a 3-line change, proven to work
>
> If the root cause in UContext takes months to fix, will you leave the feature broken for all Linux users that long?
> Can we apply this workaround to unblock users now, and continue the investigation in the issue tracker?
QEMU covers many more use cases than PPC macos emulation.
As Daniel says, this is very niche. It's almost certainly the
case that your proposed change is merely hiding an actual bug.
The coroutine backend is a fundamental part of how low level
parts of QEMU like the block backend work, which are heavily
relied on where QEMU is used as a virtual machine setup with
KVM and other accelerators. Changing the default here affects
a great many of our users. We should not do that only because
it happens to mask a bug somewhere in PPC emulation for
a particular guest OS.
If this was a workaround that affected only PPC and was at least
obviously a change to a PPC-specific part of QEMU like a particular
device model, we might take it. (Though even there we might say "no,
find the actual cause"; workarounds once accepted have a tendency
to stick around way longer than they ought to as people forget
whether and when they can be removed later). For a workaround which
affects every QEMU user including all the performance-sensitive
VM use cases, the answer is a clear "no".
> If not, what is the official status of PPC Mac OS X support in QEMU?
The "New World" and "Old World" machines are listed in our
MAINTAINERS file as "Odd Fixes", which means:
"It has a maintainer but they don't have time to do
much other than throw the odd patch in."
In other words, there is no active development work ongoing,
and nobody with time and interest to investigate complex bugs.
If it happens to work for people, that's great. If it doesn't
work and somebody proposes a patch then we can review the patch
(as we have done for this one). If it doesn't work and nobody
proposes a satisfactory patch then it will likely remain broken.
thanks
-- PMM
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 11:51 ` Peter Maydell
@ 2026-04-24 19:52 ` Mark Cave-Ayland
2026-04-24 22:28 ` Fabiano Rosas
2026-04-27 7:00 ` Elisey Konstantinov
0 siblings, 2 replies; 21+ messages in thread
From: Mark Cave-Ayland @ 2026-04-24 19:52 UTC (permalink / raw)
To: Peter Maydell, Elisey Konstantinov
Cc: Daniel P. Berrangé, qemu-devel, pbonzini, marcandre.lureau,
philmd
On 24/04/2026 12:51, Peter Maydell wrote:
> The "New World" and "Old World" machines are listed in our
> MAINTAINERS file as "Odd Fixes", which means:
>
> "It has a maintainer but they don't have time to do
> much other than throw the odd patch in."
>
> In other words, there is no active development work ongoing,
> and nobody with time and interest to investigate complex bugs.
> If it happens to work for people, that's great. If it doesn't
> work and somebody proposes a patch then we can review the patch
> (as we have done for this one). If it doesn't work and nobody
> proposes a satisfactory patch then it will likely remain broken.
I'm around to do various small bits and pieces, but at least for the short term it's
fairly hard to find the extended time that bugs like these require.
Note that MacOS X before 10.2 (including MacOS 9) appear to be timing sensitive to
the CUDA interrupts, so that might be another explanation. You could try
experimenting with increasing the delay at
https://gitlab.com/qemu-project/qemu/-/blob/master/hw/misc/macio/cuda.c?ref_type=heads#L537
to see if that helps?
ATB,
Mark.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 19:52 ` Mark Cave-Ayland
@ 2026-04-24 22:28 ` Fabiano Rosas
2026-04-27 6:56 ` Elisey Konstantinov
2026-04-27 7:00 ` Elisey Konstantinov
1 sibling, 1 reply; 21+ messages in thread
From: Fabiano Rosas @ 2026-04-24 22:28 UTC (permalink / raw)
To: Mark Cave-Ayland, Peter Maydell, Elisey Konstantinov
Cc: Daniel P. Berrangé, qemu-devel, pbonzini, marcandre.lureau,
philmd
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> writes:
> On 24/04/2026 12:51, Peter Maydell wrote:
>
>> The "New World" and "Old World" machines are listed in our
>> MAINTAINERS file as "Odd Fixes", which means:
>>
>> "It has a maintainer but they don't have time to do
>> much other than throw the odd patch in."
>>
>> In other words, there is no active development work ongoing,
>> and nobody with time and interest to investigate complex bugs.
>> If it happens to work for people, that's great. If it doesn't
>> work and somebody proposes a patch then we can review the patch
>> (as we have done for this one). If it doesn't work and nobody
>> proposes a satisfactory patch then it will likely remain broken.
>
> I'm around to do various small bits and pieces, but at least for the short term it's
> fairly hard to find the extended time that bugs like these require.
>
> Note that MacOS X before 10.2 (including MacOS 9) appear to be timing sensitive to
> the CUDA interrupts, so that might be another explanation. You could try
> experimenting with increasing the delay at
> https://gitlab.com/qemu-project/qemu/-/blob/master/hw/misc/macio/cuda.c?ref_type=heads#L537
> to see if that helps?
>
Hi, just to let you all know I cannot reproduce this.
MacOS X boots past the initial screen, the installer comes up and
clicking around works fine. With both QEMU 10.0.0 and current master.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 22:28 ` Fabiano Rosas
@ 2026-04-27 6:56 ` Elisey Konstantinov
2026-04-27 15:18 ` Fabiano Rosas
0 siblings, 1 reply; 21+ messages in thread
From: Elisey Konstantinov @ 2026-04-27 6:56 UTC (permalink / raw)
To: Fabiano Rosas
Cc: qemu-devel, berrange, pbonzini, marcandre.lureau, peter.maydell,
philmd
Oh, thanks for the feedback, however, could you please describe the environment you’re using?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-27 6:56 ` Elisey Konstantinov
@ 2026-04-27 15:18 ` Fabiano Rosas
2026-04-29 13:36 ` Fabiano Rosas
0 siblings, 1 reply; 21+ messages in thread
From: Fabiano Rosas @ 2026-04-27 15:18 UTC (permalink / raw)
To: Elisey Konstantinov
Cc: qemu-devel, berrange, pbonzini, marcandre.lureau, peter.maydell,
philmd
Elisey Konstantinov <elisey.konstantinov@gmail.com> writes:
> Oh, thanks for the feedback, however, could you please describe the environment you’re using?
x86_64 host running Linux kernel 6.4.0. QEMU configured with:
../configure
--target-list=x86_64-softmmu,aarch64-softmmu,ppc64-softmmu,ppc-softmmu,s390x-softmmu,riscv64-softmmu,aarch64-linux-user,mips64-softmmu
--disable-plugins --enable-modules --enable-werror --enable-debug --disable-docs
QEMU cmdline:
qemu-system-ppc -machine mac99 -boot d -d guest_errors,unimp,cpu_reset
-cdrom osx_100_4k78_install.iso -prom-env "boot-args=-v"
Connecting via VNC shows the machine runs up to and past the point shown
in the screenshot posted as the working example in:
https://gitlab.com/qemu-project/qemu/-/work_items/3276#note_3105980116
Clicking around, the VM seems functional.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-27 15:18 ` Fabiano Rosas
@ 2026-04-29 13:36 ` Fabiano Rosas
0 siblings, 0 replies; 21+ messages in thread
From: Fabiano Rosas @ 2026-04-29 13:36 UTC (permalink / raw)
To: Elisey Konstantinov
Cc: qemu-devel, berrange, pbonzini, marcandre.lureau, peter.maydell,
philmd
(tried to stitch the thread back together)
Elisey Konstantinov <elisey.konstantinov@gmail.com> writes:
> Fabiano Rosas <farosas@suse.de> writes:
>
>> Elisey Konstantinov <elisey.konstantinov@gmail.com> writes:
>>
>>> Oh, thanks for the feedback, however, could you please describe the environment you’re using?
>>
>> x86_64 host running Linux kernel 6.4.0. QEMU configured with:
>>
>> ../configure
>> --target-list=x86_64-softmmu,aarch64-softmmu,ppc64-softmmu,ppc-softmmu,s390x-softmmu,riscv64-softmmu,aarch64-linux-user,mips64-softmmu
>> --disable-plugins --enable-modules --enable-werror --enable-debug --disable-docs
>>
>> QEMU cmdline:
>>
>> qemu-system-ppc -machine mac99 -boot d -d guest_errors,unimp,cpu_reset
>> -cdrom osx_100_4k78_install.iso -prom-env "boot-args=-v"
>>
>> Connecting via VNC shows the machine runs up to and past the point shown
>> in the screenshot posted as the working example in:
>> https://gitlab.com/qemu-project/qemu/-/work_items/3276#note_3105980116
>>
>> Clicking around, the VM seems functional.
>
> Yeah, this sounds weird, could you please test on the old distribution,
> like Debian 12?See three of my latest messages in the main thread for
> more information
Sorry, I don't have the means to test this on Debian 12. It's not clear
from the thread, have you reproduced the issue using the HEAD of QEMU's
master branch? If so, then I think the best we could do is go back to
the original issue[1] on Gitlab and continue the investigation.
From the information you posted there, the execution should have gotten
past the happy mac screen. You could try running with -prom-env
"boot-args=-v" as I did above and see if it gives you any logging past
that screen. Post a screenshot of your VNC session showing those logs.
1- https://gitlab.com/qemu-project/qemu/-/work_items/3276
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 19:52 ` Mark Cave-Ayland
2026-04-24 22:28 ` Fabiano Rosas
@ 2026-04-27 7:00 ` Elisey Konstantinov
1 sibling, 0 replies; 21+ messages in thread
From: Elisey Konstantinov @ 2026-04-27 7:00 UTC (permalink / raw)
To: Mark Cave-Ayland
Cc: qemu-devel, berrange, pbonzini, marcandre.lureau, peter.maydell,
philmd
Thank you very much, I’ll definitely give it a go, but I doubt that CUDA timing durations work differently across different backends, so I’m not holding out much hope
Although it would, of course, be great if that were the problem
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] build: prefer sigaltstack over ucontext on Linux
2026-04-24 8:19 Elisey Konstantinov
2026-04-24 8:57 ` Daniel P. Berrangé
@ 2026-04-24 12:03 ` Paolo Bonzini
1 sibling, 0 replies; 21+ messages in thread
From: Paolo Bonzini @ 2026-04-24 12:03 UTC (permalink / raw)
To: Elisey Konstantinov, qemu-devel; +Cc: marcandre.lureau, berrange, philmd
On 4/24/26 09:19, Elisey Konstantinov wrote:
> From 517099e65de1e2ad3d0f33d3c4a7a71f8728279c Mon Sep 17 00:00:00 2001
> From: Elisey <elisey.konstantinov@gmail.com>
> Date: Mon, 23 Mar 2026 16:02:45 +0100
> Subject: [PATCH] build: prefer sigaltstack over ucontext on Linux
>
> sigaltstack coroutine backend is more stable on some Linux
> configurations, while ucontext causes boot failures for certain
> PPC Mac OS X guests (issue #3276).
>
> Select sigaltstack first when available, keeping ucontext as fallback
> until the underlying issue is resolved.
>
> Signed-off-by: Elisey Konstantinov <elisey.konstantinov@gmail.com>
I have never really liked using ucontext because we are only using it
for setup and then switching to sigsetjmp/siglongjmp. sigaltstack is
not much better however. I agree with others that for example the mutex
could be masking the bug.
Many years ago I wrote an assembly-language coroutine backend:
https://patchew.org/QEMU/20190504120528.6389-1-pbonzini@redhat.com/
Perhaps you can try to resurrect it, even just for x86 to see if it
fixes your issue? This is the relevant patch:
https://patchew.org/QEMU/20190504120528.6389-4-pbonzini@redhat.com/mbox
and you only need util/coroutine-asm.c + simple changes to meson.build
similar to the ones you have already made.
Note that you'll also have to add something like
diff --git a/meson.build b/meson.build
index 2bc2bd4d7bf..3a13da8a08d 100644
--- a/meson.build
+++ b/meson.build
@@ -391,6 +391,7 @@ qemu_isa_flags = []
# Pick x86-64 baseline version
if host_arch == 'x86_64'
+ qemu_isa_flags += ['-mno-red-zone']
if get_option('x86_version') == '0'
error('x86_64-v1 required for x86-64 hosts')
endif
to meson.build (not optimal but simple).
Paolo
^ permalink raw reply related [flat|nested] 21+ messages in thread
end of thread, other threads:[~2026-04-29 13:47 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-24 16:22 [PATCH] build: prefer sigaltstack over ucontext on Linux elisey.konstantinov
2026-04-24 20:02 ` Paolo Bonzini
-- strict thread matches above, loose matches on Subject: below --
2026-04-27 15:30 elisey.konstantinov
2026-04-29 13:46 ` Daniel P. Berrangé
2026-04-27 8:12 Elisey Konstantinov
2026-04-27 8:18 ` Elisey Konstantinov
2026-04-27 8:30 ` Elisey Konstantinov
2026-04-24 15:38 elisey.konstantinov
2026-04-24 8:19 Elisey Konstantinov
2026-04-24 8:57 ` Daniel P. Berrangé
2026-04-24 9:19 ` Elisey Konstantinov
2026-04-24 9:32 ` Daniel P. Berrangé
2026-04-24 11:31 ` Elisey Konstantinov
2026-04-24 11:51 ` Peter Maydell
2026-04-24 19:52 ` Mark Cave-Ayland
2026-04-24 22:28 ` Fabiano Rosas
2026-04-27 6:56 ` Elisey Konstantinov
2026-04-27 15:18 ` Fabiano Rosas
2026-04-29 13:36 ` Fabiano Rosas
2026-04-27 7:00 ` Elisey Konstantinov
2026-04-24 12:03 ` Paolo Bonzini
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.