From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPY87-0002If-8w for qemu-devel@nongnu.org; Wed, 12 Aug 2015 11:39:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPY82-00014M-9U for qemu-devel@nongnu.org; Wed, 12 Aug 2015 11:39:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPY82-00014C-3j for qemu-devel@nongnu.org; Wed, 12 Aug 2015 11:39:46 -0400 References: <1439220437-23957-1-git-send-email-fred.konrad@greensocs.com> <55C9EE60.80004@redhat.com> <55C9FFC0.7040502@greensocs.com> <55CB63FA.1070200@greensocs.com> From: Paolo Bonzini Message-ID: <55CB68B7.9040609@redhat.com> Date: Wed, 12 Aug 2015 17:39:35 +0200 MIME-Version: 1.0 In-Reply-To: <55CB63FA.1070200@greensocs.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH V7 00/19] Multithread TCG. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Frederic Konrad , qemu-devel@nongnu.org, mttcg@greensocs.com Cc: mark.burton@greensocs.com, alex.bennee@linaro.org, a.rigo@virtualopensystems.com, guillaume.delbergue@greensocs.com On 12/08/2015 17:19, Frederic Konrad wrote: > BTW that affect KVM as well. Seems this mechanism is used as well with > qemu_cpu_kick_self().. Which is a little strange as it seems the SIGIPI > trigger a > dummy signal handler? >=20 > memset(&sigact, 0, sizeof(sigact)); > sigact.sa_handler =3D dummy_signal; > sigaction(SIG_IPI, &sigact, NULL); KVM is different, the signal handler is used to kick the VM out of KVM_RUN. We're going to add another path (a ioctl) but it cannot use the same code as TCG. qemu_cpu_kick_self is needed in some special cases where KVM tells you "call KVM_RUN asap" but you know you have more work to do in userspace. Calling qemu_cpu_kick_self lets you call KVM_RUN work and immediately do the userspace work. Paolo