From patchwork Tue Feb 5 18:14:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1037037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MHSrAbqK"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43vCtY3vTqz9s7T for ; Wed, 6 Feb 2019 05:35:16 +1100 (AEDT) Received: from localhost ([127.0.0.1]:37579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr5Yw-0000jT-OD for incoming@patchwork.ozlabs.org; Tue, 05 Feb 2019 13:35:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr5GJ-0002Ln-Mo for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:16:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gr5GH-0003mf-Ft for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:15:59 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:41209) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gr5GH-0003WV-3f for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:15:57 -0500 Received: by mail-wr1-x42c.google.com with SMTP id x10so4691337wrs.8 for ; Tue, 05 Feb 2019 10:15:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=nT6J2BhVeHWp0Myzw3B3jQ9Cnnd15cJtDbyuf8Ygp1I=; b=MHSrAbqKxKKSPKahQnjjdmnj3luXE/1nayRwtmmZqXYZ7QWGYSMVn7XWUEgnNTzz62 SSW+YBey1XcdRVlW5MQTqqSgVRTvaGOK5pJ3+WwQimbf0bpQgUB+D5cpkpXiMg3/FZCs +/YmItM93wv4/GhS85xLS9oY/VVUTeOkrpq9+AQZbOeKSU1tcZoCUYiLaBieZMkteBtR deI1EZqmO0vFjwmQHAkbGOWvYmi6hJpFkNAAG+A9SQCg7Cl3/cg91WI2tmkotKtb/ZOw 7Ru/hrqtB+rhnLSSE50znHiBcggEWtWJmkjKiC8v3zkU38lJslZpOicevZB6g387PaF/ fYbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=nT6J2BhVeHWp0Myzw3B3jQ9Cnnd15cJtDbyuf8Ygp1I=; b=s+NUOLOOLwb8zfggYLxJ8e/7tJRBUa37pIZWqBejLM8LDI45zJCUEvovLaTMhQ3Hcr mG1y41y4WJZc/628BNj+R2syv2tyo/fJkvLnEkruWGVyg6Z4TgjQoI26NUZsUxF+Mscx jwGlMInCylU5ZMoU36wyL/0auBUNHecS+YsFkZfCy5LtDkReL4ODFWWHtqT50qSBwMdU SWhmSS0g1ucbJPsv6vRGi3cSVMxBzST0xjZsY8l8NPIjlUs0PHbWMwgSurPxnBA7DfjU OWoW6t4kFJ0CKLk3Q6fu2hdN9EhQX9JJMqIVW+WjYr1npGTGDLSXwF1ykj+p+k1XfYnv eOjw== X-Gm-Message-State: AHQUAuapWG0wlmtMdxVH//Vk97whTXOtZ9lncuTE7sb4V25WvxwJ4jAI dPh2TvdTNGoQeDi1L+0hpRJH3ez5 X-Google-Smtp-Source: AHgI3Ib4+w70RG+RuOzEHJeo0eEkztHkhaBLqnmLjhxTONr7fJI2uivZDI3V04ji3cWRBo6DIlXv0A== X-Received: by 2002:a5d:6187:: with SMTP id j7mr4705418wru.300.1549390536316; Tue, 05 Feb 2019 10:15:36 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id p5sm8931665wmh.16.2019.02.05.10.15.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 10:15:35 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 5 Feb 2019 19:14:18 +0100 Message-Id: <1549390526-24246-9-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1549390526-24246-1-git-send-email-pbonzini@redhat.com> References: <1549390526-24246-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42c Subject: [Qemu-devel] [PULL 08/76] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic 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: "Emilio G. Cota" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Just like we do in cpu_exec(). Reported-by: Max Filippov Tested-by: Max Filippov Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- accel/tcg/cpu-exec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 49b3259..fab30af 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -266,6 +266,9 @@ void cpu_exec_step_atomic(CPUState *cpu) #ifndef CONFIG_SOFTMMU tcg_debug_assert(!have_mmap_lock()); #endif + if (qemu_mutex_iothread_locked()) { + qemu_mutex_unlock_iothread(); + } assert_no_pages_locked(); }