Cover Letter Detail
Show a cover letter.
GET /api/covers/2195627/?format=api
{ "id": 2195627, "url": "http://patchwork.ozlabs.org/api/covers/2195627/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/cover/20260211152508.732487-1-berrange@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "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": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260211152508.732487-1-berrange@redhat.com>", "list_archive_url": null, "date": "2026-02-11T15:24:41", "name": "[v6,00/27] util: sync error_report & qemu_log output more closely", "submitter": { "id": 2694, "url": "http://patchwork.ozlabs.org/api/people/2694/?format=api", "name": "Daniel P. Berrangé", "email": "berrange@redhat.com" }, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/cover/20260211152508.732487-1-berrange@redhat.com/mbox/", "series": [ { "id": 491862, "url": "http://patchwork.ozlabs.org/api/series/491862/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=491862", "date": "2026-02-11T15:24:41", "name": "util: sync error_report & qemu_log output more closely", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/491862/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/2195627/comments/", "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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=UabxIlxh;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.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 4fB2Lp31Y8z1xtr\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 02:25:38 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vqC5m-0004Og-Kw; Wed, 11 Feb 2026 10:25:26 -0500", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <berrange@redhat.com>)\n id 1vqC5k-0004OP-T5\n for qemu-devel@nongnu.org; Wed, 11 Feb 2026 10:25:24 -0500", "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <berrange@redhat.com>)\n id 1vqC5i-0005SS-Jr\n for qemu-devel@nongnu.org; Wed, 11 Feb 2026 10:25:24 -0500", "from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-541-lJOwb57zPOClEwDJZuHUOA-1; Wed,\n 11 Feb 2026 10:25:17 -0500", "from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 651901955F0E; Wed, 11 Feb 2026 15:25:15 +0000 (UTC)", "from toolbx.redhat.com (unknown [10.45.227.9])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id ACBDB30001BF; Wed, 11 Feb 2026 15:25:09 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770823521;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=RvZUg71wI0hQDX8LWihRSGFGtiXK7Ug4jp029Ewi824=;\n b=UabxIlxhPbzUUnwrTbSzyMFy/RPg5vgORnJK4EkygL7N2A6/cxZNwlUqMYE2xgR43LmLXV\n DooP7jPQrkVlP0MEytU3MvgxOLrKCt7JZkbWNUse3tyLt2aCi4Yh6wReAoeDRkUeE+JQm1\n yERVBegSumT9MoAtXDb2iUxwPWCFUA4=", "X-MC-Unique": "lJOwb57zPOClEwDJZuHUOA-1", "X-Mimecast-MFC-AGG-ID": "lJOwb57zPOClEwDJZuHUOA_1770823516", "From": "=?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>", "To": "qemu-devel@nongnu.org", "Cc": "Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,\n Stefan Weil <sw@weilnetz.de>, \"Dr. David Alan Gilbert\" <dave@treblig.org>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>, devel@lists.libvirt.org,\n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?utf-8?q?Marc?=\n\t=?utf-8?q?-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n Hanna Reitz <hreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>,\n qemu-block@nongnu.org, qemu-rust@nongnu.org,\n Paolo Bonzini <pbonzini@redhat.com>, Markus Armbruster <armbru@redhat.com>,\n Gerd Hoffmann <kraxel@redhat.com>,\n =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>,\n Christian Schoenebeck <qemu_oss@crudebyte.com>,\n Richard Henderson <richard.henderson@linaro.org>", "Subject": "[PATCH v6 00/27] util: sync error_report & qemu_log output more\n closely", "Date": "Wed, 11 Feb 2026 15:24:41 +0000", "Message-ID": "<20260211152508.732487-1-berrange@redhat.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "8bit", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.4", "Received-SPF": "pass client-ip=170.10.129.124;\n envelope-from=berrange@redhat.com;\n helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_PASS=-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 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": "This series is a tangent that came out of discussion in\n\n https://lists.nongnu.org/archive/html/qemu-devel/2025-08/msg00903.html\n\nIn thinking about adding thread info to error_report, I\ncame to realize we should likely make qemu_log behave\nconsistently with error_report & friends. We already\nhonour '-msg timestamp=on', but don't honour 'guest-name=on'\nand also don't include the binary name.\n\nAs an example of the current state, consider mixing error and\nlog output today:\n\n- Default context:\n\n # qemu-system-x86_64 -object tls-creds-x509,id=t0,dir=fish \\\n -d 'trace:qcrypto*'\n qcrypto_tls_creds_x509_load TLS creds x509 load creds=0x55ac6d97f700 dir=fish\n qcrypto_tls_creds_get_path TLS creds path creds=0x55ac6d97f700 filename=ca-cert.pem path=<none>\n qemu-system-x86_64: Unable to access credentials fish/ca-cert.pem: No such file or directory\n\n- Full context:\n\n # qemu-system-x86_64 -object tls-creds-x509,id=t0,dir=fish \\\n -d 'trace:qcrypto*' \\\n -msg guest-name=on,timestamp=on \\\n -name \"fish food\"\n 2025-08-19T20:14:16.791413Z qcrypto_tls_creds_x509_load TLS creds x509 load creds=0x55e9a3458d10 dir=fish\n 2025-08-19T20:14:16.791429Z qcrypto_tls_creds_get_path TLS creds path creds=0x55e9a3458d10 filename=ca-cert.pem path=<none>\n 2025-08-19T20:14:16.791433Z fish food qemu-system-x86_64: Unable to access credentials fish/ca-cert.pem: No such file or directory\n\nAnd after this series is complete:\n\n- Default context:\n\n # qemu-system-x86_64 -object tls-creds-x509,id=t0,dir=fish \\\n -d 'trace:qcrypto*'\n qemu-system-x86_64(1184284:main): qcrypto_tls_creds_x509_load TLS creds x509 load creds=0x55a24ad5cb30 dir=fish\n qemu-system-x86_64(1184284:main): qcrypto_tls_creds_get_path TLS creds path creds=0x55a24ad5cb30 filename=ca-cert.pem path=<none>\n qemu-system-x86_64(1184284:main): Unable to access credentials fish/ca-cert.pem: No such file or directory\n\n- Full context:\n\n # qemu-system-x86_64 -object tls-creds-x509,id=t0,dir=fish \\\n -d 'trace:qcrypto*' \\\n -msg guest-name=on,timestamp=on \\\n -name \"fish food\"\n 2025-08-19T20:12:50.211823Z [fish food] qemu-system-x86_64(1168876:main): qcrypto_tls_creds_x509_load TLS creds x509 load creds=0x5582183d8760 dir=fish\n 2025-08-19T20:12:50.211842Z [fish food] qemu-system-x86_64(1168876:main): qcrypto_tls_creds_get_path TLS creds path creds=0x5582183d8760 filename=ca-cert.pem\n+path=<none>\n 2025-08-19T20:12:50.211846Z [fish food] qemu-system-x86_64(1168876:main): Unable to access credentials fish/ca-cert.pem: No such file or directory\n\nThe main things to note:\n\n * error_report/warn_report/qemu_log share the same\n output format and -msg applies to both\n\n * -msg debug-threads=on is now unconditionally enabled\n and thus the param is deprecated & ignored\n\n * Thread ID and name are unconditionally enabled\n\n * Guest name is surrounded in [...] brackets\n\n * The default output lines are typically 15 chars\n wider given that we always include the thread\n ID + name now\n\n * This takes the liberty of assigning the new file\n to the existing error-report.c maintainer (Markus)\n Since splitting it off into message.c instead of\n putting it all in error-report.c felt slightly\n nicer.\n\nOne thing I didn't tackle is making the location\ninfo get reported for qemu_log. This is used to\ngive context for error messages when parsing some\nCLI args, and could be interesting for log messages\nassociated with those same CLI args.\n\nChanges in v6:\n\n - Don't use pthread API to set main thread name, as this\n affects visibility in 'top' and 'ps'\n - Split off Win32 thread naming race fix intoseparate\n patch\n - Tweaks to wording in API docs for logging\n - Improve VNC auth error messages\n - Don't relpace monitor_cur_is_qmp with monitor_cur_is_hmp,\n change code approach instead\n\nChanges in v5:\n\n - Use g_strlcpy instead of strlcpy\n - Remove redundant !! around a value that was already bool\n - Improve the qemu_lock_trylock() API docs to encourage\n use of fprintf() instead of further qemu_log() calls\n - Add a qemu_log_trylock_context() counterpart for\n qemu_log_trylock that includes the message context\n - Don't scan for \\n to determine whether we can output\n a message context prefix or not. Instead track call\n depth on qemu_log_trylock() and only output it when\n the depth was initially zero. This fixes linux-user\n -strace output formatting which was mangled by v4\n - Use fprintf(stderr) instead of error_printf_mon\n in cases where mon would be NULL\n - Use fputs/fputc in simple cases where we don't need the\n full power of fprintf\n - Use qemu_f{un}lockfile instead of f{un}lockfile\n - Add -msg thread-info=on|off,program-name=on|off args\n to allow default message prefixes to be optionally disabled\n\nChanges in v4:\n\n - Re-architected the way error_vprintf() operates\n to simplify monitor dependency\n - Fixed the move of error_vprintf from monitor.c\n to error-report.c so that unit tests can still\n get a stub to capture messages to g_test_message\n - Simplify changes to vreport() to avoid passing\n around function pointers\n - Add locking of stderr to vreport() to serialize\n incremental output\n - Fix thread naming logic changes on Windows\n - Change deprecation warning messages\n\nChanges in v3:\n\n - Stop formatting a string in qmessage_context, instead\n output directly to a \"FILE *\" stream\n - Fix pre-existing bug interleaving qemu_log and\n vreport when the trace 'log' backend has mutex probes\n enabled\n\nChanges in v2:\n\n - Re-use existing qemu_get_thread_id rather than\n re-inventing it as qemu_thread_get_id.\n - Expose qemu_thread_set_name and use it from all\n locations needing to set thread names\n - Fix qemu_log() to skip context prefix when\n emitting a log message in fragments across\n multiple calls\n - Skip allocating memory for empty context messages\n - Fix leak in win32 impl of qemu_thread_get_name\n - Use g_strlcpy where possible\n\nDaniel P. Berrangé (27):\n meson: don't access 'cxx' object without checking cpp lang\n qemu-options: remove extraneous [] around arg values\n include: define constant for early constructor priority\n monitor: initialize global data from a constructor\n system: unconditionally enable thread naming\n util: fix race setting thread name on Win32\n util: expose qemu_thread_set_name\n audio: make jackaudio use qemu_thread_set_name\n util: set the name for the 'main' thread on Windows\n util: add API to fetch the current thread name\n util: introduce some API docs for logging APIs\n util: avoid repeated prefix on incremental qemu_log calls\n util/log: add missing error reporting in qemu_log_trylock_with_err\n ui: add proper error reporting for password changes\n ui: remove redundant use of error_printf_unless_qmp()\n monitor: remove redundant error_[v]printf_unless_qmp\n monitor: refactor error_vprintf()\n monitor: move error_vprintf back to error-report.c\n util: fix interleaving of error & trace output\n util: don't skip error prefixes when QMP is active\n util: fix interleaving of error prefixes\n util: introduce common helper for error-report & log code\n util: convert error-report & log to message API for timestamp\n util: add support for formatting a workload name in messages\n util: add support for formatting a program name in messages\n util: add support for formatting thread info in messages\n util: add brackets around guest name in message context\n\n MAINTAINERS | 2 +\n audio/jackaudio.c | 30 +++++--\n docs/about/deprecated.rst | 7 ++\n include/monitor/monitor.h | 3 -\n include/qemu/compiler.h | 8 ++\n include/qemu/error-report.h | 4 -\n include/qemu/log-for-trace.h | 17 +++-\n include/qemu/log.h | 39 +++++++++\n include/qemu/message.h | 40 +++++++++\n include/qemu/thread.h | 3 +-\n include/ui/console.h | 2 +-\n include/ui/qemu-spice-module.h | 3 +-\n meson.build | 23 ++++-\n monitor/monitor.c | 51 ++---------\n qemu-options.hx | 121 ++++++++++++++-------------\n rust/util/src/log.rs | 6 ++\n storage-daemon/qemu-storage-daemon.c | 6 ++\n stubs/error-printf.c | 23 -----\n stubs/meson.build | 1 -\n stubs/monitor-core.c | 19 ++++-\n system/vl.c | 49 +++++++++--\n tests/functional/generic/test_vnc.py | 4 +-\n tests/qemu-iotests/041 | 2 +-\n tests/qemu-iotests/common.filter | 2 +-\n tests/unit/test-error-report.c | 6 +-\n tests/unit/test-util-sockets.c | 1 +\n ui/spice-core.c | 25 ++++--\n ui/spice-module.c | 7 +-\n ui/ui-qmp-cmds.c | 19 ++---\n ui/vnc-stubs.c | 6 +-\n ui/vnc.c | 16 ++--\n util/error-report.c | 103 +++++++++++++++--------\n util/log.c | 48 ++++++-----\n util/meson.build | 1 +\n util/message.c | 51 +++++++++++\n util/qemu-thread-posix.c | 89 ++++++++++++++------\n util/qemu-thread-win32.c | 87 +++++++++++++------\n 37 files changed, 628 insertions(+), 296 deletions(-)\n create mode 100644 include/qemu/message.h\n delete mode 100644 stubs/error-printf.c\n create mode 100644 util/message.c" }