From nobody Sat Nov 15 12:16:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1752144405; cv=none; d=zohomail.com; s=zohoarc; b=m6JCu8zhW2e6GJjw51tMd9QV8kIvOk8IxJKvSBpJQm/lp8qyw8KzRxyn4dpWvUuX2uVZlmQUYc9Q2v3qrdDOidfXt5akXnFQYxO+OAnJUUSGH3aLPufhlvFVCpxdo7bdbUZ7jwAX/HPr3EmMpebC7rX7D0sN4nbMs+q1XKAW96M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752144405; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sPAaWZS9pbyaeBj3LeenkXr30JcrTD9NQ22BxqPsMYU=; b=ci8OnNGRuCkQg0dPgSH8hirBF7w3YAVze530vViFr18gtK9lix5PTgk13zVDFh1avkjjjv8RHujzCr2hf3KmyPicSTlC1GG/8t8XBqF2qrW3ePK71PGvXVrjhfT3PZ8DZTbwXaJaBdBdSuJaTefcbvvmRx0XbABNKrlmSwyTmgw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752144404860891.5179367263045; Thu, 10 Jul 2025 03:46:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uZomx-0001rt-AA; Thu, 10 Jul 2025 06:46:03 -0400 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 ) id 1uZoma-0001pY-2n for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:41 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uZomV-00077P-QI for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:39 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-451d7b50815so6012075e9.2 for ; Thu, 10 Jul 2025 03:45:34 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-454d5032e17sm60568795e9.5.2025.07.10.03.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 03:45:32 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 521775F813; Thu, 10 Jul 2025 11:45:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1752144333; x=1752749133; darn=nongnu.org; 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=sPAaWZS9pbyaeBj3LeenkXr30JcrTD9NQ22BxqPsMYU=; b=uNPem30md9MuvYgDlsM40iCXG0H+Q7wxhgV+mnvtDqtl6+A0OGq9P6mMEIRBpM+OZh 7AlN293rWsuA9ylbx039e56A0fb3y7290iCr9fCCkLLzVzVIcoPsm7OcYln/Dg3q57Y5 sy5lUQvSepfDJ1GJY1WPYrvWwIqWkFeWa8iO3uvhLxNRKQ7Mwkak74iqbQhwsHQtBz+Y /ljz7toMp0TzMYN+ilG4pnN2Dx9ziVjRA9lMIzMKjLu0KLrFacA8heah2nIoc37u6UnM fzFt8VyrO6sS9uAa1+LjA9HcG0iWIOqQQ6F5goa1O26Fz99ruE+iOm7QFFLOvnjqV7sj 7SCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752144333; x=1752749133; 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=sPAaWZS9pbyaeBj3LeenkXr30JcrTD9NQ22BxqPsMYU=; b=m+y+7cq1WsPB9q/Fau980IlxL4Sop+O/UqCfK5VRohZgzfFNSldc6uhl3pO9noC0jA a9WwkSNrnv9IOUOn+6gVNAmkC8TdEHRTXLed/fNG3OH2SxfBNWVkybhkp9aqcB0rz7V0 804a0P5aKRW48evGwQmdQP7SyXUWdvRyhnV9KL24R4V5ajpVaJ1I3VE7prtLFxRlHCbP UpvFwtAfyLA8rHtCmFsCyq4583Qnn5YO/o86am5TfAHnAHrGfHXJ3ddNxOptLQarUvWi AFEMZKEPqZ0ekzxEQ//kZt32b/kCCO4tJyqPeAwBSgKDNa7eiHmqeEt7wA0H/M61V58F ldbQ== X-Gm-Message-State: AOJu0YyG+lzK7VE0KZ64xEqNAIA8He/t83QObhT2g4A42TXjtpaT4CKm plDAZt5y+vVPLA1zLMzMmWg5S0A+X1n7TB+7g316YC+c8tyk6C2niSohT7uwrOWgP5E= X-Gm-Gg: ASbGnctXFISzTMSLlsHR2UpqnPchqISPvKv2EfH7o4JS08hjhzJVWo6kZJzffK4xD+D PaarBiB+t/fbuNbmQxYFkWdbEAfd1beuM1jXsHEZUktxuIkSIj/R/59WVXq9aJnXIZuOHAH9/By PbnyRz5Ulg4dQPBLq8/Bn2eXJb/HolapriEVlew8SFkhHR0QHASCxfpLlDTYgMSfeW7IG9tyIIM sQj33AgFh29RpvevYfjVl1eDTheIoIYt+r+ClRalXpKSYmJEDneTGToUdnWyv18PnTTUAzF4Kaq awVGxhqq4/SrwzSl2KoeUYSTEl4lNemeUH0Aow/W6Nlv6PhTjGPytnCC8RNfCsU= X-Google-Smtp-Source: AGHT+IEcMtc/oDsJJa1KmaF6zHqG68AR4pPzawvBP8mWG8hK/mavUzJNAhurd0r3IQDtq/Z8MshOGQ== X-Received: by 2002:a05:600c:1385:b0:43d:563:6fef with SMTP id 5b1f17b1804b1-454dd2e1fd3mr18454345e9.21.1752144332951; Thu, 10 Jul 2025 03:45:32 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Mahmoud Mandour , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Richard Henderson , Jason Wang , Riku Voipio , Laurent Vivier , Pierrick Bouvier Subject: [PATCH 1/7] gitlab: use argparse in check-units script Date: Thu, 10 Jul 2025 11:45:24 +0100 Message-ID: <20250710104531.3099313-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250710104531.3099313-1-alex.bennee@linaro.org> References: <20250710104531.3099313-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1752144406472116600 Modernise the argument parsing so we can easily add to the script. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Manos Pitsidianakis --- .gitlab-ci.d/check-units.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.d/check-units.py b/.gitlab-ci.d/check-units.py index 268a4118d5..cdc62ae5ee 100755 --- a/.gitlab-ci.d/check-units.py +++ b/.gitlab-ci.d/check-units.py @@ -8,8 +8,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 from os import access, R_OK, path -from sys import argv, exit +from sys import exit import json +import argparse +from pathlib import Path from collections import Counter =20 =20 @@ -51,16 +53,17 @@ def analyse_units(build_units): =20 =20 if __name__ =3D=3D "__main__": - if len(argv) !=3D 2: - script_name =3D path.basename(argv[0]) - print(f"Usage: {script_name} ") - exit(1) + parser =3D argparse.ArgumentParser( + description=3D"analyse number of build units in compile_commands.j= son") + parser.add_argument("cc_path", type=3DPath, default=3DNone, + help=3D"Path to compile_commands.json") + + args =3D parser.parse_args() =20 - cc_path =3D argv[1] - if path.isfile(cc_path) and access(cc_path, R_OK): - units =3D extract_build_units(cc_path) + if path.isfile(args.cc_path) and access(args.cc_path, R_OK): + units =3D extract_build_units(args.cc_path) analyse_units(units) exit(0) else: - print(f"{cc_path} doesn't exist or isn't readable") + print(f"{args.cc_path} doesn't exist or isn't readable") exit(1) --=20 2.47.2 From nobody Sat Nov 15 12:16:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1752144408; cv=none; d=zohomail.com; s=zohoarc; b=B1OEzLSLPbonu9fyLbYdQGCeikYKCfjGDRdMFCYtDaQzR/qDG464NH0FNLiTn7RyPvXWMYml2xlGKAp9/PFB3CTydG4GMZ4bwrTZdBNYMgE5OJRam2locS4FVIZ2vUVNFqc1ni79uiIl1So5C29YKItwRU1m2wmZmequr9KiOTM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752144408; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dY0xSCtlYykrPT/bsa3C5YwiSVl8pnKIhGQiapGCENk=; b=SnsP40PPcdqYfv9p9m9nG+zjbMF2yJcXxmBpjY8MVCuryHZGJ1PSfA2fx+K6KtokXHCeVR7dAlZc39TtvITEnJ16Fqi8KAxVTLPgFUw+BB6gXLWN1pS2uhyq699rEuE+nkpiAbTZKTd/mcjWIL4LySxqomqz2UGd5EiBOBf+JsU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752144408913147.34280228920102; Thu, 10 Jul 2025 03:46:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uZonG-0002Az-15; Thu, 10 Jul 2025 06:46:27 -0400 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 ) id 1uZomf-0001r6-Ua for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:50 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uZomZ-00077k-T5 for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:43 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3a57ae5cb17so516570f8f.0 for ; Thu, 10 Jul 2025 03:45:36 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b5e8bd18a2sm1529540f8f.20.2025.07.10.03.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 03:45:32 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 679695F834; Thu, 10 Jul 2025 11:45:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1752144335; x=1752749135; darn=nongnu.org; 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=dY0xSCtlYykrPT/bsa3C5YwiSVl8pnKIhGQiapGCENk=; b=Y/LCwqRG5jDmqlKP0SQPqgQ2eW9dQ5r404TYtCbAfP1GW12KEbP3EBDafMIflRPCHQ xLtvPkfggWNq2g5S95B93c4SZ2u7Gyj04+1RCn6enZs3HykylNg1Fkljlvt78nhSldFF S7aPzEsMjlWB61QIzJx6nNl0yl/UrctrcGq9QE85ojwk55KJug3+HiHmuCOIx3cRkCRO GMAnKheRds1/6ArOAotjvTWYp8I2sa4ZTbCuVmUBY7TDXVJtfjA7EnTXhE+d6tNqLvrp t+U+PMuwIdFZDcfVbwvdOoiXepw4roPnsgFs3IziRLIJCg0neLX7MT/Lem0KxHyeoRxD km1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752144335; x=1752749135; 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=dY0xSCtlYykrPT/bsa3C5YwiSVl8pnKIhGQiapGCENk=; b=R8ZnCorXKQTO3RLADFqfvDIsuXbGHnwffzUfPpsgc4Xl5OCVrHYzZ5Ff6Q4hMkQGpf UWf2C/gsZTE6a3Oax/jFeDC3Ix2vl9dgQHrWKuhEf+GBTNoQnl67ZXSVm/fUUw7YEfjF pnqK2LaWZopG1DmVCQsJqXAmkTIZzfRThgEXdqvFyp8yE3jz+6hmHRV8S9HrUIL3sv0W 1GPy7pNZM1SRSG1INZ0U7wVwngwDPhwnwYQxXs5zB94v4D/Bj87xrq2ZrawW7lt2vjB8 6iL5ka8eTgPfn6IxNTbJqIrkOJmASsGg7SkemSTwTSmZaNAD+a5bzL6vQ+zfMmF/zjGY R+tg== X-Gm-Message-State: AOJu0YyJshW8y5SOlkUVstx1q0xfGCFYFgay7pjBEb8XS75NEn4+pGiR a+WlZsMEUePz2PQre3z5zjVwmffHWid7ASNauLAaHARnilByVId7jWraI0UT7mDj/Ho= X-Gm-Gg: ASbGncsUIXkiTv3ZD1vDlxBz6GuOHqzF9/lkBJa7avR7CDFKUs5WGG2KgkH1+manlPc iijc4Ko+Db20HPGNUxtk7mOU1Htf00ijK2dzMWZUoMOZMWats3rRONJ1YQLjI2mXVZ7tQQiucOL uFQMgwPpKt7ODrjnptmZ25S4OHBGxH0+wqYKMRX59+NT0bDPNvboK1a5BbGvzuZ1u/bg2EDxm+D /c6fpfcF0Imu74lKc3beCT9p+vb3qYo8ee2pktj/2+F2fmv/ohr54e9Qufe5lRMkm+WcJUurK/x +R8f3CZALLL7kT+DlQa4zDWZuoS8+g/SRrTRxZ9LtnNFYdc/x13yQ7BJO67+xHY= X-Google-Smtp-Source: AGHT+IHkqr6+7PyYad91sLUrKzIYWh13JyYkVR7p0TIc8S4wO+wniM9MOH6i/s7312Kn5fncGTuHLQ== X-Received: by 2002:adf:b60b:0:b0:3a4:dfc2:bb60 with SMTP id ffacd0b85a97d-3b5e8680f1amr1474851f8f.26.1752144334634; Thu, 10 Jul 2025 03:45:34 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Mahmoud Mandour , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Richard Henderson , Jason Wang , Riku Voipio , Laurent Vivier , Pierrick Bouvier Subject: [PATCH 2/7] gitlab: add -n option to check_units Date: Thu, 10 Jul 2025 11:45:25 +0100 Message-ID: <20250710104531.3099313-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250710104531.3099313-1-alex.bennee@linaro.org> References: <20250710104531.3099313-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1752144410457116600 Mostly a developer aid for those who want to look at the full backlog of multiple build units. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Manos Pitsidianakis --- .gitlab-ci.d/check-units.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.d/check-units.py b/.gitlab-ci.d/check-units.py index cdc62ae5ee..cebef0e8be 100755 --- a/.gitlab-ci.d/check-units.py +++ b/.gitlab-ci.d/check-units.py @@ -30,7 +30,7 @@ def extract_build_units(cc_path): return build_units =20 =20 -def analyse_units(build_units): +def analyse_units(build_units, top_n): """ Analyse the build units and report stats and the top 10 rebuilds """ @@ -44,7 +44,7 @@ def analyse_units(build_units): reverse=3DTrue) =20 print("Most rebuilt units:") - for unit, count in sorted_build_units[:20]: + for unit, count in sorted_build_units[:top_n]: print(f" {unit} built {count} times") =20 print("Least rebuilt units:") @@ -57,12 +57,14 @@ def analyse_units(build_units): description=3D"analyse number of build units in compile_commands.j= son") parser.add_argument("cc_path", type=3DPath, default=3DNone, help=3D"Path to compile_commands.json") + parser.add_argument("-n", type=3Dint, default=3D20, + help=3D"Dump the top entries") =20 args =3D parser.parse_args() =20 if path.isfile(args.cc_path) and access(args.cc_path, R_OK): units =3D extract_build_units(args.cc_path) - analyse_units(units) + analyse_units(units, args.n) exit(0) else: print(f"{args.cc_path} doesn't exist or isn't readable") --=20 2.47.2 From nobody Sat Nov 15 12:16:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1752144451; cv=none; d=zohomail.com; s=zohoarc; b=hnDj0he68GiuOL4QYBf8ytqwFhfQrAjAjf72zCo+wuYqJXgGCJEld/5JhIpR+rnLi4jWGzuMcmmwgMdDJdzjOiNdaytj/Wiauko2dX4ZvZ/DAYzyLlOVrguLB9uTGYsMUKkReunaQHI4MfF1dJjGt4K0DlSJbePzb6sB7P4eiSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752144451; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nY9RxYXq4hHZTz7eLFjHXNzOsjF0/KQbibaEjOzCsCE=; b=b99+ksKlaedA6cdVDWIFE+eAGzCk0M1javP3gmPDkPnTkBQZB++WOi14DGJR5HaIzcNVK8bM7lYmo+uoF+w/eCQ+8g1hBEEp2KefJAwJ8bo0dwTyqYapEpcLXz8QcT+HeQuJGsgP0Cl0+zbiAvnP3QAIOjIIT6TbAdI7OJjdFgY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752144451923929.9021860357342; Thu, 10 Jul 2025 03:47:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uZon4-00025c-N2; Thu, 10 Jul 2025 06:46:11 -0400 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 ) id 1uZomg-0001r5-4r for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:50 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uZomZ-00077v-SC for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:43 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4530921461aso5253605e9.0 for ; Thu, 10 Jul 2025 03:45:37 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b5e8dc22a8sm1574575f8f.34.2025.07.10.03.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 03:45:32 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7AE8A5F87D; Thu, 10 Jul 2025 11:45:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1752144335; x=1752749135; darn=nongnu.org; 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=nY9RxYXq4hHZTz7eLFjHXNzOsjF0/KQbibaEjOzCsCE=; b=W7dyQx2EfsAPLbQ//IH5Pr5/iO7R5DW4SN/NXFvSCMaIIHNpLltAIkcSO5czucb0C7 QkfgETjer6HsKZxgXC7M66JUEPs83VyRLzWuvohIsjxMn2yWYGlZ7wvVIqHwolD+q+l3 kz2HetxPnSvONZZDS252creNNTGehDP/mlyuo6UBG46HC2Ks0gNflRZrluTXEcExjdWh i5ZRykit1X8eFgkF5tsSSp2l7/hBQVmhF3ifCvlr5HfK60ZlfWhLUKkCVFh0K0WwGpDG T2s+CT1zhsZrzYEjK9YwuEQQJ8DlMDhHtI/laOj1h9FHf/UCA4T9OzLwSl9C2/Vpn4+3 BWpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752144335; x=1752749135; 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=nY9RxYXq4hHZTz7eLFjHXNzOsjF0/KQbibaEjOzCsCE=; b=Rvlm0k8ec33G/QmiGLL189JMde2TrGHUkw5v9FDGjeFBpj07Huw9+FgSTVCm8Tk5xu LIUrUMg0UuhAkrPt8WV810g7EJo2XmLGPe9Pwd/f+s3z8Eyi7pyQ6msZ/cDPOiGhiIkM cquvlZJv1tN/OGW9F4Crq7kzLS5zmWdTDqGeKylnB3tzKwkMLDRWg+iMK1LU/6n5viRw zHbgqmZzCXNKlZy/67ij6tXPBBdQ0ZP301byDqzL5UHiDIrtIBzmMm9W2IxGRJSTMlGu SLbbP+z0dxSJ3keeeg/ElwREtZq9GyubBR2yO11iCZ6qpNrAb86pQxNddFaDzbhDrag8 cCIA== X-Gm-Message-State: AOJu0YyKGD5W/0wntagNC7kGnlCZObiMkcBEJOt3W1F4OBP0vMwlDvH2 MKc6lGCrmh1z6zn4hZMr9x3wrSA/ISF75Hv6GpKk7n0OB9nzkxbNxd0B4FpkMSo5ZKE= X-Gm-Gg: ASbGnct0CRL1eBNnkQ5T7lPilLVNSawKFEDnf14mBBsCHsdFbqYjVYP9e2iTGcURmbM KYB+uZ0oNTuVJLzBwNAfvgzA1Ww1XA9bUKEHb7JECTzZG2BJ1RYOxDX9oEK5TLZuHYywNsKxowo mKFPvu4LQcdFq+qlL7XCDWKjhCcZ+BpkS+3VUF0CWyJTLCFYXqBZKUTLunumXbbNiBR3b5nlwin cS+POY00NvMiElxj3FFxeLEjfTCJIw4cDoD+io8Ui2MEJ5YQz5BFaLkz3X4iM4HltvTikVgjXAd 9aL9gnwLuNfcx7UJXPzWYhKafaw1vfw3FSt3QmzdrACmquYaAAjFsrrhuKiJokKDUBa+oQi27A= = X-Google-Smtp-Source: AGHT+IFRgHg30ZwslKl1MTZnBnL4N3W1btuIHawrWJnd4x6DKfqZ111NWjsg2s7ZVnd+ZnlNIxukzw== X-Received: by 2002:a05:600c:1e0d:b0:442:d5dd:5b4b with SMTP id 5b1f17b1804b1-454d53bc8c5mr65998125e9.31.1752144335407; Thu, 10 Jul 2025 03:45:35 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Mahmoud Mandour , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Richard Henderson , Jason Wang , Riku Voipio , Laurent Vivier , Pierrick Bouvier , Yodel Eldar Subject: [PATCH 3/7] contrib/plugins/execlog: Add tab to the separator search of insn_disas Date: Thu, 10 Jul 2025 11:45:26 +0100 Message-ID: <20250710104531.3099313-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250710104531.3099313-1-alex.bennee@linaro.org> References: <20250710104531.3099313-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1752144452962116600 From: Yodel Eldar Currently, execlog searches for a space separator between the instruction mnemonic and operands, but some disassemblers, e.g. Alpha's, use a tab separator instead; this results in a null pointer being passed as the haystack in g_strstr during a subsequent register search, i.e. undefined behavior, because of a missing null check. This patch adds tab to the separator search and a null check on the result. Also, an affected pointer is changed to const. Lastly, a break statement was added to immediately terminate the register search when a user-requested register is found in the current instruction as a trivial optimization, because searching for the remaining requested registers is unnecessary once one is found. Suggested-by: Alex Benn=C3=A9e Signed-off-by: Yodel Eldar Message-ID: <20250630164124.26315-2-yodel.eldar@gmail.com> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pierrick Bouvier --- contrib/plugins/execlog.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index d67d010761..06ec76d6e9 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -232,12 +232,15 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct= qemu_plugin_tb *tb) */ if (disas_assist && rmatches) { check_regs_next =3D false; - gchar *args =3D g_strstr_len(insn_disas, -1, " "); - for (int n =3D 0; n < all_reg_names->len; n++) { - gchar *reg =3D g_ptr_array_index(all_reg_names, n); - if (g_strrstr(args, reg)) { - check_regs_next =3D true; - skip =3D false; + g_auto(GStrv) args =3D g_strsplit_set(insn_disas, " \t", 2); + if (args && args[1]) { + for (int n =3D 0; n < all_reg_names->len; n++) { + const gchar *reg =3D g_ptr_array_index(all_reg_names, = n); + if (g_strrstr(args[1], reg)) { + check_regs_next =3D true; + skip =3D false; + break; + } } } } --=20 2.47.2 From nobody Sat Nov 15 12:16:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1752144662; cv=none; d=zohomail.com; s=zohoarc; b=GPFqEpOt6F9GiPY7GPryMDCrqEhMzt8H7c77yJ1a5xp/PBlN77RAVXPzMzTTaiiBOH913Ne5fQ+L+H29EFUIAWU1a5gEFw88CUarY7jgIbcGT18YSUvPo6APeGOkEtBrkGfFfkVMCA0QbYLuEmfEX/8g9R4jIUgp1ol6LBseupE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752144662; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=iz/LY4KOmNjK8aVdmnn+2X+hPVBWX9P2bT1YuqmMXP8=; b=ea5MB51kTi52fGSCZaPJ1TYejRFrBqUUBwTRKTin8vdVpIfVqQhk3aUZG90QvrI9VxSZWR7RxAhjw2q9X3HckbkJGhTLbkITbmBycsG4nlTHmWx8fXrvBDnhFju4eeWlc8/ahaUl59Z/ZoUSYW8d7COA/EEAzC4OEZKFldh7k0w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752144662731374.83699667414885; Thu, 10 Jul 2025 03:51:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uZon7-00028G-1U; Thu, 10 Jul 2025 06:46:13 -0400 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 ) id 1uZomf-0001r7-V0 for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:50 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uZomZ-000784-Sn for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:44 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3a52874d593so705487f8f.0 for ; Thu, 10 Jul 2025 03:45:37 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b5e8e1e2fasm1499722f8f.77.2025.07.10.03.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 03:45:32 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 945175F893; Thu, 10 Jul 2025 11:45:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1752144336; x=1752749136; darn=nongnu.org; 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=iz/LY4KOmNjK8aVdmnn+2X+hPVBWX9P2bT1YuqmMXP8=; b=xGnF/o9vL62rNQM0guLm7ewll9b/nPbuSue+LQW8uQDmEI6l28psxIyvJjgXG6t6FT eogFgWoqfSJcMHaYog8vUPdI4oA5icfWgsXni7VJzjDRFn9RtAafurHuThwzw4sD7PIR /Pqa6Y7XkRvnZ1H4udD8Phhux+afIYQ16LriOUifXpCY8nameIRUt393h0YsOHl8gDk0 +AylzaZegYgPOf8VqtZTpOfE4XELCixdr0IfVT/LBKHEu0LSNPQhaunFWN8AfVG1I/zJ 97I/paJu3ILGT42GgSFH3dwuQ/hRMDDSOa+KngCljoFyTyOSN+SzG1dgNLjNX37HDZoN uZJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752144336; x=1752749136; 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=iz/LY4KOmNjK8aVdmnn+2X+hPVBWX9P2bT1YuqmMXP8=; b=EkquMrjQKp3mKjiLzC34F/PC8NA2yytQsRhooq8JZG7kIG9H4gBaUHEVSVfFKjP/uE Ql6rEPR6IoUGfi/rsjqQGIBQMzlcjTeoIncSVf1MLgB/AiKF1cYt1qZhAmsQ5zXmwu0W +vRQtX2aK5doXbzBd95J2XvXuO+8ljk0f1CJo2OrQKgiglL08O6RSfVZGsdI2uMVyfa3 bj3iG+xEJqaK022Dr25K8pfRL6QWaUxrK3Nbc45UCTsRBIZ8EHwi9VvPf9rNJlPcJSLz rDl7Cs2E1zImRTUE6fu//sQb5kcsdVOEKLOHfa7cztIBGDmRx8ULeJdlrHM9hh2MXMf5 6Vnw== X-Gm-Message-State: AOJu0YwWOWOKniW1CoavsBPas40J/8+Kkx4jvZT/8+A3daHGiHr711mh 9NG6lqkojrfN2ZvoZofYVJylslS+6XDXi39lY6aweshFZcTSNoS3z+T9hnFQ/422UT0= X-Gm-Gg: ASbGncsuneqewFzOUjK4T7q7TaIe6SNyVaaV+Jox5y+4lYzRlQ7s3Tib8xsG9Q29C4w g0sME2EDJU3riPWOrTkVtinEeNNKqnb1SOfDmcSCXWRN4hNY+w4OLuyu7O96j03NS0DhyXb/uf/ qgK7eNABHUFr3MPCKBZGIw2V8WHrrNONPnmZ6+gSvQg0BUSEvfUKJ4eJKvH0t3zMutIaaoa9Lq+ 8vrTfq6irv0AujDYEmvEhVEJBjDjxgldWMl0PQxa00T2HFTSFYHyILhCEvpeWm3Z+dpNxfY3/kI +f6BmNpIW6EDHoxrhMnYgvyf8uR0+TnDwBVk5ZGcn0dPeNjb3n/X6JarCU+FLDE= X-Google-Smtp-Source: AGHT+IGhQz+1/FpaU9qTEzmSHmCxSUrkMjowKvaC+7X52KGoS+0rQn3z3TvQLs/OgkEQqc/RPevKHQ== X-Received: by 2002:adf:e38d:0:b0:3a3:6e85:a529 with SMTP id ffacd0b85a97d-3b5e78f891cmr2680481f8f.51.1752144335992; Thu, 10 Jul 2025 03:45:35 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Mahmoud Mandour , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Richard Henderson , Jason Wang , Riku Voipio , Laurent Vivier , Pierrick Bouvier , Yodel Eldar Subject: [PATCH 4/7] target/alpha: Add GDB XML feature file Date: Thu, 10 Jul 2025 11:45:27 +0100 Message-ID: <20250710104531.3099313-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250710104531.3099313-1-alex.bennee@linaro.org> References: <20250710104531.3099313-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1752144664113116600 From: Yodel Eldar This patch adds the GDB XML feature file that describes Alpha's core registers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2569 Reviewed-by: Richard Henderson Signed-off-by: Yodel Eldar Message-ID: <20250630164124.26315-3-yodel.eldar@gmail.com> Signed-off-by: Alex Benn=C3=A9e --- configs/targets/alpha-linux-user.mak | 1 + configs/targets/alpha-softmmu.mak | 1 + target/alpha/cpu.c | 1 + gdb-xml/alpha-core.xml | 136 +++++++++++++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 gdb-xml/alpha-core.xml diff --git a/configs/targets/alpha-linux-user.mak b/configs/targets/alpha-l= inux-user.mak index ef8e365b09..aa25766236 100644 --- a/configs/targets/alpha-linux-user.mak +++ b/configs/targets/alpha-linux-user.mak @@ -2,3 +2,4 @@ TARGET_ARCH=3Dalpha TARGET_SYSTBL_ABI=3Dcommon TARGET_SYSTBL=3Dsyscall.tbl TARGET_LONG_BITS=3D64 +TARGET_XML_FILES=3D gdb-xml/alpha-core.xml diff --git a/configs/targets/alpha-softmmu.mak b/configs/targets/alpha-soft= mmu.mak index 5275076e50..e31f059a52 100644 --- a/configs/targets/alpha-softmmu.mak +++ b/configs/targets/alpha-softmmu.mak @@ -1,2 +1,3 @@ TARGET_ARCH=3Dalpha TARGET_LONG_BITS=3D64 +TARGET_XML_FILES=3D gdb-xml/alpha-core.xml diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 2082db45ea..bf1787a69d 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -286,6 +286,7 @@ static void alpha_cpu_class_init(ObjectClass *oc, const= void *data) cc->get_pc =3D alpha_cpu_get_pc; cc->gdb_read_register =3D alpha_cpu_gdb_read_register; cc->gdb_write_register =3D alpha_cpu_gdb_write_register; + cc->gdb_core_xml_file =3D "alpha-core.xml"; #ifndef CONFIG_USER_ONLY dc->vmsd =3D &vmstate_alpha_cpu; cc->sysemu_ops =3D &alpha_sysemu_ops; diff --git a/gdb-xml/alpha-core.xml b/gdb-xml/alpha-core.xml new file mode 100644 index 0000000000..c9e12f4ffd --- /dev/null +++ b/gdb-xml/alpha-core.xml @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.47.2 From nobody Sat Nov 15 12:16:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1752144404; cv=none; d=zohomail.com; s=zohoarc; b=H8QUIUczXCjLTrBv68/Eu0xwSKZnIftngBCAuP9b1N6nbsn/TF+JyqCRHSYjG9dcWLK/BmT9P6Twx6HkEfZW5/HBaDLUXHDD1z0bIE7O2RxLw9uchDD7NeDo8MK8bHeI6FijfGN+LoA8IDBdCgYN8OhQPjLdB1KSIMMgern1xyQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752144404; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=03riluX1eJMP4tE7cuvXHWS+nhsiBt5c4p7l9wITSeg=; b=MLlmnAKMcbBO3Ci1OAQwPiOzVqvCKgBeFVsPQNhlpl9VdiMH0cMQMectNabi5qy5uZ/dxjv4kZHiSlQQcAjM5Dy16mcsZh54O81SLJT5yB7MREImkOzt6H7IMRqFPwd4pYFutszsx6DaXcGfXvf2GvH1mEVGyJDGm5ttAfkmx6U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752144404751335.908600754089; Thu, 10 Jul 2025 03:46:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uZon0-00020K-Bc; Thu, 10 Jul 2025 06:46:06 -0400 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 ) id 1uZomh-0001rA-DU for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:50 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uZomb-00078F-On for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:45 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3a54690d369so845244f8f.3 for ; Thu, 10 Jul 2025 03:45:39 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-454dd474a9csm16086125e9.16.2025.07.10.03.45.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 03:45:36 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id ABC495F8AD; Thu, 10 Jul 2025 11:45:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1752144338; x=1752749138; darn=nongnu.org; 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=03riluX1eJMP4tE7cuvXHWS+nhsiBt5c4p7l9wITSeg=; b=Jowrm6VxFUvDcJVugFCepGpaIrpd+2h6nhV6uA1nu3AfO1WZUSdKxH+W+sQsmFjV0l /0JpKSU6nv56CgroJaEU7jqQA6wWM36+1l5z+Q+sCuXoHdLwsR1YB2UbYP15pT227qsQ c3d21HYoCBIIRV88ZAUoOqgyHDnvsiU1Khzk5bDPsH/tJIERRLjIxpIyYD85NEfV4UgZ HFuMgsv3+NmtzNcfslznrQFd52jg2tYvhKImKBZHCIMOrvNXv1W+X0r2L9zhRZ2SCPq6 /0aAE7BoalRSjg/k4iBvIZOZvymgmMjdZh0grFsKhq5qk4yOsYbz4PjU4bcmnmHZ7ovj x81Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752144338; x=1752749138; 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=03riluX1eJMP4tE7cuvXHWS+nhsiBt5c4p7l9wITSeg=; b=xJBtzvXFqYnmxkdjrQ79hoR7Pd3+YKEVnSXWR1L2auYn6l4yvej75FUfhV/CNcuyV1 rBR7aXzaMhWfrDWzkJPHzrSm4kYRFUZ1QW1E+NgUsIy/tYYKaqh05HZRZMeucTWr/QIz AlS+gp4hiGM/soff9trzJ3U8yuUHDRPmReFhExhEz4AbLlCMaNG7h1UnWnIG3O1dE3zU vHRV6n9UOQO6RWPERfX4OhX1VZRTWAfHShf3TeBlzMoRlHgemz4avxOVitQ8VDrPOy93 z1Fapq8LPAJ3NTc8V4yZ6cSvqlLIGjd/maAP8pQp6/nguGKEQNwri8rLnLhjcF+t8OH+ FXTw== X-Gm-Message-State: AOJu0Yz7IlhUPuoM9AqjBrnTU47IH9bx6iuBf+LCRLHjkq5pAh5sWy0w qn8DNLFxFY4FeNQc1OE0CD9ov0eflKvbumgdFWYgd8zPToVvlLkqCrr9nVlCDXQYsqRvivU4QAw ArDiCCFI= X-Gm-Gg: ASbGnctXik4w+HHAtfk1N4qjZffj95oCX0cEbvpTo3ROnsrgwwbRVadsmTyQnHZPA7h 18YR22yjdr3Tp8AnMvrM5IA0QEXu87UbvYbyUzSdZDrOe1vFMKKOe0HThYrz6a7PxeokQbIqmxS X1rRNJNLwk9F8/5+QiY31cBKfP44cOHgTlyckChP7bqKjgLHbNKSdblhxyA/lWT6ccKRRPntmeA PoRkDdwwpFJ96zmI0327YH979LssdgZxONWeSNWaQSA5nXNO+7Qv1/L6UGG44na6IOS5XYkze2H AeYMkGMXY7g2Fj9g03sqJhAoA7wOVpXfQstujunmJGtIsid/MZexKKkWumOCx8A= X-Google-Smtp-Source: AGHT+IEkEpkDYS8h/LJ2ZSr33jWevjNrhMbuaEHbfGs/a7uc/uvM735BxMXl8DxT4/jFQVEIpL2HQA== X-Received: by 2002:a05:6000:41ce:b0:3a9:dc5:df15 with SMTP id ffacd0b85a97d-3b5e866f829mr2057765f8f.13.1752144338218; Thu, 10 Jul 2025 03:45:38 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Mahmoud Mandour , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Richard Henderson , Jason Wang , Riku Voipio , Laurent Vivier , Pierrick Bouvier Subject: [PATCH 5/7] plugins: fix inclusion of user-mode APIs Date: Thu, 10 Jul 2025 11:45:28 +0100 Message-ID: <20250710104531.3099313-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250710104531.3099313-1-alex.bennee@linaro.org> References: <20250710104531.3099313-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1752144406500116600 In 903e870f24 (plugins/api: split out binary path/start/end/entry code) we didn't actually enable the building of the new plugin helper. However this was missed because only contrib plugins like drcov actually used the helpers. With that fixed we discover we also need some more includes to be able to extract the relevant data from TaskState. Fixes: 903e870f24 (plugins/api: split out binary path/start/end/entry code) Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3014 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pierrick Bouvier --- linux-user/plugin-api.c | 1 + common-user/plugin-api.c.inc | 1 + linux-user/meson.build | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/linux-user/plugin-api.c b/linux-user/plugin-api.c index 66755df526..8d6fbb60e0 100644 --- a/linux-user/plugin-api.c +++ b/linux-user/plugin-api.c @@ -12,4 +12,5 @@ =20 #include "qemu/osdep.h" #include "qemu.h" +#include "loader.h" #include "common-user/plugin-api.c.inc" diff --git a/common-user/plugin-api.c.inc b/common-user/plugin-api.c.inc index 5b8a1396b6..63f3983271 100644 --- a/common-user/plugin-api.c.inc +++ b/common-user/plugin-api.c.inc @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" #include "qemu/plugin.h" +#include "accel/tcg/vcpu-state.h" #include "qemu.h" =20 /* diff --git a/linux-user/meson.build b/linux-user/meson.build index f47a213ca3..efca843369 100644 --- a/linux-user/meson.build +++ b/linux-user/meson.build @@ -27,7 +27,10 @@ linux_user_ss.add(libdw) linux_user_ss.add(when: 'TARGET_HAS_BFLT', if_true: files('flatload.c')) linux_user_ss.add(when: 'TARGET_I386', if_true: files('vm86.c')) linux_user_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING', if_true: file= s('semihost.c')) -linux_user_ss.add(when: 'CONFIG_TCG_PLUGINS', if_true: files('plugin-api.c= ')) + +if get_option('plugins') + linux_user_ss.add(files('plugin-api.c')) +endif =20 syscall_nr_generators =3D {} =20 --=20 2.47.2 From nobody Sat Nov 15 12:16:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1752144537; cv=none; d=zohomail.com; s=zohoarc; b=EacCM+baE4Ywizk7gu0mZk6I0oqBfL4CfZxAWLgnOsmriIIyk98UIvVUBsZREToYiRGuDZc8w1iALeKKBUazPgDAcrRYRoORKnx+fCB4j9k102/o8fyZbuPYp53OnLrHAbMxThPGKLYzlSNF3zfjD9FZ7qvu/zb0OEzlTpC97/I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752144537; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/kn+Nlme/iAkqffgZvptFY3jhjfV+Qi2QuRGeFFxrUg=; b=l06k0BkOrrK3D6elfmBY03EbEXjLoo32ruuQB6Lb9hAi/R67Ylu+XbMGmHtYPsOpi5+KYIXwhnl1fMV/jVMu2M/HYRA9dGXRGj5h7HFZbap9jEEghi0U25GKXa+Qg0MphVEujjQlNI+PBIYKnY0mctLBtBUf9XRpEMzNQ2t7ON4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752144537021553.1690214652364; Thu, 10 Jul 2025 03:48:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uZon2-00021V-Jc; Thu, 10 Jul 2025 06:46:08 -0400 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 ) id 1uZomh-0001rC-DN for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:51 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uZomZ-00078C-Ud for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:45 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-45348bff79fso8982555e9.2 for ; Thu, 10 Jul 2025 03:45:39 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-454d511bd6dsm55989185e9.38.2025.07.10.03.45.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 03:45:36 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C71665F8CC; Thu, 10 Jul 2025 11:45:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1752144338; x=1752749138; darn=nongnu.org; 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=/kn+Nlme/iAkqffgZvptFY3jhjfV+Qi2QuRGeFFxrUg=; b=LJThjoHtyAsPT9vWMffJu8fRNU/Pq7r5LQnl25T451xatxofd13/CD3eE1pEhV6Jxw hVhsvfZZfrEYH3FgZWJpRBQGskfES20nzdZtWZztk4l0q7DXB/YQ8c9WVVQA/R0PjDa6 ErMRlc/wYCz3x98UWfHCffD1bIFxcmK/1z6Fv4aGLmVnfZAQGG2G/QG3rqrQOgxnCuWK UcDUZPHAwDfqZLsFvhBDAv7LqewsOM48KKfQdry9lRHP5gvUgvEXoqJmMjkDYWpgL4CF uWexl2vO3CbM4OEQP16DDk6PL+snG52kjVNryU8k37kplRLacvFgiDHxleAawGWerEsM 9RJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752144338; x=1752749138; 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=/kn+Nlme/iAkqffgZvptFY3jhjfV+Qi2QuRGeFFxrUg=; b=l2Y2fT4Sth5xIDiwPm/1mfgFz40AYB6zgOSqSn+wb7m6HWIrdWJ384D/rRU5PN+f5u GdI7FD8pAaKSCAK1UGHd9d/7DuJVoKiL53ofiqz5vZYJ3BdrUAkEXvdUnsgrvg9yhmar zIS7EtlSnghkW+u01JXxEglkiiI/lAF2ErFhjg+dDWeXdhHhPV36ElXbubijYXM3PwPt 2Sk0+NEvsD07Zd71jHsrxiyEmIfBWysUSIlY1obP3Pu90iya3/cuN3ITIAsQr3wbKxdi TlSyalZ8r2NiFpZXctzQXvrgrguGnoKBIa4H+YgCEogEo3YU2dn1dR5GMyH4Iom1Euyi LoJA== X-Gm-Message-State: AOJu0YxJkT8jurUO9lvl5PaZcCtsjTmeGM5mWU/GhC4vgOICy8dpUmBF j/+K1rkQB58tX9sHTFdckTH0wcWvwmVHwQ+uHB6vk1eQPdKNskE2maLqfEijLeJRaZE= X-Gm-Gg: ASbGncuBIUHC/PG2hig00lDUU9IG8cKK6+J3cM4Ol8r/9b5ISNkK8NskWyU+6RXiU9Z 2jVT3bXW0sNNWq8h/4uM9lFFLG10VvqXjiiSmpzUXLaHHWJdUtsetQkYPvHmi6PzZJySnHJzhkA U3+vcM9Fd9npnCZjZWcIxzuAhMPtroL1fv9wEotfYzFe2qdhzl8fVMBT04ZLnt3y38oKS9aDapj 3bUEl9mTbuSkLbPU8DYi+yEEgvH4z6MuhJuDeC5WylZ6eApylwKnhuh/ZgmCSOC7MNvNkfvd5Uf naargNiJScfuoUDpIYnrm1dnG4qBah3lVQqj0Jw67L1uQgk6D5OknM61NSfu+jw= X-Google-Smtp-Source: AGHT+IHTgRA7pgf1Mh+2rw9zldooRzB6GIP2uUxDs22K2ZKN36igrTMdd6T74rRfvOJj+DKWSzGFZA== X-Received: by 2002:a05:600c:a00c:b0:43c:f44c:72a6 with SMTP id 5b1f17b1804b1-454dd1f3edbmr19383905e9.2.1752144337535; Thu, 10 Jul 2025 03:45:37 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Mahmoud Mandour , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Richard Henderson , Jason Wang , Riku Voipio , Laurent Vivier , Pierrick Bouvier , Manos Pitsidianakis Subject: [PATCH 6/7] docs: use :kbd: role in sphinx docs Date: Thu, 10 Jul 2025 11:45:29 +0100 Message-ID: <20250710104531.3099313-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250710104531.3099313-1-alex.bennee@linaro.org> References: <20250710104531.3099313-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1752144538494116600 From: Manos Pitsidianakis Sphinx supports the :kbd: role for notating keyboard input. They get formatted as HTML elements in the readthedocs theme we currently use for Sphinx. Besides the better visual formatting, it also helps with accessibility as screen readers can announce the semantics of the element to the user. Signed-off-by: Manos Pitsidianakis Message-ID: <20250709-docs_rst_improvements-v2-1-cb5096ad0022@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- docs/devel/testing/main.rst | 4 +-- docs/system/images.rst | 2 +- docs/system/keys.rst.inc | 49 +++++++++++++++++---------------- docs/system/linuxboot.rst | 2 +- docs/system/mux-chardev.rst.inc | 38 ++++++++++++++----------- 5 files changed, 51 insertions(+), 44 deletions(-) diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst index 6b18ed875c..2b5cb0c148 100644 --- a/docs/devel/testing/main.rst +++ b/docs/devel/testing/main.rst @@ -604,9 +604,9 @@ below steps to debug it: 2. Add "V=3D1" to the command line, try again, to see the verbose output. 3. Further add "DEBUG=3D1" to the command line. This will pause in a shell= prompt in the container right before testing starts. You could either manually - build QEMU and run tests from there, or press Ctrl-D to let the Docker + build QEMU and run tests from there, or press :kbd:`Ctrl+d` to let the = Docker testing continue. -4. If you press Ctrl-D, the same building and testing procedure will begin= , and +4. If you press :kbd:`Ctrl+d`, the same building and testing procedure wil= l begin, and will hopefully run into the error again. After that, you will be droppe= d to the prompt for debug. =20 diff --git a/docs/system/images.rst b/docs/system/images.rst index a5551173c9..43706969fd 100644 --- a/docs/system/images.rst +++ b/docs/system/images.rst @@ -30,7 +30,7 @@ Snapshot mode If you use the option ``-snapshot``, all disk images are considered as read only. When sectors in written, they are written in a temporary file created in ``/tmp``. You can however force the write back to the raw -disk images by using the ``commit`` monitor command (or C-a s in the +disk images by using the ``commit`` monitor command (or :kbd:`Ctrl+a s` in= the serial console). =20 .. _vm_005fsnapshots: diff --git a/docs/system/keys.rst.inc b/docs/system/keys.rst.inc index 59966a3fe7..c28ae1a227 100644 --- a/docs/system/keys.rst.inc +++ b/docs/system/keys.rst.inc @@ -1,36 +1,37 @@ During the graphical emulation, you can use special key combinations from -the following table to change modes. By default the modifier is Ctrl-Alt +the following table to change modes. By default the modifier is :kbd:`Ctrl= +Alt` (used in the table below) which can be changed with ``-display`` suboption ``mod=3D`` where appropriate. For example, ``-display sdl, -grab-mod=3Dlshift-lctrl-lalt`` changes the modifier key to Ctrl-Alt-Shift, -while ``-display sdl,grab-mod=3Drctrl`` changes it to the right Ctrl key. +grab-mod=3Dlshift-lctrl-lalt`` changes the modifier key to :kbd:`Ctrl+Alt+= Shift`, +while ``-display sdl,grab-mod=3Drctrl`` changes it to the right :kbd:`Ctrl= ` key. =20 -Ctrl-Alt-f - Toggle full screen +.. list-table:: Multiplexer Keys + :widths: 10 90 + :header-rows: 1 =20 -Ctrl-Alt-+ - Enlarge the screen + * - Key Sequence + - Action =20 -Ctrl-Alt\-- - Shrink the screen + * - :kbd:`Ctrl+Alt+f` + - Toggle full screen =20 -Ctrl-Alt-u - Restore the screen's un-scaled dimensions + * - :kbd:`Ctrl+Alt++` + - Enlarge the screen =20 -Ctrl-Alt-n - Switch to virtual console 'n'. Standard console mappings are: + * - :kbd:`Ctrl+Alt+-` + - Shrink the screen =20 - *1* - Target system display + * - :kbd:`Ctrl+Alt+u` + - Restore the screen's un-scaled dimensions =20 - *2* - Monitor + * - :kbd:`Ctrl+Alt+n` + - Switch to virtual console 'n'. Standard console mappings are: =20 - *3* - Serial port + - *1*: Target system display + - *2*: Monitor + - *3*: Serial port + * - :kbd:`Ctrl+Alt+g` + - Toggle mouse and keyboard grab. =20 -Ctrl-Alt-g - Toggle mouse and keyboard grab. - -In the virtual consoles, you can use Ctrl-Up, Ctrl-Down, Ctrl-PageUp and -Ctrl-PageDown to move in the back log. +In the virtual consoles, you can use :kbd:`Ctrl+Up`, :kbd:`Ctrl+Down`, :kb= d:`Ctrl+PageUp` and +:kbd:`Ctrl+PageDown` to move in the back log. diff --git a/docs/system/linuxboot.rst b/docs/system/linuxboot.rst index 2328b4a73d..f7573ab80a 100644 --- a/docs/system/linuxboot.rst +++ b/docs/system/linuxboot.rst @@ -26,5 +26,5 @@ virtual serial port and the QEMU monitor to the console w= ith the |qemu_system| -kernel bzImage -drive file=3Drootdisk.img,format=3Draw \ -append "root=3D/dev/sda console=3DttyS0" -nographic =20 -Use Ctrl-a c to switch between the serial console and the monitor (see +Use :kbd:`Ctrl+a c` to switch between the serial console and the monitor (= see :ref:`GUI_keys`). diff --git a/docs/system/mux-chardev.rst.inc b/docs/system/mux-chardev.rst.= inc index 84ea12cbf5..c87ba31362 100644 --- a/docs/system/mux-chardev.rst.inc +++ b/docs/system/mux-chardev.rst.inc @@ -1,27 +1,33 @@ During emulation, if you are using a character backend multiplexer (which is the default if you are using ``-nographic``) then several commands are available via an escape sequence. These key sequences all -start with an escape character, which is Ctrl-a by default, but can be +start with an escape character, which is :kbd:`Ctrl+a` by default, but can= be changed with ``-echr``. The list below assumes you're using the default. =20 -Ctrl-a h - Print this help +.. list-table:: Multiplexer Keys + :widths: 20 80 + :header-rows: 1 =20 -Ctrl-a x - Exit emulator + * - Key Sequence + - Action =20 -Ctrl-a s - Save disk data back to file (if -snapshot) + * - :kbd:`Ctrl+a h` + - Print this help =20 -Ctrl-a t - Toggle console timestamps + * - :kbd:`Ctrl+a x` + - Exit emulator =20 -Ctrl-a b - Send break (magic sysrq in Linux) + * - :kbd:`Ctrl+a s` + - Save disk data back to file (if -snapshot) =20 -Ctrl-a c - Rotate between the frontends connected to the multiplexer (usually - this switches between the monitor and the console) + * - :kbd:`Ctrl+a t` + - Toggle console timestamps =20 -Ctrl-a Ctrl-a - Send the escape character to the frontend + * - :kbd:`Ctrl+a b` + - Send break (magic sysrq in Linux) + + * - :kbd:`Ctrl+a c` + - Rotate between the frontends connected to the multiplexer (usually t= his switches between the monitor and the console) + + * - :kbd:`Ctrl+a Ctrl+a` + - Send the escape character to the frontend --=20 2.47.2 From nobody Sat Nov 15 12:16:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1752144394; cv=none; d=zohomail.com; s=zohoarc; b=PDDFZAjpF/aMGSt2Da0lvwQzYzAz7jS+IQfikWOVh0JXXK0Lz7K7/VLiL3zLXl9UvlJvyx9Vn6ZUzBwJCKp8nUH0Toaz+ZHYkkzL7VbuWafZN1bEYBSwCNQc3lxB/5t4tvQsPIbGQ7tKB5pmeM0eI6CB0mefh///zMUASty2Nd4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752144394; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=j1lONaDCGcDF8Vf2dQSf345RzEHUxlyX4PcTEZfK8bc=; b=dsvXBzegayT3MyyOlv1OruTyOh+LnVkRpUeKLmapDAjjjJ9cUtAugKm8Wq9TIzFF4ICG/9WHH9qy2G+BaT/+zRZy3ly0wj8T6FMagvM7AlwBkhI9zmVhDs28o7yBJT+kz3Bklqh8gGgTlk/DC9FSVv2eBfrgHawn1ILZzKjUDiA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752144393981636.856197143632; Thu, 10 Jul 2025 03:46:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uZomz-0001zJ-FH; Thu, 10 Jul 2025 06:46:05 -0400 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 ) id 1uZomm-0001rr-Gq for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:56 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uZomd-00078P-IZ for qemu-devel@nongnu.org; Thu, 10 Jul 2025 06:45:52 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-453634d8609so4776625e9.3 for ; Thu, 10 Jul 2025 03:45:41 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-454d50df5a1sm54634875e9.22.2025.07.10.03.45.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 03:45:36 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DC9645F8CE; Thu, 10 Jul 2025 11:45:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1752144339; x=1752749139; darn=nongnu.org; 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=j1lONaDCGcDF8Vf2dQSf345RzEHUxlyX4PcTEZfK8bc=; b=eIiaPVXZ+TImU06oLM5pJYqSCgTF7Ta6a7H/ojRZQ+LZVCI+v1abe3wj5H7xaDpmwi K/2SbcnafMWSsp+jnJ7se9siFCizWVRBoR61r5XyVyYS92v5GDUIWd1yH8lQWhmmXDkz t/mQ7YnKHws8DMLJHTGkOs0f47kacV8G7Ena32xObT+hG2hxq/R+ewvavqZSM04AEOox h22y6fdYOz9/XMbn7i7SB2Dyd60WCaPwQTIndtDJJ3wnw8cOIf5p3HyMM84hwpAOgtmc Abge8F8nAAg5gb/ae75jHG5RUancu9YrXhXbdncC1NJXYRfWJD47O4lCDvkN7u6ZPzbV C4zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752144339; x=1752749139; 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=j1lONaDCGcDF8Vf2dQSf345RzEHUxlyX4PcTEZfK8bc=; b=gdWUSv4UrXpRE3ygH6Upg8PEm1jWu3fqL6WV2Yy4CN37XsFzbBHsJ8W0ubMGNv7amt /+P9H0/b7RO7eYF/8hAFQwylJSiawpCIJ/TkOED0kULJ67ARYK4r9gUg7QEBmZ9R4ub+ W5c5GzztDve4AteHUxkUPNX16x34wBPRdY/0G3RsFWqnO9PtiYDxWwE5Mlo5JqWjqDxx xFq7h5BI4E9JCPdIr8JQOUi6wlA6JpyXazJ083POe1HSAr02hkRdncGzrbJz7FZ5cmcV cy7uPK555lsVJNsqRcAlWaTUqPYWUQPHBCYLC5hZvGBfChJpBBq7Ch1tMLcbRD10h4aa +rYQ== X-Gm-Message-State: AOJu0YyMoM7J4/9SpJCIGfRtLjfPKnvndEq1YyuuyjJOuuEM5wo3wF56 1McHPKyb94ywVquc10ss1vJgpRNM+VYnLAniRptgvEjuc2xQGy+/UtlkrRClti5KogI= X-Gm-Gg: ASbGnct7Iox+RnF6Nc7EzjS8yUsn73v/vZ+Meg2FPyY9cMw9mq3Q+JUbiPxpBAYORjr NEGVKh2yUi8/Ow0irYeNkhNfc5tqWZWnUWV55+uhBR3tLMt6FqZH1+MevDsXMfzdMTk4Lj5t6De h1HAIlwWNnXt8Ofb6LMfbTrCX4Uk3ProRlgUPIbKx4VYIgNnHLehtJgHdkb/jNPJF7OFHVrnPZr gK8rkpcDs3DKR1LatRUFfaXZ+ip36LygQYFfsjZndG61yxGvBCP+0p+vxQNeEq6DGfNQGE6ncR/ suuto9eWIakXqnueI+3G3eOYztalC65O/oRMi3t2+TJfFNw7kjTexloaOgCElPw= X-Google-Smtp-Source: AGHT+IHO7PxjfZO7RtVnQlPFZRSaZVs6hRhnMDeQzkKHslS/UfaLWsb7RSXMFKgtd0e2NW4Sgbc8HQ== X-Received: by 2002:a05:600c:4454:b0:450:cac5:45e7 with SMTP id 5b1f17b1804b1-454d52db8efmr54057855e9.1.1752144339127; Thu, 10 Jul 2025 03:45:39 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Mahmoud Mandour , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Richard Henderson , Jason Wang , Riku Voipio , Laurent Vivier , Pierrick Bouvier Subject: [PATCH 7/7] docs/system: clean-up formatting of virtio-net-failover Date: Thu, 10 Jul 2025 11:45:30 +0100 Message-ID: <20250710104531.3099313-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250710104531.3099313-1-alex.bennee@linaro.org> References: <20250710104531.3099313-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1752144396645116600 We didn't clean-up the rst formatting when we moved this into the docs so lets do that now: - un-indent the usage/hotplug/migration paragraphs - properly wrap the command line fragments in code-block - highlight parameters in text with ``double quotes`` No changes to the actual text. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Manos Pitsidianakis --- docs/system/virtio-net-failover.rst | 51 ++++++++++++++++------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/docs/system/virtio-net-failover.rst b/docs/system/virtio-net-f= ailover.rst index 6002dc5d96..0cc465454c 100644 --- a/docs/system/virtio-net-failover.rst +++ b/docs/system/virtio-net-failover.rst @@ -26,43 +26,48 @@ and standby devices are not plugged into the same PCIe = slot. Usecase ------- =20 - Virtio-net standby allows easy migration while using a passed-through fa= st - networking device by falling back to a virtio-net device for the duratio= n of - the migration. It is like a simple version of a bond, the difference is = that it - requires no configuration in the guest. When a guest is live-migrated to - another host QEMU will unplug the primary device via the PCIe based hotp= lug - handler and traffic will go through the virtio-net device. On the target - system the primary device will be automatically plugged back and the - net_failover module registers it again as the primary device. +Virtio-net standby allows easy migration while using a passed-through +fast networking device by falling back to a virtio-net device for the +duration of the migration. It is like a simple version of a bond, the +difference is that it requires no configuration in the guest. When a +guest is live-migrated to another host QEMU will unplug the primary +device via the PCIe based hotplug handler and traffic will go through +the virtio-net device. On the target system the primary device will be +automatically plugged back and the net_failover module registers it +again as the primary device. =20 Usage ----- =20 - The primary device can be hotplugged or be part of the startup configura= tion +The primary device can be hotplugged or be part of the startup configurati= on =20 - -device virtio-net-pci,netdev=3Dhostnet1,id=3Dnet1,mac=3D52:54:00:6f:55:= cc, \ - bus=3Droot2,failover=3Don +.. code-block:: shell =20 - With the parameter failover=3Don the VIRTIO_NET_F_STANDBY feature will b= e enabled. + -device virtio-net-pci,netdev=3Dhostnet1,id=3Dnet1,mac=3D52:54:00:6f:55:= cc,bus=3Droot2,failover=3Don + +With the parameter ``failover=3Don`` the VIRTIO_NET_F_STANDBY feature will= be enabled. + +.. code-block:: shell =20 -device vfio-pci,host=3D5e:00.2,id=3Dhostdev0,bus=3Droot1,failover_pair_= id=3Dnet1 =20 - failover_pair_id references the id of the virtio-net standby device. This - is only for pairing the devices within QEMU. The guest kernel module - net_failover will match devices with identical MAC addresses. +``failover_pair_id`` references the id of the virtio-net standby device. +This is only for pairing the devices within QEMU. The guest kernel +module net_failover will match devices with identical MAC addresses. =20 Hotplug ------- =20 - Both primary and standby device can be hotplugged via the QEMU monitor. = Note - that if the virtio-net device is plugged first a warning will be issued = that it - couldn't find the primary device. +Both primary and standby device can be hotplugged via the QEMU +monitor. Note that if the virtio-net device is plugged first a warning +will be issued that it couldn't find the primary device. =20 Migration --------- =20 - A new migration state wait-unplug was added for this feature. If failove= r primary - devices are present in the configuration, migration will go into this st= ate. - It will wait until the device unplug is completed in the guest and then = move into - active state. On the target system the primary devices will be automatic= ally hotplugged - when the feature bit was negotiated for the virtio-net standby device. +A new migration state wait-unplug was added for this feature. If +failover primary devices are present in the configuration, migration +will go into this state. It will wait until the device unplug is +completed in the guest and then move into active state. On the target +system the primary devices will be automatically hotplugged when the +feature bit was negotiated for the virtio-net standby device. --=20 2.47.2