Message ID | 20230110173922.265055-27-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2872850pvb; Tue, 10 Jan 2023 11:07:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXtlYpIsvq02q7O/FJw4Z/0VzcPq9AjdPHhhZTth/JDXv6A2vxWhg97o3wMdj6zKf8hdV3XM X-Received: by 2002:a05:7508:4388:b0:49:20de:9a98 with SMTP id y8-20020a057508438800b0004920de9a98mr1539157gby.12.1673377628273; Tue, 10 Jan 2023 11:07:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673377628; cv=none; d=google.com; s=arc-20160816; b=VHoIs3LgvICUVNtx2fQ8ZHeSTgEAm2KASjqE809/xiR2KhnhIiqLsBKrS0q+HCtWkH v2N5nPBmn3VChL22Bw7EraVMbGtN4qh4STeruWzo9OK22ZsNL4D83rqR1HbvblQkMWxI QQdadVSWWt8je+nt0TRBNXG2tW07JhiRYZaX/9DC+BBkAm63fxy4ExtS71EyBOp3m+8v GI53Xx2oBTbVqx0SUTLlBE2Hm3qqeYXEokloCM6btT21O6dxbsHsG86ml+EYKDZpFX/U g2dv6CrbXZxZkKvaXu9T3jIqTSMjJoJBg4k05yz0eNrRNdKJvWsSbDPUvtPqIV1YaqRh MW0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SFp5fLykrTmSrzOYijtFAOoQNLwJRutVy2bxJGeiOow=; b=poV8hMbYNhOD8QHargYayx5QcBm2ZJ+QAlTZSnu8OMuJQaheaprNvtMAuw0VJgMST1 vj0y+e4YpNtcmSvRdcnOjRru0/7vzCyENTcF3aPzdGWMDzDhCiRo4J4qaSSNNWFtYCsq fxwX3JS8S4Pfe9XXyDjhjGhHBOtENkXf7eE7lXSFbp1PMPTeLF1DCe4i1bnmTotFkFgl +SpA0kCF1rZ7el4lesxv5cWdsnBvV1ZSGPIlhz2LibgXSFcSkkX5FouXTGHAL3MXQ6QF J4mISU44zWzOZFY/1qWh94r4H1r3Rl4SizkA/ccT1nki6Z1idDJwGGrqqT0J1Aaj25Na xjXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qgXIUn96; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e15-20020ab0314f000000b0047652743be2si2785221uam.94.2023.01.10.11.07.08 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2023 11:07:08 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qgXIUn96; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1pFIiH-000760-3t; Tue, 10 Jan 2023 12:47:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1pFIiE-00072N-8v for qemu-devel@nongnu.org; Tue, 10 Jan 2023 12:47:02 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1pFIiC-0003aS-JM for qemu-devel@nongnu.org; Tue, 10 Jan 2023 12:47:01 -0500 Received: by mail-wr1-x42a.google.com with SMTP id bs20so12610928wrb.3 for <qemu-devel@nongnu.org>; Tue, 10 Jan 2023 09:47:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SFp5fLykrTmSrzOYijtFAOoQNLwJRutVy2bxJGeiOow=; b=qgXIUn96/XpkFKbF8mC+27Idw4WpE34vO5zxCuMhIeV18k0x8CLEXePY1w1j2j+GqN hmC63EGoL18CFoOdXuvBSzQ10uGedVmMbY/Wrg+shxs8T6IFtAekZgFhh5v27UxkEJNB S8pdE+5lQj3NkPlLNo/VehZGJEIMW8IoczmbKGXDWBaue6PPuUWjlhajkNL47eXqgxF4 no1dRRFGyf+sf5Fu+scLzGq7KOnLh7GTG7wvsH2ABxbRzf0GCoBxa2TUBTdY8LUirGwM 3vAIBv4w8tzbM1LUd+CTJuYa5oFITtkcoZJ/wc68Meq9iOgjGCmuxylyGzZND8yJXyxh Q1+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SFp5fLykrTmSrzOYijtFAOoQNLwJRutVy2bxJGeiOow=; b=QF5hMmfTr0Vly3WpI4swrd4cQ/7TZcJPQbzOnpydEAkVh/GM3DA8ATEAmVPeKbO0m2 dshHFkbMjxtyPhYVY4yl10rPO7q3UzPXKC3K79OI/7naIXkuwV5z1BXEDgdh2Dhm2RLo 6iWgt0SCqSkIrgzY3T+W72rnVd62+NIOV5/H7QQNMejCq0Q2YncZJl9IMsAuuLEtXEag kRhBsaZgiVMW5ZUNaUHlbm8Dg7nVtU0//2VlVhm1LvFHe1mNgExB6zEajRRNr5E0aOwt D4EZyfY1AYaQb2Z3E+s9IWiHnBc0suUDyDEDvyJU0sxi4KOlM9fboX98ulrQGn4CgJcq +8Eg== X-Gm-Message-State: AFqh2kpOxHNfI8fyzbZjg0Xx+EImYMIqP62Je/qRfxsda2i/0CEfq9sS Cm4mqPAiB4McmDMEfKqp9iYudg== X-Received: by 2002:a5d:6145:0:b0:2bb:6b92:d4cc with SMTP id y5-20020a5d6145000000b002bb6b92d4ccmr8176826wrt.53.1673372818709; Tue, 10 Jan 2023 09:46:58 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id z2-20020a5d6402000000b00297dcfdc90fsm11713916wru.24.2023.01.10.09.46.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 09:46:58 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 249D91FFCF; Tue, 10 Jan 2023 17:39:26 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, Alexandre Iooss <erdnaxe@crans.org>, Beraldo Leal <bleal@redhat.com>, Thomas Huth <thuth@redhat.com>, John Snow <jsnow@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Ed Maste <emaste@freebsd.org>, Yanan Wang <wangyanan55@huawei.com>, Cleber Rosa <crosa@redhat.com>, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, Li-Wen Hsu <lwhsu@freebsd.org>, Markus Armbruster <armbru@redhat.com>, Jagannathan Raman <jag.raman@oracle.com>, =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= <berrange@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= <philmd@linaro.org>, Michael Roth <michael.roth@amd.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= <alex.bennee@linaro.org>, qemu-arm@nongnu.org, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Mahmoud Mandour <ma.mandourr@gmail.com>, John G Johnson <john.g.johnson@oracle.com>, Emilio Cota <cota@braap.org> Subject: [PATCH 26/26] cpu-exec: assert that plugin_mem_cbs is NULL after execution Date: Tue, 10 Jan 2023 17:39:22 +0000 Message-Id: <20230110173922.265055-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230110173922.265055-1-alex.bennee@linaro.org> References: <20230110173922.265055-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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: <https://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> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
current maintainer trees (testing/semihosting/plugins)
|
expand
|
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index e0ebedef84..fb338ba576 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -59,6 +59,8 @@ get_plugin_meminfo_rw(qemu_plugin_meminfo_t i) #ifdef CONFIG_PLUGIN extern QemuOptsList qemu_plugin_opts; +#define QEMU_PLUGIN_ASSERT(cond) g_assert(cond) + static inline void qemu_plugin_add_opts(void) { qemu_add_opts(&qemu_plugin_opts); @@ -250,6 +252,8 @@ void qemu_plugin_user_postfork(bool is_child); #else /* !CONFIG_PLUGIN */ +#define QEMU_PLUGIN_ASSERT(cond) + static inline void qemu_plugin_add_opts(void) { } diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 6bd29227f3..f272504611 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -504,6 +504,7 @@ static void cpu_exec_exit(CPUState *cpu) if (cc->tcg_ops->cpu_exec_exit) { cc->tcg_ops->cpu_exec_exit(cpu); } + QEMU_PLUGIN_ASSERT(cpu->plugin_mem_cbs == NULL); } void cpu_exec_step_atomic(CPUState *cpu) @@ -1031,6 +1032,7 @@ int cpu_exec(CPUState *cpu) cpu_loop_exec_tb(cpu, tb, pc, &last_tb, &tb_exit); + QEMU_PLUGIN_ASSERT(cpu->plugin_mem_cbs == NULL); /* Try to align the host and virtual clocks if the guest is in advance */ align_clocks(&sc, cpu);