From nobody Mon Feb 9 20:10:23 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.zohomail.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 1499240370659136.44183734437922; Wed, 5 Jul 2017 00:39:30 -0700 (PDT) Received: from localhost ([::1]:44595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSeuH-0002AR-Ew for importer@patchew.org; Wed, 05 Jul 2017 03:39:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSeX5-0004zU-MC for qemu-devel@nongnu.org; Wed, 05 Jul 2017 03:15:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSeX4-0007ro-QD for qemu-devel@nongnu.org; Wed, 05 Jul 2017 03:15:31 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:32809) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dSeX4-0007r7-Ku for qemu-devel@nongnu.org; Wed, 05 Jul 2017 03:15:30 -0400 Received: by mail-wr0-x243.google.com with SMTP id x23so49173699wrb.0 for ; Wed, 05 Jul 2017 00:15:30 -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 y35sm22202793wrc.51.2017.07.05.00.15.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 00:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=uY8b1+PsQay1HxMJulvbKsNHUBC91JB9HVcxSfUv8ac=; b=ISeZ0It5ZmjDEyDcVsTFlhmXFXLHHoQ9Hk1BHYYUpSEq+kZEfEvNVwm0HXbPi9aFza efxjzE5d9q2ZzAGdtXRGS49HpsfG2hnL0HrnkdEVIShPEVQKMhK3sznmJ66xMKJtwDOp zyLuDZcUIpT58xnuO5aH6R3ywilhxEwrm1NEZWIcTHjpHgdDsS41LSih0kWth5kBcmtg xA+TMGIe3FVzYIZNgimw2kh5tFp1YACoU2jKloSBBpsT3TA/bPAZf2UB91ziszyHeKUI pa7YAN3R2hDQai2lYdXHNbhzFx0F0Gbh/z16T/+Hn1lCgv7ZsF9yjdsbIXTum6sDLz6y Ta7Q== 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:subject:date:message-id :in-reply-to:references; bh=uY8b1+PsQay1HxMJulvbKsNHUBC91JB9HVcxSfUv8ac=; b=htr1jFLac6PzQZNmMR7CnQxXPsHNjE7I1pCrWrPh4+pmW6gtjRVu6wOf/gpJ8rBfQo 5um+6pUM8QWjdCFyFUyGN9G/x5svnhwp2nsl0jzXY1IgUIBfnZiFqQ1JR5ZlC+t2aC0k 4P203J8G/9IdcfHLBk2NoWPiHoHKNCIKVtZ22dbQ7e0igQXHaweDmRyJXSkPAX4GMS57 GU1KYvZzT/LMs3QoiK5jyGDQxnsFkpeK1Q/McAadg4oZNwe0bf4lRKxk8oM2qb2LGkv1 ayjEULuQp4WCTdRb1VM7tk4HpDIIfUs67O+/LxoXskjytCJfs6M6Od0fSv2V/TFf+goh kA7Q== X-Gm-Message-State: AKS2vOzCYOISm5MDIuGZnlJa9LgMbbMj/jhdAO/l7gnVJIlP/OMyB6SH OSvxouPnNSXnL7mkwBk= X-Received: by 10.223.136.109 with SMTP id e42mr36747914wre.81.1499238929542; Wed, 05 Jul 2017 00:15:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 09:14:37 +0200 Message-Id: <1499238885-26161-35-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1499238885-26161-1-git-send-email-pbonzini@redhat.com> References: <1499238885-26161-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:c0c::243 Subject: [Qemu-devel] [PULL 34/42] 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: , 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 --- 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