From patchwork Mon Apr 3 12:45:20 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: 96629 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp82077qgd; Mon, 3 Apr 2017 05:46:18 -0700 (PDT) X-Received: by 10.55.102.146 with SMTP id a140mr17488206qkc.28.1491223578165; Mon, 03 Apr 2017 05:46:18 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id o16si11801444qto.176.2017.04.03.05.46.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 03 Apr 2017 05:46:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cv1N9-0001g1-LG for patch@linaro.org; Mon, 03 Apr 2017 08:46:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cv1MU-0001LZ-1W for qemu-devel@nongnu.org; Mon, 03 Apr 2017 08:45:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cv1MR-00012l-PZ for qemu-devel@nongnu.org; Mon, 03 Apr 2017 08:45:34 -0400 Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]:33065) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cv1MR-00012N-Io for qemu-devel@nongnu.org; Mon, 03 Apr 2017 08:45:31 -0400 Received: by mail-wr0-x231.google.com with SMTP id w43so167567353wrb.0 for ; Mon, 03 Apr 2017 05:45:31 -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=htgqSzQ5qk5p5cwdQj4egyrMdL5TxnQDKTYbgd6tFcU=; b=JH1FeBDsu+/NmkiFGsJwPOmZENIhH85HHrpMkgl36VOTB6pSeR+p8jzJcZ+VwvCRv5 aryGP2LUCGVZdvUpGIt+vdDQk9RECg5dRw9jbVvlX1eA3/kS1d7QeO35tEHqV+OVyKHC 8/6el+Kr/fIYsrEV82o0l4b+aXsxH+TFxIdSU= 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=htgqSzQ5qk5p5cwdQj4egyrMdL5TxnQDKTYbgd6tFcU=; b=NeBDutJ0oImJshqXNAxmWzFikHFefOybd1Td/+1WtJ7rTocWQiNacQnolaI2khlTBB +WKjd45ckUcQ1T8kcHG1C9sSLVNDcH/hKIQeOOHPayMvJTF+UqVin5QDwy7iCqTljJn/ KDo3L10ffOS5vQviLUHWGubPIsA1Jv6DbLtNgn9nX0A+2LE/kjzv6Cb9hsEDFUFxGAEK 4YnGA4Sjp/hJmxKdidlQ1z1rPDkLltQEao4i0GyKFpSEZT/MyESGBTLRd1FyMc2e8tG6 L/e9qZMgALAnPOPsyNnVdMUpEtUvG4XIM6Qt5YLGwDEdaANFdgE0uOFmzB19+chdtNUF fk+w== X-Gm-Message-State: AFeK/H1dC4CL2cyesRIGA9gg25t9wmG9l729GoV13xW4x0nzKwtFv80P8CkAvJwoC6ipNBX/ X-Received: by 10.223.177.195 with SMTP id r3mr15339929wra.40.1491223530342; Mon, 03 Apr 2017 05:45:30 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id k32sm17972569wre.18.2017.04.03.05.45.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 05:45:26 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 1FC173E1068; Mon, 3 Apr 2017 13:45:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: dovgaluk@ispras.ru, rth@twiddle.net, pbonzini@redhat.com Date: Mon, 3 Apr 2017 13:45:20 +0100 Message-Id: <20170403124524.10824-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170403124524.10824-1-alex.bennee@linaro.org> References: <20170403124524.10824-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::231 Subject: [Qemu-devel] [RFC PATCH v1 5/9] 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_Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+patch=linaro.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 --- cpus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 Reviewed-by: Richard Henderson 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); }