Received: from eggs.gnu.org ([140.186.70.92]:55532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHuzW-0003oC-KK for qemu-devel@nongnu.org; Thu, 05 May 2011 05:37:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHuzV-0006lv-MB for qemu-devel@nongnu.org; Thu, 05 May 2011 05:37:02 -0400 Received: from cantor2.suse.de ([195.135.220.15]:53117 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHuzV-0006lq-Gy for qemu-devel@nongnu.org; Thu, 05 May 2011 05:37:01 -0400 From: Alexander Graf Date: Thu, 5 May 2011 11:36:26 +0200 Message-Id: <1304588186-94087-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [RFC] darwin: work around sigfd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU-devel Developers Cc: Paolo Bonzini , Andreas Faerber , Jan Kiszka 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] [] kernel_init+0x8f/0x206 [ 0.000999] [] 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 (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