From patchwork Mon Apr 11 20:27:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 90693 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (unknown [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4ED82B6F08 for ; Tue, 12 Apr 2011 12:32:31 +1000 (EST) Received: from localhost ([::1]:56792 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9TP2-0007uv-LI for incoming@patchwork.ozlabs.org; Mon, 11 Apr 2011 22:32:28 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9SWy-0006bG-Tx for qemu-devel@nongnu.org; Mon, 11 Apr 2011 21:36:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9NiD-0003VQ-2f for qemu-devel@nongnu.org; Mon, 11 Apr 2011 16:27:54 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:46840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9NiC-0003Ux-T3 for qemu-devel@nongnu.org; Mon, 11 Apr 2011 16:27:53 -0400 Received: from smtp03.web.de ( [172.20.0.65]) by fmmailgate01.web.de (Postfix) with ESMTP id 2FC8318C085E8; Mon, 11 Apr 2011 22:27:52 +0200 (CEST) Received: from [92.75.138.150] (helo=localhost.localdomain) by smtp03.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1Q9NiC-0000Fe-00; Mon, 11 Apr 2011 22:27:52 +0200 From: Jan Kiszka To: qemu-devel@nongnu.org Date: Mon, 11 Apr 2011 22:27:44 +0200 Message-Id: <6716fa38e63b1b17a042ce007fd07677dd80c43e.1302553661.git.jan.kiszka@web.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX1/hcF5+gqpeEcOzzT+eCtP7UW4kYcoKDDysMOGD 8+MCajZECJG8/g3ZsXaQjj7e4qMbEBLse+JMbfHZ256BeY9ZvZ ycDNzhMio= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.221 Cc: Paolo Bonzini , Anthony Liguori , Marcelo Tosatti , Aurelien Jarno Subject: [Qemu-devel] [PATCH v2 3/3] Do not kick vcpus in TCG mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka In TCG mode, iothread and vcpus run in lock-step. So it's pointless to send a signal from qemu_cpu_kick to the vcpu thread - if we got here, the receiver already left the vcpu loop. Signed-off-by: Jan Kiszka --- cpus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpus.c b/cpus.c index 41bec7c..82a7806 100644 --- a/cpus.c +++ b/cpus.c @@ -860,7 +860,7 @@ void qemu_cpu_kick(void *_env) CPUState *env = _env; qemu_cond_broadcast(env->halt_cond); - if (!env->thread_kicked) { + if (kvm_enabled() && !env->thread_kicked) { qemu_cpu_kick_thread(env); env->thread_kicked = true; }