From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cK00F-0002Od-Mc for qemu-devel@nongnu.org; Thu, 22 Dec 2016 04:49:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cK00F-0003JY-1i for qemu-devel@nongnu.org; Thu, 22 Dec 2016 04:49:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45374) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cK00E-0003IE-Rq for qemu-devel@nongnu.org; Thu, 22 Dec 2016 04:49:34 -0500 References: From: Paolo Bonzini Message-ID: <3de5e377-b08e-d286-219f-36e4208bdfdc@redhat.com> Date: Thu, 22 Dec 2016 10:49:30 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 4/4] hax: add Darwin support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincent Palatin , qemu-devel Cc: Yu Ning , Stefan Weil , "Michael S . Tsirkin" , Eduardo Habkost , Marcelo Tosatti On 19/12/2016 17:24, Vincent Palatin wrote: > diff --git a/cpus.c b/cpus.c > index 0e01791..b8db313 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -1264,6 +1264,11 @@ static void qemu_cpu_kick_thread(CPUState *cpu) > return; > } > cpu->thread_kicked = true; > +#ifdef CONFIG_DARWIN > + if (hax_enabled()) { > + cpu->exit_request = 1; > + } > +#endif > err = pthread_kill(cpu->thread->thread, SIG_IPI); > if (err) { > fprintf(stderr, "qemu:%s: %s", __func__, strerror(err)); Instead of this, please place the "if" in qemu_cpu_kick before the call to qemu_cpu_kick_thread. This way, it will be common to Win32 and Darwin. Thanks, Paolo