Re: [Qemu-devel] [PATCH 1/2] Makefile: distclean should clean all possible targets

2011-07-27 Thread Alexandre Raymond
There are many more object files that are built conditionally.  Why is it okay not to delete them? Perhaps they should be deleted too... The GNU Make manual says the following about distclean: http://www.gnu.org/s/hello/manual/make/Standard-Targets.html Delete all files in the current

Re: [Qemu-devel] [PATCH 4/7] Makefile: fix out-of-tree builds

2011-07-27 Thread Alexandre Raymond
Hi Stefan, You may drop this patch, it doesn't do anything after all... Sorry about that. Alexandre On Wed, Jul 27, 2011 at 5:17 AM, Stefan Hajnoczi stefa...@linux.vnet.ibm.com wrote: From: Alexandre Raymond cerb...@gmail.com This patch fixes a minor bugs which prevented QEMU from being

Re: [Qemu-devel] qemu crashes on Mac OS X

2011-07-26 Thread Alexandre Raymond
Indeed, I'd come to the exact same conclusion, yet I've witnessed it both in the debugger and with trace messages... Alexandre On Tue, Jul 26, 2011 at 4:46 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 07/26/2011 06:58 AM, Alexandre Raymond wrote: +#ifdef __APPLE__ +            if (sig == 0

Re: [Qemu-devel] [PATCH 1/2] Makefile: distclean should clean all possible targets

2011-07-26 Thread Alexandre Raymond
Hi Markus, Well, I'd expect distclean to remove exactly what *this* makefile can build, and leave everything else alone. I was expecting distclean to bring back the source directory to however it was after checkout, removing anything that might have been created by the build/configure process.

Re: [Qemu-devel] qemu crashes on Mac OS X

2011-07-26 Thread Alexandre Raymond
On Tue, Jul 26, 2011 at 9:08 AM, Alexandre Raymond cerb...@gmail.com wrote: Indeed, I'd come to the exact same conclusion, yet I've witnessed it both in the debugger and with trace messages... Alexandre Note that I don't think that this is a proper patch. I simply want to verify that it solves

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Makefile: fix out-of-tree builds

2011-07-25 Thread Alexandre Raymond
Hi guys, Thank you for investigating this problem. I finally found out why this problem occured in the first place. It is a combination of the bug you just described and the fact that make distclean only deletes the build directories of the targets specified *in the last call to configure*.

Re: [Qemu-devel] [RFC PATCH 0/2] Signal fixes for OSX

2011-07-25 Thread Alexandre Raymond
Please ignore this patch series. It is most definitely wrong. Alexandre On Wed, Jul 20, 2011 at 1:01 AM, Alexandre Raymond cerb...@gmail.com wrote: This series fixes a race condition that occurs under OS X. It also reworks the signal initialization to make it simpler for later maintenance

[Qemu-devel] [PATCH 0/2] Minor makefile fixes

2011-07-25 Thread Alexandre Raymond
Two simple patches for make distclean Alexandre Raymond (2): Makefile: distclean should clean all possible targets Makefile: delete config.log in distclean Makefile |3 ++- configure |1 + 2 files changed, 3 insertions(+), 1 deletions(-) -- 1.7.5

[Qemu-devel] [PATCH 1/2] Makefile: distclean should clean all possible targets

2011-07-25 Thread Alexandre Raymond
distclean as it will only remove the i386-softmmu build directory, although the first build created additional directories. Solution : pass the full list of targets from configure to make via the DEFAULT_TARGET_LIST variable. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- Makefile |2

[Qemu-devel] [PATCH 2/2] Makefile: delete config.log in distclean

2011-07-25 Thread Alexandre Raymond
Distclean should remove anything created by the configure script. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 878402e..9f65d86 100644 --- a/Makefile +++ b/Makefile @@ -224,6

Re: [Qemu-devel] qemu crashes on Mac OS X

2011-07-25 Thread Alexandre Raymond
Hi Damjan, I've been able to reproduce the crash you're describing. Could you try the following patch, to see if it solves it? Alexandre On Tue, Jul 5, 2011 at 3:03 PM, Alexandre Raymond cerb...@gmail.com wrote: Hi again Damjan, On Mon, Jul 4, 2011 at 6:35 PM, Damjan Marion damjan.mar

[Qemu-devel] [PATCH] .gitignore: ignore qemu-ga and qapi-generated

