From nobody Mon Feb 9 18:44:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149910045810755.64197079845644; Mon, 3 Jul 2017 09:47:38 -0700 (PDT) Received: from localhost ([::1]:36321 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dS4Vb-0002Hn-Su for importer@patchew.org; Mon, 03 Jul 2017 12:47:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dS4KR-0000tp-L7 for qemu-devel@nongnu.org; Mon, 03 Jul 2017 12:36:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dS4KO-00088L-Q6 for qemu-devel@nongnu.org; Mon, 03 Jul 2017 12:36:03 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:35798) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dS4KO-00087u-KG for qemu-devel@nongnu.org; Mon, 03 Jul 2017 12:36:00 -0400 Received: by mail-wm0-x243.google.com with SMTP id u23so21542657wma.2 for ; Mon, 03 Jul 2017 09:36:00 -0700 (PDT) Received: from 640k.lan (94-39-191-51.adsl-ull.clienti.tiscali.it. [94.39.191.51]) by smtp.gmail.com with ESMTPSA id r5sm4867459wmr.9.2017.07.03.09.35.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jul 2017 09:35:58 -0700 (PDT) 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=uY8b1+PsQay1HxMJulvbKsNHUBC91JB9HVcxSfUv8ac=; b=Od12/1MJwUy1YsVuq2EiCZmHlWuyMoCmyCqKCZRtcdXI+76JTkxPR4GicuVtdtjKgO LI3EN9PWaZ1kj23joPRctJHKhprYRbt8YFwSwbKY9hVKV7MlAQ2s4BcHwMEP8zBwhQYC +peLIjWs6jD4oPsw0qt/nAHhvL8o5Rblor6Fnda4HBc1IGjQhYX+HY7EWRo+q7Io6cSC nYaxKrDXUC5jAKAI1ztY7Tb/3kKnac2iE5Tz/jeubBjHc6xkMboYyxumrAMVQHrKqrYb 8Nt1r7G43VaXeyTlfINeUfHQjwxQLwC2bQn8SFg5+3XD55rF6q93Jssfmxhh2ttrkLjt lq9Q== 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=uY8b1+PsQay1HxMJulvbKsNHUBC91JB9HVcxSfUv8ac=; b=MBgCz3km6pgPlUM7Lp+AubO+N0+QtoPuWFYP2qIRVc8epJPDtM2KFQ2ZP0wOsCVwga IYriMrx9SBwa4EVhp8/uea7xeD9NLHIKx1XaR2ZHz0A+QX1T1tNgS06XZtPx7ssl/5Y5 n+1oUM74BzeBtVgnRbXyd9uYGLmP9ELHpeCKyI91AfITlK7nuBB185qCUaO1eDya473h Jo1gJQBS7fd52817w/CvnVVBXQmlg7G37w9EuZbXj/78XAez0OVymtaKetZUt3Hpm8TO Gt5jp6hTPscplLhCLiw6wqA3ikvHfDq8kRCcwciwFFBGDftJSycSl0TMjgrro0s+t07o kpcg== X-Gm-Message-State: AIVw110lfRXb8vgvyKn2BIetprdSBPfg9qc4R/BUVKVsFd2b+IUL+7pV EkcAWprbD2dYanrc+xs= X-Received: by 10.28.88.3 with SMTP id m3mr10491079wmb.28.1499099759408; Mon, 03 Jul 2017 09:35:59 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 3 Jul 2017 18:34:44 +0200 Message-Id: <1499099693-22903-14-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1499099693-22903-1-git-send-email-pbonzini@redhat.com> References: <1499099693-22903-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:400c:c09::243 Subject: [Qemu-devel] [PATCH 13/22] exec: elide calls to tb_lock and tb_unlock 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: yang.zhong@intel.com, thuth@redhat.com, a.rigo@virtualopensystems.com, anthony.xu@intel.com, rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Adding assertions fixes link errors. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson --- exec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/exec.c b/exec.c index ee61915..a083ff8 100644 --- a/exec.c +++ b/exec.c @@ -2317,6 +2317,7 @@ static void notdirty_mem_write(void *opaque, hwaddr r= am_addr, { bool locked =3D false; =20 + assert(tcg_enabled()); if (!cpu_physical_memory_get_dirty_flag(ram_addr, DIRTY_MEMORY_CODE)) { locked =3D true; tb_lock(); @@ -2375,6 +2376,7 @@ static void check_watchpoint(int offset, int len, Mem= TxAttrs attrs, int flags) CPUWatchpoint *wp; uint32_t cpu_flags; =20 + assert(tcg_enabled()); if (cpu->watchpoint_hit) { /* We re-entered the check after replacing the TB. Now raise * the debug interrupt so that is will trigger after the @@ -2820,6 +2822,7 @@ static void invalidate_and_set_dirty(MemoryRegion *mr= , hwaddr addr, cpu_physical_memory_range_includes_clean(addr, length, dirty_l= og_mask); } if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) { + assert(tcg_enabled()); tb_lock(); tb_invalidate_phys_range(addr, addr + length); tb_unlock(); --=20 1.8.3.1