From patchwork Thu Feb 23 01:14:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9587615 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 198C06020B for ; Thu, 23 Feb 2017 01:15:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0705E28716 for ; Thu, 23 Feb 2017 01:15:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED3D728726; Thu, 23 Feb 2017 01:15:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6481B28716 for ; Thu, 23 Feb 2017 01:15:05 +0000 (UTC) Received: from localhost ([::1]:55858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cghzs-0003Qh-JH for patchwork-qemu-devel@patchwork.kernel.org; Wed, 22 Feb 2017 20:15:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cghzc-0003QY-Fw for qemu-devel@nongnu.org; Wed, 22 Feb 2017 20:14:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cghzb-0001Sm-8d for qemu-devel@nongnu.org; Wed, 22 Feb 2017 20:14:48 -0500 Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]:33685) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cghzb-0001Se-2p for qemu-devel@nongnu.org; Wed, 22 Feb 2017 20:14:47 -0500 Received: by mail-oi0-x241.google.com with SMTP id 2so314607oif.0 for ; Wed, 22 Feb 2017 17:14:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2yeDezDKGJVZlwHomLqZOzHT6Z/E+errkBNEBdrsTrg=; b=pJD3iDDm68cNneghFeWSKyAbRrg5uglcPZB/9m2EbN4RoKsW/JbtihnYRKrnPuzME4 K+6FdwWthIQUn8V4BqjKqAPXJT1tqGYXmBFE1u92Xk0+G/36UfkYkIlWX+CZj7ojlU57 OQLnH83tnJcN+jYWJx0oWgHzm3O0MM1E/m4VVksvisTlRAk+PraFkwpG2FzzifTKZoAX S6KFlf5YsGIsS7YFveJhy1Nsf8JGdcRc1xG0gDhdk/ybJScxB/t+MtK5n2vVaWwTqmCf nNeCRT3YTXP56HHR3PAK1Et+Pg4Dro4xXg01cR4C52MsxpFqpyPC35H9rT/T1ii+/TQK S+qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2yeDezDKGJVZlwHomLqZOzHT6Z/E+errkBNEBdrsTrg=; b=bvr5Qh5Ic4o+hrN3jJ3dtfgl+qRh6HoQDSbQik+Z+DXcjtOwfh5ohJV/H4m70d3V6x +b9aK9W7nSwkC6612ZtLdvDIqcOGXrFb7MEH3PR4FTeHhx+hcarJyWUwIM32DwtazsJY Q7eTXsgqaw8EUzukuIMAnyYusx7XUGOtGLP7Sbqhi/zEJ2whbvQWRGAC7mPeOzBtWpZt 6U/lyw9mB6ChHlQmA0jlBhHV89ahWr+xsaTXb1S7O+1HJFDED5euIKb060XguNZHYKek 0fTnPLNN8eGF6PQi0yzG7Y6/QEwgB9UEZg7q7eL8aMpkbHD2Kex4xmS1tX3ARDCPyGMl Nh+A== X-Gm-Message-State: AMke39knfcmwVadDTspi7Hl7BcgYJWL7mpC81E1JLaVKXqBkxgpq9q6ewH3Rn32gBrVAkXRBqmn1TdrSkoauiw== X-Received: by 10.202.178.11 with SMTP id b11mr19885493oif.101.1487812486299; Wed, 22 Feb 2017 17:14:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.2.70 with HTTP; Wed, 22 Feb 2017 17:14:15 -0800 (PST) In-Reply-To: <871suqvt0z.fsf@linaro.org> References: <20170222171327.26624-1-alex.bennee@linaro.org> <148778745330.150.5479386803551876071@0e2666bad730> <8737f6vw37.fsf@linaro.org> <871suqvt0z.fsf@linaro.org> From: Pranith Kumar Date: Wed, 22 Feb 2017 20:14:15 -0500 Message-ID: To: =?UTF-8?B?QWxleCBCZW5uw6ll?= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::241 Subject: Re: [Qemu-devel] [PATCH v13 00/24] MTTCG Base enabling patches with ARM enablement 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 Devel , Peter Maydell , Fam Zheng , nikunj@linux.vnet.ibm.com, Jan Kiszka , Mark Burton , qemu-devel , alvise rigo , "Emilio G. Cota" , Paolo Bonzini , Sergey Fedorov , =?UTF-8?B?S09OUkFEIEZyw6lkw6lyaWM=?= , Bamvor Zhang Jian , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Feb 22, 2017 at 4:02 PM, Alex Bennée wrote: > > Alex Bennée writes: > >> no-reply@patchew.org writes: >> >>> Hi, >>> >>> This series failed build test on s390x host. Please find the details >>> below. > > It also failed on x86-on-x86 MTTCG as well as other tests: > >>> ERROR:/var/tmp/patchew-tester-tmp-_186415r/src/cpus.c:1554:qemu_mutex_lock_iothread: assertion failed: (!qemu_mutex_iothread_locked()) >>> GTester: last random seed: R02Sf1ce767b432f1559eaf8cc0c5a31eb02 >> >> Well I've seen this before if the IRQ chain doesn't do locking properly >> but I'm at a loss why this breaks on an s390 host as the code is common. >> >> Does anyone have a spare s390 that I can test on? > > Look like I'll have to roll this in: > > https://github.com/stsquad/qemu/commit/c6f4245ffd9df8ffcd2d4d655c322189c19a6c1a > I am able to successfully boot my test images using this patch (they fail without it). Another approach might be to reset the lock in the outer loop: I think either patch is fine. Thanks, diff --git a/cpu-exec.c b/cpu-exec.c index f3c78a9..8327050 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -684,6 +684,9 @@ int cpu_exec(CPUState *cpu) if the guest is in advance */ align_clocks(&sc, cpu); } + if (qemu_mutex_iothread_locked()) { + qemu_mutex_unlock_iothread(); + } } cc->cpu_exec_exit(cpu);