2011-07-22 Thread Alexandre Raymond
Add a new binary and generation directory to the gitignore file Signed-off-by: Alexandre Raymond cerb...@gmail.com --- .gitignore |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 08013fc..54835bc 100644 --- a/.gitignore +++ b/.gitignore

[Qemu-devel] [PATCH] Makefile: Minor cscope fixups

2011-07-19 Thread Alexandre Raymond
-Create cscope symbols for assembly files in addition to .c/.h files. -Create cscope database with full path instead of relative path so cscope can be used with CSCOPE_DB in any directory. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- Makefile |2 +- 1 files changed, 1 insertions

[Qemu-devel] [RFC PATCH 0/2] Signal fixes for OSX

2011-07-19 Thread Alexandre Raymond
if there is a specific reason why SIGUSR2 is not currently handled via the signal thread? Alexandre Raymond (2): Signals: fix race condition with aio-compat Signals: rework initial signal setup cpus.c | 43 +++ 1 files changed, 23 insertions(+), 20

[Qemu-devel] [RFC PATCH 2/2] Signals: rework initial signal setup

2011-07-19 Thread Alexandre Raymond
-Restructure the signal setup by creating two groups: * blocked_set, which contains signals that are ignored by QEMU or caught directly by a specific thread (e.g.: SIG_IPI). * handled_set, which contains signals handled synchronously via signalfd. Signed-off-by: Alexandre

Re: [Qemu-devel] [PATCH v2] Fix signal handling when io-thread is disabled

2011-07-08 Thread Alexandre Raymond
ping? On Tue, Jun 14, 2011 at 12:47 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2011-06-14 16:05, Alexandre Raymond wrote: Changes since v1: - take pthread_sigmask() out of the ifdef as it is now common to both parts. This fix effectively blocks, in the main thread, the signals handled

Re: [Qemu-devel] [PATCH] Fix signal handling of SIG_IPI when io-thread is enabled

2011-07-08 Thread Alexandre Raymond
ping? On Wed, Jun 15, 2011 at 10:11 AM, Alexandre Raymond cerb...@gmail.com wrote: Hi Jan, Why? Ahh, because of qemu_cpu_kick_self: raise(SIG_IPI)! That should generate a per-process SIG_IPI. And that may not only affect Darwin. Looks good. Actually, with io-thread enabled, it goes through

Re: [Qemu-devel] qemu crashes on Mac OS X

2011-07-05 Thread Alexandre Raymond
Hi again Damjan, On Mon, Jul 4, 2011 at 6:35 PM, Damjan Marion damjan.mar...@gmail.com wrote: On Jul 4, 2011, at 6:59 PM, Alexandre Raymond wrote: Hi Damjan, Can you try applying the following two patches and see if it solves your problem? http://patchwork.ozlabs.org/patch/100348/ http

Re: [Qemu-devel] qemu crashes on Mac OS X

2011-07-04 Thread Alexandre Raymond
Hi Damjan, On Fri, Jul 1, 2011 at 10:56 AM, Damjan Marion damjan.mar...@gmail.com wrote: On Jul 1, 2011, at 11:17 AM, Damjan Marion (damarion) wrote: Hi, I have an issue when I try to run qemu-system-arm on Mac OS X. Sometime between 1 and 15 secs after qemu is started it crashes as

Re: [Qemu-devel] [PATCH v5 3/5] coroutine: implement coroutines using gthread

2011-06-29 Thread Alexandre Raymond
Hi Andreas, This fixes Darwin/ppc64 (and ppc) v10.5. Don't know whether v10.6 / i386 might have a working implementation (cc'ing Alexand{re,er}). In 10.6, I get the following error when I try to compile a simple getcontext(): /usr/include/ucontext.h:42:2: error: #error ucontext routines are

Re: [Qemu-devel] [PATCH v2 1/2] coreaudio: Fix OSStatus format specifier

2011-06-28 Thread Alexandre Raymond
Sorry for the delay. Commit 744d3644181ddb16ef5944a0f9217e46961c8c84 works fine on OSX 10.6. Alexandre On Thu, Jun 23, 2011 at 10:58 AM, malc av1...@comtv.ru wrote: On Thu, 23 Jun 2011, Andreas F?rber wrote: OSStatus type is defined as SInt32. That's signed int on __LP64__ and signed long

Re: [Qemu-devel] [PATCH 0/2] iothread improvements for Mac OS X

2011-06-28 Thread Alexandre Raymond
a couple of weeks ago. Alexandre -- Tested-by: Alexandre Raymond cerb...@gmail.com

