From patchwork Thu Mar 13 14:17:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 26203 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f199.google.com (mail-ig0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C7284206A0 for ; Thu, 13 Mar 2014 14:17:35 +0000 (UTC) Received: by mail-ig0-f199.google.com with SMTP id uy17sf4009420igb.2 for ; Thu, 13 Mar 2014 07:17:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=BJI57hCe1+T8HAKa5b+UmdgkakslYFL9k5T3c5W9L+Q=; b=Jd6q/BS7U71Mj80nuEgl56DZZh5wtuRtjHBG6ImQ9OcCy0v2s6tTtWqVV+d1PEPP9u fHBugjaZvBKhZ/XoW6MHvAYVjh9IHzCcCBxHkVBCJ8ZR7Je3tXTiOxzmSrHBQymT5vfM L7GNVjFW/HP8vmygrHNAQb131cgBFMkFu7LsoKMpT3QclnsrNTblXifyV+01diCyLoE5 htmEdOakl5H+kF9v33icaNyiHWwq8M6v8huYkzX8XQkoJATlj+QzGRESHDG8s2AX0TkG QL/88Ynod8dPL9zAKP20eLDTsiqQPe3YCwnjM9FUuz08Y0QyYLePTUhMZdJFGrfwrzfE WSzw== X-Gm-Message-State: ALoCoQn0UpIAlC40Cgu5YxTh2pwWLUIOrD1jxNc5ZAxDqrOY6Pe8ddxxf6LrnnKFGbpoJ/0/PYkJ X-Received: by 10.43.101.202 with SMTP id db10mr739057icc.9.1394720254993; Thu, 13 Mar 2014 07:17:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.29.134 with SMTP id b6ls324986qgb.91.gmail; Thu, 13 Mar 2014 07:17:34 -0700 (PDT) X-Received: by 10.58.161.101 with SMTP id xr5mr757716veb.36.1394720254817; Thu, 13 Mar 2014 07:17:34 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id sn5si869943vdc.24.2014.03.13.07.17.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 07:17:34 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id il7so1170029vcb.32 for ; Thu, 13 Mar 2014 07:17:34 -0700 (PDT) X-Received: by 10.221.37.1 with SMTP id tc1mr1077231vcb.32.1394720254717; Thu, 13 Mar 2014 07:17:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.78.9 with SMTP id i9csp370772vck; Thu, 13 Mar 2014 07:17:33 -0700 (PDT) X-Received: by 10.194.90.107 with SMTP id bv11mr1940760wjb.11.1394720252866; Thu, 13 Mar 2014 07:17:32 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id oq8si1565293wjc.167.2014.03.13.07.17.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 13 Mar 2014 07:17:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WO6Rt-0003TH-2p; Thu, 13 Mar 2014 14:17:29 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , Stefan Hajnoczi Subject: [PATCH] main-loop: Suppress "I/O thread spun" warnings for qtest Date: Thu, 13 Mar 2014 14:17:29 +0000 Message-Id: <1394720249-13318-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When running under qtest we don't actually have any vcpu threads to be starved, so the warning about the I/O thread spinning isn't relevant, and the way qtest manipulates the simulated clock means the warning is produced a lot as a false positive. Suppress it if qtest_enabled(), so 'make check' output is less noisy. Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber Reviewed-by: Stefan Hajnoczi --- main-loop.c | 3 ++- stubs/Makefile.objs | 1 + stubs/qtest.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 stubs/qtest.c diff --git a/main-loop.c b/main-loop.c index c3c9c28..8a85493 100644 --- a/main-loop.c +++ b/main-loop.c @@ -25,6 +25,7 @@ #include "qemu-common.h" #include "qemu/timer.h" #include "qemu/sockets.h" // struct in_addr needed for libslirp.h +#include "sysemu/qtest.h" #include "slirp/libslirp.h" #include "qemu/main-loop.h" #include "block/aio.h" @@ -208,7 +209,7 @@ static int os_host_main_loop_wait(int64_t timeout) if (!timeout && (spin_counter > MAX_MAIN_LOOP_SPIN)) { static bool notified; - if (!notified) { + if (!notified && !qtest_enabled()) { fprintf(stderr, "main-loop: WARNING: I/O thread spun for %d iterations\n", MAX_MAIN_LOOP_SPIN); diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index df3aa7a..6f06fca 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -28,3 +28,4 @@ stub-obj-y += vmstate.o stub-obj-$(CONFIG_WIN32) += fd-register.o stub-obj-y += cpus.o stub-obj-y += kvm.o +stub-obj-y += qtest.o diff --git a/stubs/qtest.c b/stubs/qtest.c new file mode 100644 index 0000000..e671ed8 --- /dev/null +++ b/stubs/qtest.c @@ -0,0 +1,14 @@ +/* + * qtest stubs + * + * Copyright (c) 2014 Linaro Limited + * Written by Peter Maydell + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu-common.h" + +/* Needed for qtest_allowed() */ +bool qtest_allowed;