From patchwork Wed Apr 5 13:24:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 747294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vymqv3hLQz9s8B for ; Wed, 5 Apr 2017 23:28:11 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="cH/MREoE"; dkim-atps=neutral Received: from localhost ([::1]:40560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvkym-0006l9-Rj for incoming@patchwork.ozlabs.org; Wed, 05 Apr 2017 09:28:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvkvu-0004ZW-BH for qemu-devel@nongnu.org; Wed, 05 Apr 2017 09:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvkvt-0000Iq-AD for qemu-devel@nongnu.org; Wed, 05 Apr 2017 09:25:10 -0400 Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]:33691) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cvkvt-0000Hk-4Q for qemu-devel@nongnu.org; Wed, 05 Apr 2017 09:25:09 -0400 Received: by mail-wr0-x22d.google.com with SMTP id w43so14047405wrb.0 for ; Wed, 05 Apr 2017 06:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=24uhtL1rsRWJyGEN487kXclBTAGuCMUuaxwKASZpmQA=; b=cH/MREoE03CBTrH0bmhc20QlxoC/2BQDKC3m4GsfOlNj7/BiIVuJoCXZJ6L2yFOGUc 8XMs1JrND5IBxWjRKBjt1oVgWqzWT6XEQbgAFD8euzrP2yImVg4SbacNimGydtZN0BWK uO5E2UOwQxMUGIIUXdCFsVUM6T3AjZrygojBE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=24uhtL1rsRWJyGEN487kXclBTAGuCMUuaxwKASZpmQA=; b=PQNGtfbCGbOfZn44CkwjhGRgTajLl189NKEPyRx/xWi1VF7SP6XQf6MuJSWVQWkiSf fVv1DpfN9fyt/8UvbU2e19qhXR0lhXMbJ0GNRRc/CMbwSyNPXwLvf+lHpLGkpYHJJy/C j5FapWff117E8E0n329XWfvDDFxbvSSn9f+VI5UtojgK7mBodH+btGIsyskTD6mn3gIg j2Ls2phSCGODhhm/qeh50wH8MKvGQZ2/r92wAe0lhLtc8tpDS8A7L2NpY5TZ6CJhLafq t4GpC/xrKLwNjhXgepvCICSbfVRkzlLBzKTUp6cs4WoFjZaodZkrL4j2cASMhH+onaL0 yk6w== X-Gm-Message-State: AFeK/H3fGHb0GpUqInDl99bddXO8G278c2G5oQfZtphx128Nt9jXlHnlPlMur/xeMkc3RhLx X-Received: by 10.223.150.121 with SMTP id c54mr3150444wra.202.1491398707547; Wed, 05 Apr 2017 06:25:07 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id f62sm7761150wmh.33.2017.04.05.06.25.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 06:25:02 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 7352F3E088F; Wed, 5 Apr 2017 14:25:03 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: dovgaluk@ispras.ru, rth@twiddle.net, pbonzini@redhat.com Date: Wed, 5 Apr 2017 14:24:56 +0100 Message-Id: <20170405132503.32125-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170405132503.32125-1-alex.bennee@linaro.org> References: <20170405132503.32125-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22d Subject: [Qemu-devel] [PATCH v2 05/12] cpus: remove icount handling from qemu_tcg_cpu_thread_fn X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, peter.maydell@linaro.org, nikunj@linux.vnet.ibm.com, Peter Crosthwaite , a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, bobby.prani@gmail.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We should never be running in multi-threaded mode with icount enabled. There is no point calling handle_icount_deadline here so remove it and assert !use_icount. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- cpus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 68fdbc40b9..4e48b9c4ad 100644 --- a/cpus.c +++ b/cpus.c @@ -1392,6 +1392,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg) { CPUState *cpu = arg; + g_assert(!use_icount); + rcu_register_thread(); qemu_mutex_lock_iothread(); @@ -1434,8 +1436,6 @@ static void *qemu_tcg_cpu_thread_fn(void *arg) } } - handle_icount_deadline(); - atomic_mb_set(&cpu->exit_request, 0); qemu_tcg_wait_io_event(cpu); }