Message ID | 87poo96kmc.fsf@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> 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 6EDA66048B for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 12 Sep 2016 18:27:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A52928DFD for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 12 Sep 2016 18:27:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EEFF28E22; Mon, 12 Sep 2016 18:27:24 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 D803128DFD for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 12 Sep 2016 18:27:23 +0000 (UTC) Received: from localhost ([::1]:44545 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1bjVwx-0001ta-0A for patchwork-qemu-devel@patchwork.kernel.org; Mon, 12 Sep 2016 14:27:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <bobby.prani@gmail.com>) id 1bjVwY-0001qZ-U3 for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:27:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <bobby.prani@gmail.com>) id 1bjVwU-0006Nh-Ky for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:26:57 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:35680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <bobby.prani@gmail.com>) id 1bjVwU-00067f-FJ for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:26:54 -0400 Received: by mail-yw0-f193.google.com with SMTP id u82so3610355ywc.2 for <qemu-devel@nongnu.org>; Mon, 12 Sep 2016 11:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version; bh=NgWlAzEfK5CuTn1mie/HvMbfDyWDaa5ZyN2yjiSLKhE=; b=asP9prIp3T4UFqFFSCIpkU6Z/9pGGcdFuLhqQgUwNfESqCgqcLSFTlWl7mwj4JnCog t4MRebY0H7ucLsRgKSArwP+GgLpUwDFrK/trcRT36aDj7e8/JtX3cYIY8Znorawk+/8s TP40y2qgjMJzSJErj2nk8eTPBJyRWvFLQAx2VPfujVlT8xlhKTLmuKERYXkAnG8kabIC fl6GJq/QM/b3GX43OBeCLHofCQg64WVVCKW/68zZwcoOtm0pkxg4WYcha4jEh27KRrsX tgVfY1gWox1GSu/uX4SK/VsoH0gErgP/l88LR5S8V5n/UXrfauazBd2+P+J4UCj1eSmV negQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:references:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=NgWlAzEfK5CuTn1mie/HvMbfDyWDaa5ZyN2yjiSLKhE=; b=kfENRp4J54X7Emsvzz48D+6FIJl7DPuLKjHWfQQ+V6Hsna+cZaKXGSto6qmNjhA8ya /nWR4XbVnPTZZ2cVlI/awHi5wybRcsEeWsmdYLUaIN5ZDI8YJsqTIKcdL6Zexel6W/ZL XE7bBEP1AXfqH4pUd0FcXbQ0ef0ApJ4KPneDUXNolKWk1JHZ9rsbg//TnROvJSBfpCaD C7Sp++3weEasf/Sp2UHjsEFxgPSc+WZMj4xS9V/fhq6cS0IcBAcVhbj5/FlGEZP67Spw Vr5SYq+5Dp9fGWdaCW8nAWhuyl+1wFjgVKoEykaY8O/PmIZLk/7yL8cLf12Pt1xtyz4w JfIA== X-Gm-Message-State: AE9vXwMbiLVOeYDABfpjNrk/sdYAgbHF3MhtT6cbF0VRTxRf5MbOVN7fUJes44L/kkS0Hw== X-Received: by 10.129.78.15 with SMTP id c15mr17110319ywb.163.1473704732759; Mon, 12 Sep 2016 11:25:32 -0700 (PDT) Received: from evgadesktop (108-232-152-155.lightspeed.tukrga.sbcglobal.net. [108.232.152.155]) by smtp.gmail.com with ESMTPSA id f203sm7466562ywb.52.2016.09.12.11.25.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Sep 2016 11:25:31 -0700 (PDT) References: <1472725227-10374-1-git-send-email-pbonzini@redhat.com> <1472725227-10374-11-git-send-email-pbonzini@redhat.com> From: Pranith Kumar <bobby.prani@gmail.com> To: Paolo Bonzini <pbonzini@redhat.com> In-reply-to: <1472725227-10374-11-git-send-email-pbonzini@redhat.com> Date: Mon, 12 Sep 2016 14:25:31 -0400 Message-ID: <87poo96kmc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.161.193 Subject: Re: [Qemu-devel] [PATCH 10/12] cpus-common: Introduce async_safe_run_on_cpu() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Sergey Fedorov <serge.fdrv@gmail.com>, "Emilio G. Cota" <cota@braap.org>, Alex =?utf-8?Q?Benn=C3=A9e?= <alex.bennee@linaro.org>, qemu-devel@nongnu.org, Sergey Fedorov <sergey.fedorov@linaro.org> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/cpus-common.c b/cpus-common.c index 443617a..579917f 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/main-loop.h" #include "cpu.h" #include "sysemu/cpus.h" #include "exec/memory-internal.h" @@ -269,9 +270,11 @@ static void async_safe_run_on_cpu_fn(CPUState *cpu, void *data) { SafeWorkItem *w = data; + qemu_mutex_unlock_iothread(); start_exclusive(); w->func(cpu, w->data); end_exclusive(); + qemu_mutex_lock_iothread(); g_free(w); }