qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC] darwin: work around sigfd
@ 2011-05-05  9:36 Alexander Graf
  2011-05-05 12:56 ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander Graf @ 2011-05-05  9:36 UTC (permalink / raw)
  To: QEMU-devel Developers; +Cc: Paolo Bonzini, Andreas Faerber, Jan Kiszka

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]

When running qemu-system on Darwin, the vcpu processes guest code, but
I don't get to see anything on the cocoa screen.

When running a guest with -nographic, time stands still for the guest:

[    0.000000] Detected 2659.508 MHz processor.
[    0.000756] Calibrating delay loop (skipped), value calculated using timer frequency.. 5319.01 BogoMIPS (lpj=2659508)
[    0.000999] pid_max: default: 32768 minimum: 301
[    0.000999] Security Framework initialized
[    0.000999] AppArmor: AppArmor initialized
[...]
[    0.000999] Kernel panic - not syncing: IO-APIC + timer doesn't work!  Boot with apic=debug and send a report.  Then try booting with the 'noapic' option.
[    0.000999]
[...]
[    0.000999]  [<ffffffff81b3ec92>] kernel_init+0x8f/0x206
[    0.000999]  [<ffffffff81003d74>] kernel_thread_helper+0x4/0x10

This patch makes qemu-system work again on Darwin, but is obviously
just a hack. I'd really like to see some more clever people find out
what exactly is going wrong to find a real solution!