Re: [Qemu-devel] [RFC][PATCH] Register Linux dyntick timer as per-thread signal

2011-06-16 Thread Alexandre Raymond
Hi Jan, On Thu, Jun 16, 2011 at 5:31 AM, Jan Kiszka jan.kis...@siemens.com wrote: Ingo Molnar pointed out that sending the timer signal to the whole process, just blocking it everywhere, is suboptimal with an increasing number of threads. QEMU is using this pattern so far. I am not familiar

Re: [Qemu-devel] [PATCH] Fix signal handling of SIG_IPI when io-thread is enabled

2011-06-15 Thread Alexandre Raymond
Hi Jan, Why? Ahh, because of qemu_cpu_kick_self: raise(SIG_IPI)! That should generate a per-process SIG_IPI. And that may not only affect Darwin. Looks good. Actually, with io-thread enabled, it goes through qemu_cpu_kick_self() - qemu_cpu_kick_thread() - pthread_kill(..., SIG_IPI). I think

[Qemu-devel] [PATCH v2] Fix signal handling when io-thread is disabled

2011-06-14 Thread Alexandre Raymond
sigfd_handler() instead of triggering the signal handler directly, asynchronously. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- cpus.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpus.c b/cpus.c index 4ab76f0..18a1522 100644 --- a/cpus.c +++ b/cpus.c @@ -399,7

Re: [Qemu-devel] [PATCH] Fix signal handling when io-thread is disabled

2011-06-14 Thread Alexandre Raymond
Hi Jan, Thanks for reviewing my patch. But please pull the now common pthread_sigmask out of the #ifdef. Please see v2. Alexandre

[Qemu-devel] [PATCH] Fix signal handling of SIG_IPI when io-thread is enabled

