{"id":2222904,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2222904/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260414003001.97571-22-philmd@linaro.org/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.1/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260414003001.97571-22-philmd@linaro.org>","date":"2026-04-14T00:29:53","name":"[v3,21/27] monitor: Forward-declare the MonitorDef type","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"96df2130d490929ea9119a299d6b2859430d25db","submitter":{"id":85046,"url":"http://patchwork.ozlabs.org/api/1.1/people/85046/?format=json","name":"Philippe Mathieu-Daudé","email":"philmd@linaro.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260414003001.97571-22-philmd@linaro.org/mbox/","series":[{"id":499762,"url":"http://patchwork.ozlabs.org/api/1.1/series/499762/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499762","date":"2026-04-14T00:29:32","name":"monitor: Remove need of per-target handlers","version":3,"mbox":"http://patchwork.ozlabs.org/series/499762/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2222904/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2222904/checks/","tags":{},"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=fF1Qx1SO;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvlcP0tNwz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 10:33:09 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wCRhp-0007yX-8v; Mon, 13 Apr 2026 20:32:41 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1wCRho-0007si-DW\n for qemu-devel@nongnu.org; Mon, 13 Apr 2026 20:32:40 -0400","from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1wCRhn-0003Qf-0d\n for qemu-devel@nongnu.org; Mon, 13 Apr 2026 20:32:40 -0400","by mail-wm1-x32a.google.com with SMTP id\n 5b1f17b1804b1-488a14c31eeso41171555e9.0\n for <qemu-devel@nongnu.org>; Mon, 13 Apr 2026 17:32:38 -0700 (PDT)","from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488ede1513csm6532565e9.2.2026.04.13.17.32.36\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Mon, 13 Apr 2026 17:32:36 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1776126757; x=1776731557; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=/VyMpbZZBycD9uof5+Mpu9kfOlAUg4ZoswdMUmEvtEU=;\n b=fF1Qx1SOtv+N82yZCJqHFDysCP7ZWqobntnoGtUEV0HfT2c+y19cZ3S/oplMI8MRnj\n AzqQPN2HTaxh+/kwoB8uj2f91W2DBHqie1WJ/fmcnUmDMX1cxcslaScTQPW8ifuLc/Xw\n 1Uqd5vW3JjsFZ1v/AeA8MIyicK4LecWv3s7VwZTlwj1K8IvxrTvwotlk3PUJEIYDHvMT\n pyV4OIvY6stwMsqShQ9L+Dd4DyfVi3S1yCMjK2nzyjLR9V/w7XjQGYekyhuDSmBAqTmq\n uDCClodvBtFp3esNL/rktotN670z4Atj5fCoCm/D5Qnjl236oTlOGuGSglh6WVnbYEbH\n y9Sg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776126757; x=1776731557;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=/VyMpbZZBycD9uof5+Mpu9kfOlAUg4ZoswdMUmEvtEU=;\n b=cYh1+CrDhq/Axtf3RqvotpmjgxqDNeiuaLI+hHyv5ax5Yk14yAkSYZVVCLLzMZYkrL\n racsa0N2MckVtN5NfMCWVY8od+2LsqxEiqpPj+klaDuQ7hiFPMGTAYoxBtgRG2BnJSj/\n nHft3wf6SucEzLqupi5TTlcK0LNDbiGITAGLrJrZis3wWuQhbPZwrxkelEJ3PnnUdd+f\n i0u4TYMM8yHPzVhKAMc9Vr0TckrsNwj673xwe4Dp+jHNZ26cfUI3MZbhZOi+ji/FxjT7\n mF2DgwUquN6MkCOAG87AJKzToLX98PyW43hxUoAvGJ+sFKgY0umkMwpt/8ul4ObAJJd9\n 0RIQ==","X-Gm-Message-State":"AOJu0Ywmxi8Xsfcp9LQLVhreOID6nnr/v5BrfDKElSh12+734ja3oMm/\n lk/K55qYL3x/tb1ZFtKXszeIJK02Jh7f0YcUGsA37RV9rH0BeujDwrk8jYzS1iiIgnXCKbwKvga\n Im4Fn8Uk=","X-Gm-Gg":"AeBDieudrHfZ2e/2VvAigk3bZwIItJLWUYrsrkXy3mrDqzpOuUSXWux6DIO75aLNeZj\n LWYASd1aXgDkWxU/tTTW1upcxPinGIdpkYksMTVmzTSihHuAfW0GrH5qAScok04MK2cKNudBixB\n Yg5whSpdirrp/w9Ajb0rrj9UZDZ2TpjLqkMJJmwjmCThZFfOybrD9ZWvrZciNJS9Z66gjZz+p8+\n wCs+TwP2dhPZmf8hGLJ5i8i2mQ5u6LMD4B7xzbXjN2ikzoLtu5s9gR1D7a9Hp8/DxnjkHv7ABZq\n uzDq1Arod4H45XPcaT6YUFPA+rJ2QbA1DW1WDIV9rXRcQzUWRgwsl0ua7MdcUN/s+o5/0/+Nkmk\n EMlte0JYXt6c8SsA85ncsSStCgWVIsX5z7srZelz+AzeX4KsK62KfqRkXi1Gr3lrenr9C3uYlre\n 7vS6Bmc8wRBc8JMWytGEIi+JcOWJ/HkUBk6xPbZwisjBsi+tDmaCzjdgnoIjW1nlFUUIvkmNph","X-Received":"by 2002:a05:600c:a416:b0:485:41c4:e2e4 with SMTP id\n 5b1f17b1804b1-488d6860571mr145539645e9.23.1776126757174;\n Mon, 13 Apr 2026 17:32:37 -0700 (PDT)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>","To":"qemu-devel@nongnu.org","Cc":"Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n Markus Armbruster <armbru@redhat.com>,\n Richard Henderson <richard.henderson@linaro.org>,\n \"Dr. David Alan Gilbert\" <dave@treblig.org>,\n Paolo Bonzini <pbonzini@redhat.com>,\n =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>","Subject":"[PATCH v3 21/27] monitor: Forward-declare the MonitorDef type","Date":"Tue, 14 Apr 2026 02:29:53 +0200","Message-ID":"<20260414003001.97571-22-philmd@linaro.org>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260414003001.97571-1-philmd@linaro.org>","References":"<20260414003001.97571-1-philmd@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::32a;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n 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 development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <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>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"Rather than having core header forced to include \"monitor/hmp.h\"\nto get the MonitorDef type declaration, forward-declare it in\n\"qemu/typedefs.h\".\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\n---\n include/monitor/hmp.h   | 6 +++---\n include/qemu/typedefs.h | 1 +\n 2 files changed, 4 insertions(+), 3 deletions(-)","diff":"diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h\nindex 8abe3168924..22784bd4c79 100644\n--- a/include/monitor/hmp.h\n+++ b/include/monitor/hmp.h\n@@ -24,11 +24,11 @@\n         g_assert_not_reached(); \\\n     }\n \n-typedef struct MonitorDef {\n+struct MonitorDef {\n     const char *name;\n     int offset;\n-    int64_t (*get_value)(Monitor *mon, const struct MonitorDef *md, int offset);\n-} MonitorDef;\n+    int64_t (*get_value)(Monitor *mon, const MonitorDef *md, int offset);\n+};\n \n const MonitorDef *target_monitor_defs(void);\n \ndiff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h\nindex 416a8c9acea..07f2ae7c9f1 100644\n--- a/include/qemu/typedefs.h\n+++ b/include/qemu/typedefs.h\n@@ -72,6 +72,7 @@ typedef struct MemoryRegionSection MemoryRegionSection;\n typedef struct MigrationIncomingState MigrationIncomingState;\n typedef struct MigrationState MigrationState;\n typedef struct Monitor Monitor;\n+typedef struct MonitorDef MonitorDef;\n typedef struct MSIMessage MSIMessage;\n typedef struct NetClientState NetClientState;\n typedef struct NetFilterState NetFilterState;\n","prefixes":["v3","21/27"]}