Reported-by: Andreas Färber <andreas.faerber@web.de>
(no signed-off-by on purpose - it's an RFC!)
---
 cpus.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/cpus.c b/cpus.c
index 1fc34b7..ef604bf 100644
--- a/cpus.c
+++ b/cpus.c
@@ -388,6 +388,15 @@ static int qemu_signal_init(void)
     int sigfd;
     sigset_t set;
 
+#ifdef CONFIG_DARWIN
+    /* Darwin breaks for me with sigfd. I don't know why, but it just sits
+       there hanging. The vcpu does process things, so that one's good, but
+       there is no output. Doing the same as win32 works for me. */
+    if (1) {
+        return 0;
+    }
+#endif
+
 #ifdef CONFIG_IOTHREAD
     /* SIGUSR2 used by posix-aio-compat.c */
     sigemptyset(&set);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [RFC] darwin: work around sigfd
  2011-05-05  9:36 [Qemu-devel] [RFC] darwin: work around sigfd Alexander Graf
@ 2011-05-05 12:56 ` Paolo Bonzini
  2011-05-05 13:15   ` Alexander Graf
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2011-05-05 12:56 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Jan Kiszka, Andreas Faerber, QEMU-devel Developers

On 05/05/2011 11:36 AM, Alexander Graf wrote:
> When running qemu-system on Darwin, the vcpu processes guest code, but
> I don't get to see anything on the cocoa screen.

Out of curiosity, does it work with iothread?

Paolo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [RFC] darwin: work around sigfd
  2011-05-05 12:56 ` Paolo Bonzini
@ 2011-05-05 13:15   ` Alexander Graf
  2011-05-05 13:23     ` Paolo Bonzini
  2011-05-08  9:15     ` Andreas Färber
  0 siblings, 2 replies; 11+ messages in thread
From: Alexander Graf @ 2011-05-05 13:15 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Jan Kiszka, Andreas Faerber, QEMU-devel Developers


On 05.05.2011, at 14:56, Paolo Bonzini wrote:

> On 05/05/2011 11:36 AM, Alexander Graf wrote:
>> When running qemu-system on Darwin, the vcpu processes guest code, but
>> I don't get to see anything on the cocoa screen.
> 
> Out of curiosity, does it work with iothread?

Seems to work with -nographic, yes. With cocoa it doesn't seem as happy :o. It certainly gets a lot further than without.


Alex

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [RFC] darwin: work around sigfd
  2011-05-05 13:15   ` Alexander Graf
@ 2011-05-05 13:23     ` Paolo Bonzini
  2011-05-05 13:24       ` Alexander Graf
  2011-05-08  9:15     ` Andreas Färber
  1 sibling, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2011-05-05 13:23 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Jan Kiszka, Andreas Faerber, QEMU-devel Developers

On 05/05/2011 03:15 PM, Alexander Graf wrote:
>
> On 05.05.2011, at 14:56, Paolo Bonzini wrote:
>
>> On 05/05/2011 11:36 AM, Alexander Graf wrote:
>>> When running qemu-system on Darwin, the vcpu processes guest
>>> code, but I don't get to see anything on the cocoa screen.
>>
>> Out of curiosity, does it work with iothread?
>
> Seems to work with -nographic, yes. With cocoa it doesn't seem as
> happy :o. It certainly gets a lot further than without.

And SDL?

Paolo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [RFC] darwin: work around sigfd
  2011-05-05 13:23     ` Paolo Bonzini
@ 2011-05-05 13:24       ` Alexander Graf
  0 siblings, 0 replies; 11+ messages in thread
From: Alexander Graf @ 2011-05-05 13:24 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Jan Kiszka, Andreas Faerber, QEMU-devel Developers


On 05.05.2011, at 15:23, Paolo Bonzini wrote:

> On 05/05/2011 03:15 PM, Alexander Graf wrote:
>> 
>> On 05.05.2011, at 14:56, Paolo Bonzini wrote:
>> 
>>> On 05/05/2011 11:36 AM, Alexander Graf wrote:
>>>> When running qemu-system on Darwin, the vcpu processes guest
>>>> code, but I don't get to see anything on the cocoa screen.
>>> 
>>> Out of curiosity, does it work with iothread?
>> 
>> Seems to work with -nographic, yes. With cocoa it doesn't seem as
>> happy :o. It certainly gets a lot further than without.
> 
> And SDL?

SDL doesn't compile on Mac OS X :). Otherwise we wouldn't have the cocoa backend.


Alex

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [RFC] darwin: work around sigfd
  2011-05-05 13:15   ` Alexander Graf
  2011-05-05 13:23     ` Paolo Bonzini
@ 2011-05-08  9:15     ` Andreas Färber
  2011-05-08 10:10       ` Andreas Färber
  2011-05-29 16:50       ` Andreas Färber
  1 sibling, 2 replies; 11+ messages in thread
From: Andreas Färber @ 2011-05-08  9:15 UTC (permalink / raw)
  To: Paolo Bonzini, Alexander Graf; +Cc: Jan Kiszka, qemu-devel Developers

Am 05.05.2011 um 15:15 schrieb Alexander Graf:

> On 05.05.2011, at 14:56, Paolo Bonzini wrote:
>
>> On 05/05/2011 11:36 AM, Alexander Graf wrote:
>>> When running qemu-system on Darwin, the vcpu processes guest code,  
>>> but
>>> I don't get to see anything on the cocoa screen.
>>
>> Out of curiosity, does it work with iothread?
>
> Seems to work with -nographic, yes. With cocoa it doesn't seem as  
> happy :o. It certainly gets a lot further than without.

-nographic has issues with --enable-io-thread, too. It gets further  
than Cocoa though before it bails out.

Andreas

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [RFC] darwin: work around sigfd
  2011-05-08  9:15     ` Andreas Färber
@ 2011-05-08 10:10       ` Andreas Färber
  2011-05-09 14:04         ` Alexander Graf
  2011-05-29 16:50       ` Andreas Färber
  1 sibling, 1 reply; 11+ messages in thread
From: Andreas Färber @ 2011-05-08 10:10 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Paolo Bonzini, Kenneth Salerno, qemu-devel Developers, Jan Kiszka

Alex,

Am 08.05.2011 um 11:15 schrieb Andreas Färber:

> Am 05.05.2011 um 15:15 schrieb Alexander Graf:
>
>> On 05.05.2011, at 14:56, Paolo Bonzini wrote:
>>
>>> On 05/05/2011 11:36 AM, Alexander Graf wrote:
>>>> When running qemu-system on Darwin, the vcpu processes guest  
>>>> code, but
>>>> I don't get to see anything on the cocoa screen.
>>>
>>> Out of curiosity, does it work with iothread?
>>
>> Seems to work with -nographic, yes. With cocoa it doesn't seem as  
>> happy :o. It certainly gets a lot further than without.
>
> -nographic has issues with --enable-io-thread, too. It gets further  
> than Cocoa though before it bails out.

Actually, I'm still seeing issues with your patch as well. Might be  
multiple independent issues that have cropped up?

In particular I'm observing that AIX on qemu-system-ppc - as reported  
by Kenneth - doesn't reach the point where it tells us the 32-bit CPU  
is incompatible. With your patch it is now possible to exit the QEMU  
process though.

Any ppc64 guests don't even seem to enter OpenBIOS at all, whether  
OpenBIOS/ppc or OpenBIOS/ppc64.

It seems there is a DSI exception when turning on the MMU in OpenBIOS  
(before any serial output occurs). Does that ring a bell with you,  
some pSeries change maybe?

Andreas

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [RFC] darwin: work around sigfd
  2011-05-08 10:10       ` Andreas Färber
@ 2011-05-09 14:04         ` Alexander Graf
  0 siblings, 0 replies; 11+ messages in thread
From: Alexander Graf @ 2011-05-09 14:04 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Paolo Bonzini, Kenneth Salerno, qemu-devel Developers, Jan Kiszka

On 05/08/2011 12:10 PM, Andreas Färber wrote:
> Alex,
>
> Am 08.05.2011 um 11:15 schrieb Andreas Färber:
>
>> Am 05.05.2011 um 15:15 schrieb Alexander Graf:
>>
>>> On 05.05.2011, at 14:56, Paolo Bonzini wrote:
>>>
>>>> On 05/05/2011 11:36 AM, Alexander Graf wrote:
>>>>> When running qemu-system on Darwin, the vcpu processes guest code, 
>>>>> but
>>>>> I don't get to see anything on the cocoa screen.
>>>>
>>>> Out of curiosity, does it work with iothread?
>>>
>>> Seems to work with -nographic, yes. With cocoa it doesn't seem as 
>>> happy :o. It certainly gets a lot further than without.
>>
>> -nographic has issues with --enable-io-thread, too. It gets further 
>> than Cocoa though before it bails out.
>
> Actually, I'm still seeing issues with your patch as well. Might be 
> multiple independent issues that have cropped up?
>
> In particular I'm observing that AIX on qemu-system-ppc - as reported 
> by Kenneth - doesn't reach the point where it tells us the 32-bit CPU 
> is incompatible. With your patch it is now possible to exit the QEMU 
> process though.
>
> Any ppc64 guests don't even seem to enter OpenBIOS at all, whether 
> OpenBIOS/ppc or OpenBIOS/ppc64.
>
> It seems there is a DSI exception when turning on the MMU in OpenBIOS 
> (before any serial output occurs). Does that ring a bell with you, 
> some pSeries change maybe?

The pSeries changes did some cleanups to the MMU code, yes, but they 
looked pretty much sane to me. Are you running on a ppc64 host? Maybe 
there's some undefined corner case shifting happening :).


Alex

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [RFC] darwin: work around sigfd
  2011-05-08  9:15     ` Andreas Färber
  2011-05-08 10:10       ` Andreas Färber
@ 2011-05-29 16:50       ` Andreas Färber
  2011-05-30  8:03         ` Paolo Bonzini
  1 sibling, 1 reply; 11+ messages in thread
From: Andreas Färber @ 2011-05-29 16:50 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: Paolo Bonzini, Alexander Graf, Jan Kiszka

Am 08.05.2011 um 11:15 schrieb Andreas Färber:

> Am 05.05.2011 um 15:15 schrieb Alexander Graf:
>
>> On 05.05.2011, at 14:56, Paolo Bonzini wrote:
>>
>>> On 05/05/2011 11:36 AM, Alexander Graf wrote:
>>>> When running qemu-system on Darwin, the vcpu processes guest  
>>>> code, but
>>>> I don't get to see anything on the cocoa screen.
>>>
>>> Out of curiosity, does it work with iothread?
>>
>> Seems to work with -nographic, yes. With cocoa it doesn't seem as  
>> happy :o. It certainly gets a lot further than without.
>
> -nographic has issues with --enable-io-thread, too.

Ping?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [RFC] darwin: work around sigfd
  2011-05-29 16:50       ` Andreas Färber
@ 2011-05-30  8:03         ` Paolo Bonzini
  2011-05-31 21:44           ` Andreas Färber
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2011-05-30  8:03 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Jan Kiszka, qemu-devel Developers, Alexander Graf

On 05/29/2011 06:50 PM, Andreas Färber wrote:
> Am 08.05.2011 um 11:15 schrieb Andreas Färber:
>
>> Am 05.05.2011 um 15:15 schrieb Alexander Graf:
>>
>>> On 05.05.2011, at 14:56, Paolo Bonzini wrote:
>>>
>>>> On 05/05/2011 11:36 AM, Alexander Graf wrote:
>>>>> When running qemu-system on Darwin, the vcpu processes guest code, but
>>>>> I don't get to see anything on the cocoa screen.
>>>>
>>>> Out of curiosity, does it work with iothread?
>>>
>>> Seems to work with -nographic, yes. With cocoa it doesn't seem as
>>> happy :o. It certainly gets a lot further than without.
>>
>> -nographic has issues with --enable-io-thread, too.
>
> Ping?

The patch is obviously masking the real issue, I don't think Alex meant 
it to be applied.

I would really like to look at iothread under Mac OS X, but I just don't 
have the time right now.

Paolo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [RFC] darwin: work around sigfd
  2011-05-30  8:03         ` Paolo Bonzini
@ 2011-05-31 21:44           ` Andreas Färber
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Färber @ 2011-05-31 21:44 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Jan Kiszka, qemu-devel Developers, Alexander Graf

Am 30.05.2011 um 10:03 schrieb Paolo Bonzini:

> On 05/29/2011 06:50 PM, Andreas Färber wrote:
>> Am 08.05.2011 um 11:15 schrieb Andreas Färber:
>>
>>> Am 05.05.2011 um 15:15 schrieb Alexander Graf:
>>>
>>>> On 05.05.2011, at 14:56, Paolo Bonzini wrote:
>>>>
>>>>> On 05/05/2011 11:36 AM, Alexander Graf wrote:
>>>>>> When running qemu-system on Darwin, the vcpu processes guest  
>>>>>> code, but
>>>>>> I don't get to see anything on the cocoa screen.
>>>>>
>>>>> Out of curiosity, does it work with iothread?
>>>>
>>>> Seems to work with -nographic, yes. With cocoa it doesn't seem as
>>>> happy :o. It certainly gets a lot further than without.
>>>
>>> -nographic has issues with --enable-io-thread, too.
>>
>> Ping?
>
> The patch is obviously masking the real issue, I don't think Alex  
> meant it to be applied.

Neither did I...

> I would really like to look at iothread under Mac OS X, but I just  
> don't have the time right now.

but I would expect whomever introduced this feature/breakage to  
comment on what might be going wrong and what we/I might try. Like I  
said, it happens with and without iothread enabled.

The symptoms I'm seeing is that qemu-system-ppc[64] with -nographic - 
prom-env 'auto-boot?=false' hangs once the OpenBIOS prompt is  
displayed and keyboard input does not work, including Ctrl+a,x so that  
I have to kill the process the hard way. With Cocoa frontend, qemu  
with iothread gets to the Haiku desktop but is unusably sluggish  
(mouse movement and key presses take seconds to get processed) whereas  
without iothread it got stuck during boot splash already iirc.

Andreas

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-05-31 21:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-05  9:36 [Qemu-devel] [RFC] darwin: work around sigfd Alexander Graf
2011-05-05 12:56 ` Paolo Bonzini
2011-05-05 13:15   ` Alexander Graf
2011-05-05 13:23     ` Paolo Bonzini
2011-05-05 13:24       ` Alexander Graf
2011-05-08  9:15     ` Andreas Färber
2011-05-08 10:10       ` Andreas Färber
2011-05-09 14:04         ` Alexander Graf
2011-05-29 16:50       ` Andreas Färber
2011-05-30  8:03         ` Paolo Bonzini
2011-05-31 21:44           ` Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).