2011-06-14 Thread Alexandre Raymond
by the cpu thread. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- cpus.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/cpus.c b/cpus.c index 18a1522..84ffd1c 100644 --- a/cpus.c +++ b/cpus.c @@ -394,10 +394,18 @@ static int qemu_signal_init(void

[Qemu-devel] [PATCH] Fix typo in cpus.c

2011-06-13 Thread Alexandre Raymond
filed - failed Signed-off-by: Alexandre Raymond cerb...@gmail.com --- cpus.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpus.c b/cpus.c index 1fc34b7..4ab76f0 100644 --- a/cpus.c +++ b/cpus.c @@ -297,7 +297,7 @@ static void qemu_event_increment(void

[Qemu-devel] [PATCH] Fix signal handling when io-thread is disabled

2011-06-13 Thread Alexandre Raymond
-by: Alexandre Raymond cerb...@gmail.com --- cpus.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index 4ab76f0..b6366b5 100644 --- a/cpus.c +++ b/cpus.c @@ -411,6 +411,7 @@ static int qemu_signal_init(void) sigaddset(set, SIGIO); sigaddset(set

Re: [Qemu-devel] [PATCH] cocoa: Avoid warning related to multiple handleEvent: definitions

2011-06-09 Thread Alexandre Raymond
Tested-by: Alexandre Raymond cerb...@gmail.com That's definitely a better patch ;-) Thanks, Alexandre On Thu, Jun 9, 2011 at 3:03 PM, Andreas Färber andreas.faer...@web.de wrote: Avoid compiler confusion as to which method signature to use for the handleEvent: selector on OSX = 10.6

Re: [Qemu-devel] [PATCH] sigfd: use pthread_sigmask

2011-06-08 Thread Alexandre Raymond
On Wed, Jun 8, 2011 at 6:55 PM, Alexander Graf ag...@suse.de wrote: Qemu uses signalfd to figure out, if a signal occured without the need to actually receive the signal. Instead, it can read from the fd to receive its news. Now, we obviously don't always have signalfd around. Especially not

Re: [Qemu-devel] [PATCH] Fix build on FreeBSD

2011-06-07 Thread Alexandre Raymond
Hi Nathan, On Sun, Jun 5, 2011 at 10:03 AM, Nathan Whitehorn nwhiteh...@freebsd.org wrote: On 06/02/11 10:01, Andreas Färber wrote: Am 31.05.2011 um 16:57 schrieb Nathan Whitehorn: Add some includes required to build qemu on FreeBSD. Missing Sob. Oops, I'll resubmit. ---

Re: [Qemu-devel] [PATCH] Cocoa: avoid warning related to multiple method definitions

2011-06-06 Thread Alexandre Raymond
Hi Andreas, On Tue, May 31, 2011 at 4:07 PM, Andreas Färber andreas.faer...@web.de wrote: Hello Alexandre, Am 30.05.2011 um 00:36 schrieb Alexandre Raymond: This fix forces a message to be sent to the handleEvent method of the QemuCocoaView class instead of letting the system determine

[Qemu-devel] [PATCH v2] Darwin: Fix compilation warning regarding the deprecated daemon() function

2011-06-06 Thread Alexandre Raymond
before including stdlib.h and declares it manually as an extern function. This way, the compiler does not see the declaration from stdlib.h and thus does not display the warning. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- osdep.h |1 + oslib-posix.c | 15 +++ qemu

Re: [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction (followup)

2011-06-05 Thread Alexandre Raymond
at 11:44 AM, Blue Swirl blauwir...@gmail.com wrote: On Fri, Jun 3, 2011 at 6:26 AM, Alexandre Raymond cerb...@gmail.com wrote: This patch removes all references to signal.h when qemu-common.h is included as they become redundant. This breaks the build. Maybe it depends on some previous patch

Re: [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction

2011-06-02 Thread Alexandre Raymond
On Thu, Jun 2, 2011 at 6:13 AM, Andreas Färber andreas.faer...@web.de wrote: Am 02.06.2011 um 04:21 schrieb Alexandre Raymond: Fix the following warning by including signal.h directly in qemu-common.h 8 iohandler.c: In function ‘qemu_init_child_watch’: iohandler.c:172: warning

Re: [Qemu-devel] [RFC PATCH] Darwin: Fix compilation warning regarding the deprecated daemon() function

2011-06-02 Thread Alexandre Raymond
Hi Andreas, On Thu, Jun 2, 2011 at 8:09 AM, Andreas Färber andreas.faer...@web.de wrote: Am 02.06.2011 um 04:45 schrieb Alexandre Raymond: On OSX 10.5, daemon() is deprecated, resulting int he following warning: = 10.5 http://developer.apple.com/library/mac/#documentation/Darwin/Reference

Re: [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction

2011-06-02 Thread Alexandre Raymond
Thanks Stefan, Should I send a follow-up patch to remove signal.h wherever qemu-common.h is already included? Alexandre On Thu, Jun 2, 2011 at 6:44 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Thu, Jun 2, 2011 at 3:21 AM, Alexandre Raymond cerb...@gmail.com wrote: Fix the following

[Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction (followup)

2011-06-02 Thread Alexandre Raymond
This patch removes all references to signal.h when qemu-common.h is included as they become redundant. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- audio/audio_pt_int.c |2 -- audio/sdlaudio.c |1 - block/raw-posix.c |2 -- bsd-user/syscall.c|1 - darwin

[Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction

2011-06-01 Thread Alexandre Raymond
-by: Alexandre Raymond cerb...@gmail.com --- qemu-common.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu-common.h b/qemu-common.h index b851b20..39fabc9 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -39,6 +39,7 @@ typedef struct Monitor Monitor; #include sys/stat.h

[Qemu-devel] [RFC PATCH] Darwin: Fix compilation warning regarding the deprecated daemon() function

2011-06-01 Thread Alexandre Raymond
://www.opensource.apple.com/source/mDNSResponder/mDNSResponder-258.18/mDNSPosix/PosixDaemon.c Signed-off-by: Alexandre Raymond cerb...@gmail.com --- qemu-nbd.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index e858033..10b0791 100644

Re: [Qemu-devel] [PATCH 1/6] Fix incorrect check for fdatasync() in configure

2011-05-29 Thread Alexandre Raymond
that this really is The Right Way to check. In fact, unistd.h defines this value to -1, at least on OSX 10.6.7. Add this check to the configure file. Signed-off-by: Alexandre Raymond cerb...@gmail.com Andreas --- configure |    8 +++- 1 files changed, 7 insertions(+), 1 deletions

[Qemu-devel] [PATCH V2 1/3] Darwin: Fix incorrect check for fdatasync() in configure

2011-05-29 Thread Alexandre Raymond
Under darwin (OS X 10.6.7), a symbol exists for the fdatasync() method but it is not supported because _POSIX_SYNCHRONIZED_IO is set to '-1'. Enable fdatasync() only if _POSIX_SYNCHRONIZED_IO is '0', as per The Open Group Base Specifications Issue 7. Signed-off-by: Alexandre Raymond cerb

[Qemu-devel] [PATCH V2 2/3] Cocoa: avoid displaying window when command-line contains '-h' or '-help'

2011-05-29 Thread Alexandre Raymond
There was already a check in place to avoid displaying a window in certain modes such as vnc, nographic or curses. Add a check for '-h' and '-help' to avoid displaying a window for a split- second before showing the usage information. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- ui

[Qemu-devel] [PATCH V2 0/3] Fix compilation issues under darwin

2011-05-29 Thread Alexandre Raymond
by Andreas * use '%td' in patch 5 instead of '%d' * remove patch 6; has already been taken into account by Stefan W. Thanks everyone for your feedback. Alexandre Alexandre Raymond (3): Darwin: Fix incorrect check for fdatasync() in configure Cocoa: avoid displaying window when command-line contains

[Qemu-devel] [PATCH] Cocoa: avoid warning related to multiple method definitions

2011-05-29 Thread Alexandre Raymond
: multiple methods named ‘-handleEvent:’ found /System/Library/Frameworks/AppKit.framework/Headers/NSTextInputContext.h:84: warning: using ‘-(BOOL)handleEvent:(NSEvent *)theEvent’ ui/cocoa.m:272: warning: also found ‘-(void)handleEvent:(NSEvent *)event’ 8--- Signed-off-by: Alexandre Raymond

[Qemu-devel] [PATCH 0/6] Fix compilation issues under darwin

2011-05-27 Thread Alexandre Raymond
Hello everyone, The following series contains trivial patches to fix several minor issues encountered while compiling qemu under OSX 10.6.7. I used [./configure --disable-bsd-user --disable-darwin-user --enable-io-thread] to configure the build. Cheers, Alexandre Alexandre Raymond (6): Fix

[Qemu-devel] [PATCH 1/6] Fix incorrect check for fdatasync() in configure

2011-05-27 Thread Alexandre Raymond
, unistd.h defines this value to -1, at least on OSX 10.6.7. Add this check to the configure file. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- configure |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/configure b/configure index a318d37..b21ef75 100755

[Qemu-devel] [PATCH 2/6] Cocoa: avoid displaying window when command-line contains '-h'

2011-05-27 Thread Alexandre Raymond
There was already a check in place to avoid displaying a window in certain modes such as vnc, nographic or curses. Add a check for '-h' to avoid displaying a window for a split- second before showing the usage information. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- ui/cocoa.m |3

[Qemu-devel] [PATCH 5/6] Remove warning in printf due to type mismatch

2011-05-27 Thread Alexandre Raymond
to describe their relative difference. Signed-off-by: Alexandre Raymond cerb...@gmail.com --- target-lm32/translate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-lm32/translate.c b/target-lm32/translate.c index eb21158..0f69f27 100644 --- a/target-lm32

[Qemu-devel] [PATCH 3/6] Fix compilation warning due to incorrectly specified type

2011-05-27 Thread Alexandre Raymond
: warning: assignment discards qualifiers from pointer target type (...) -8- Signed-off-by: Alexandre Raymond cerb...@gmail.com --- audio/coreaudio.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index 0a26413..3bd75cd 100644

[Qemu-devel] [PATCH 4/6] Fix missing prototype under cocoa for qemu_main

2011-05-27 Thread Alexandre Raymond
-by: Alexandre Raymond cerb...@gmail.com --- vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index b362871..b983646 100644 --- a/vl.c +++ b/vl.c @@ -107,6 +107,7 @@ int main(int argc, char **argv) #endif /* CONFIG_SDL */ #ifdef CONFIG_COCOA +int qemu_main

[Qemu-devel] [PATCH 6/6] Avoid compilation warning regarding kvm under darwin

2011-05-27 Thread Alexandre Raymond
8 qemu/target-s390x/helper.c:32:23: warning: linux/kvm.h: No such file or director 8 kvm.h, which is included right after this line, already includes linux/kvm.h with the proper CONFIG_KVM guard. Remove redundant include. Signed-off-by: Alexandre Raymond cerb...@gmail.com

Re: [Qemu-devel] [PATCH 5/6] Remove warning in printf due to type mismatch

2011-05-27 Thread Alexandre Raymond
:22, schrieb Alexandre Raymond: 8 qemu/target-lm32/translate.c: In function ‘gen_intermediate_code_internal’: qemu/target-lm32/translate.c:1135: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’ 8 Both gen_opc_ptr and gen_opc_buf are uint16_t