From patchwork Wed May 14 19:00:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 889881 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2781994wrr; Wed, 14 May 2025 12:03:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVyAtPBwX+iMs5MJt0PemCMLrvWRhgRBnIBR+spg6dd4kYqvONmJyM9Y+K1qdJSAIbS8aAiIg==@linaro.org X-Google-Smtp-Source: AGHT+IEGGyi2kIz7VvKlwP43spM/QFK4TVmQ4iINgeWyySKesjr/ATHBeLYCM0NHHFgDaIboMCKa X-Received: by 2002:a05:622a:260f:b0:472:1225:bd98 with SMTP id d75a77b69052e-49495d01c60mr85852171cf.50.1747249405396; Wed, 14 May 2025 12:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747249405; cv=none; d=google.com; s=arc-20240605; b=YRMtlNB5BUBP8gDK5ZqXYM9a0jaALuA9dIuBvPe7lqFmXDlKroqfXWwt9MewCYeHLN syHfCtCNB/AwMaSZ9gJzmJ+baP7d6ohzGTqF3xNproYU8dlJq/rCv2UcpXlv6aG0OvdR kB8iqDd0HC5fPc4dkQ5OuPf/H9WXdYXMqQEJY9RLdEp1Wfdy3e9j2xQuiOa04Ki3qLQ5 TgAuAL2bA1CQ5qpzxckvjYTHAR0jPPxj87fLG7LFfgblOj3qrRx+hQYmsE5jlzIo/+lU hyf1JxproSsW/iNBlAt4CFLg3Jsyn0a577dbFryRI0tYZPQq8V3UoWU08B40XtUrV0gE SyuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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; bh=/4E8mqbMdIas7KwsAjEFzap2P0qAGRjgfsaZSb3IS1Y=; fh=slBUHiphGZf68YtXAZoDwMwGT4RM1dtceEFytJ1qTrs=; b=IUY2TvupQ62zGLZgBTNmrSuLLjb0vSfUNsxWCfSvTnuEoV3bq72hxZmKAcUGRElprB 1naoMN24UrOt4qJeC2VIgLw+4x+uYPH0hpPpcSxA8BAhri99B6WwLAXxrOnFy96oofYw V9vsOiYT5Kum8ufTrzSz/mDzIruziIh0ejuH3zAcW7MSsbJghUEdonZEsHRcxq6PDCvu YDl1V7lUlz/HgBNn35DIejUNP+PbAEJuCWzKFv+FQG7P80CUe2SW8keCR4ggzbwAgfCL Kjac/MwwqwIff4LVtYb+IxDJAILdRij7WSCCt/jeqlYUWa2FWUz7Oox0pF+QV8tEyAbG lfpA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4945245b2edsi147003521cf.58.2025.05.14.12.03.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 12:03:25 -0700 (PDT) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFHNg-0007Dp-Ns; Wed, 14 May 2025 15:03:04 -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 1uFHLc-0004Cw-Cn; Wed, 14 May 2025 15:00:58 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFHLa-0007J8-Gu; Wed, 14 May 2025 15:00:56 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 1E18D121D8E; Wed, 14 May 2025 22:00:32 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 26CFB20BA80; Wed, 14 May 2025 22:00:42 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , Pierrick Bouvier , Michael Tokarev Subject: [Stable-10.0.1 04/23] target/avr: Improve decode of LDS, STS Date: Wed, 14 May 2025 22:00:16 +0300 Message-Id: <20250514190041.104759-4-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson The comment about not being able to define a field with zero bits is out of date since 94597b6146f3 ("decodetree: Allow !function with no input bits"). This fixes the missing load of imm in the disassembler. Cc: qemu-stable@nongnu.org Fixes: 9d8caa67a24 ("target/avr: Add support for disassembling via option '-d in_asm'") Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson (cherry picked from commit 6b661b7ed7cd02c54a78426d5eb7dd8543b030ed) Signed-off-by: Michael Tokarev diff --git a/target/avr/insn.decode b/target/avr/insn.decode index 482c23ad0c..cc302249db 100644 --- a/target/avr/insn.decode +++ b/target/avr/insn.decode @@ -118,11 +118,8 @@ BRBC 1111 01 ....... ... @op_bit_imm @io_rd_imm .... . .. ..... .... &rd_imm rd=%rd imm=%io_imm @ldst_d .. . . .. . rd:5 . ... &rd_imm imm=%ldst_d_imm -# The 16-bit immediate is completely in the next word. -# Fields cannot be defined with no bits, so we cannot play -# the same trick and append to a zero-bit value. -# Defer reading the immediate until trans_{LDS,STS}. -@ldst_s .... ... rd:5 .... imm=0 +%ldst_imm !function=next_word +@ldst_s .... ... rd:5 .... imm=%ldst_imm MOV 0010 11 . ..... .... @op_rd_rr MOVW 0000 0001 .... .... &rd_rr rd=%rd_d rr=%rr_d diff --git a/target/avr/translate.c b/target/avr/translate.c index 4ab71d8138..e7f8ced9b3 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -1578,7 +1578,6 @@ static bool trans_LDS(DisasContext *ctx, arg_LDS *a) TCGv Rd = cpu_r[a->rd]; TCGv addr = tcg_temp_new_i32(); TCGv H = cpu_rampD; - a->imm = next_word(ctx); tcg_gen_mov_tl(addr, H); /* addr = H:M:L */ tcg_gen_shli_tl(addr, addr, 16); @@ -1783,7 +1782,6 @@ static bool trans_STS(DisasContext *ctx, arg_STS *a) TCGv Rd = cpu_r[a->rd]; TCGv addr = tcg_temp_new_i32(); TCGv H = cpu_rampD; - a->imm = next_word(ctx); tcg_gen_mov_tl(addr, H); /* addr = H:M:L */ tcg_gen_shli_tl(addr, addr, 16); From patchwork Wed May 14 19:00:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 889880 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2781146wrr; Wed, 14 May 2025 12:01:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVqbmjrvenWyY2plODOaHGmQhYCcN4XKtuNNlhgNSJds1c6u2afDLYz7l/dVoPqNADPriflUw==@linaro.org X-Google-Smtp-Source: AGHT+IEGBgxzNISs6UHFpktB3fdqDgjTjIS1Je426chT627rm/pXxr6cDE8kODQ38KHmHsE1yaWw X-Received: by 2002:a05:6808:3d6:b0:400:fa6b:a104 with SMTP id 5614622812f47-404c213860dmr2503844b6e.33.1747249311520; Wed, 14 May 2025 12:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747249311; cv=none; d=google.com; s=arc-20240605; b=HJI+YeHmQTxy36OntOmtJwro84e2/MUVdWoPT5fn6392CCITuNvMbrgb3XB5LDK4zJ cZ8RF2JoeJviTjghag8KfG7BnZQUS4+O33pVdhcEj4MfTl828QP0/JEg3umJD60HTwAM xAXqFfveYvPVT1KYPMGyE+u/Y/N+J3xbEAXzfxtge/15UaJx3K8C4pf5F3hlYGvKhtgP zKLe4OKTnzWWoXlImsu2emzskVOY7njHRZE/jhfDUdj0ecVl7cX18iQ0ebuWM+YyiBvy FPykdmr1wfkswk2oKP5yT9fztVxiSW7xMnYjcDg7d/qtiVfSyFJp10TN13Rw5eArpdaE WTwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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; bh=/a8fldtJ4KUtbnwar71NZnUcLmiDYwojMgxf75Yy/PU=; fh=Ceclp5Tst4XVmXzYZe8xLQpUs//cYv+jjhxWuShhOvI=; b=fYuPAY8MMokvaHYmHwRcb7Pf2c803/YYsPX6EuJDT/Vv4TfwnI522k2KWTgTZAkzyF R4+WOHq0awjK+cpl7goevu2U6QE9cSMw4qa8+hHX/APrqofXTkkSjEMoXQ7ytcesjfyA pfbdgx8/Ssf+LclprrK+zU1kGMNK8AQHXwr4/Q797Pgbb4rqWksilG0ee1/hRrtHYh1F ZwCYIYJ9yN5JyecQIuttyz3+OL4T3oBchVoLcDy+MPktmdBXabhSyOvedh/dO/bOxsab Y108ZOA4NunMYn91w4lNCF95wLAS1nkw3oahujqdZbARoqxhLMu8d1LMmqoC0khBR2tK 12Pg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a1e0cc1a2514c-879f62f464asi5110359241.177.2025.05.14.12.01.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 12:01:51 -0700 (PDT) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFHMJ-0004sX-91; Wed, 14 May 2025 15:01:39 -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 1uFHLc-0004D3-Nv; Wed, 14 May 2025 15:00:58 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFHLa-0007JM-PP; Wed, 14 May 2025 15:00:56 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 2B2E5121D8F; Wed, 14 May 2025 22:00:32 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 311C620BA81; Wed, 14 May 2025 22:00:42 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Pierrick Bouvier , Zhao Liu , Michael Tokarev Subject: [Stable-10.0.1 05/23] hw/core: Get default_cpu_type calling machine_class_default_cpu_type() Date: Wed, 14 May 2025 22:00:17 +0300 Message-Id: <20250514190041.104759-5-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Since commit 62b4a227a33 the default cpu type can come from the valid_cpu_types[] array. Call the machine_class_default_cpu_type() instead of accessing MachineClass::default_cpu_type field. Cc: qemu-stable@nongnu.org Fixes: 62b4a227a33 ("hw/core: Add machine_class_default_cpu_type()") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Reviewed-by: Zhao Liu Message-Id: <20250422084114.39499-1-philmd@linaro.org> (cherry picked from commit d5f241834be1b323ea697a469ff0f1335a1823fe) Signed-off-by: Michael Tokarev diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 3130c5cd45..1bc21b84a4 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -72,6 +72,7 @@ MachineInfoList *qmp_query_machines(bool has_compat_props, bool compat_props, for (el = machines; el; el = el->next) { MachineClass *mc = el->data; + const char *default_cpu_type = machine_class_default_cpu_type(mc); MachineInfo *info; info = g_malloc0(sizeof(*info)); @@ -90,8 +91,8 @@ MachineInfoList *qmp_query_machines(bool has_compat_props, bool compat_props, info->numa_mem_supported = mc->numa_mem_supported; info->deprecated = !!mc->deprecation_reason; info->acpi = !!object_class_property_find(OBJECT_CLASS(mc), "acpi"); - if (mc->default_cpu_type) { - info->default_cpu_type = g_strdup(mc->default_cpu_type); + if (default_cpu_type) { + info->default_cpu_type = g_strdup(default_cpu_type); } if (mc->default_ram_id) { info->default_ram_id = g_strdup(mc->default_ram_id); diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index f81cb680fc..21a76e904a 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7082,7 +7082,7 @@ ObjectClass *ppc_cpu_class_by_name(const char *name) if (strcmp(name, "max") == 0) { MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); if (mc) { - return object_class_by_name(mc->default_cpu_type); + return object_class_by_name(machine_class_default_cpu_type(mc)); } } #endif From patchwork Wed May 14 19:00:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 889882 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2782065wrr; Wed, 14 May 2025 12:03:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWZV8cLE7BkFp5XO+kTe1ujEjBUwlLmDQg5xOvhTbohhZFgK5Mcxku2fk/wGlV5b+VhXTNG3A==@linaro.org X-Google-Smtp-Source: AGHT+IHKqQ49G1XvZ3Tuwfa3O3tCIhQX/hXVmOZALIRNWUZ6SyaZpTsEIIe0eeKxMqTzw3msHCpV X-Received: by 2002:ac8:6f0d:0:b0:476:7e6b:d291 with SMTP id d75a77b69052e-49495cdad8cmr75074711cf.37.1747249412986; Wed, 14 May 2025 12:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747249412; cv=none; d=google.com; s=arc-20240605; b=ap3QAIlhkXgplmt5Kwei5uog8/gPKPGMKRDk31ZgkQPuIWAnI06ToyLc2RkJWDgOHI zYnhAW2u3KF6wSdpEJuNoc0nm50SlcFN1nW3i09V+Qr0rq/HNYnJ8MpZR4dpXLdsfxB4 QVXdt6u3K1awDBruSi7RsG87KwobnFs5Ccos+CpcLlG4g7aB9Vafmf+5YqkWrw5ZFOPV 9AkIiDBzjVhyrvmZF4tUwp216Y+JaNKcKVxmxpCaAM6Dguhh2igDyNfLepqnc89d3skS aBQhNZxQNB7trmY918PdyOYkD4Uln5Bm9eJ2Xn55ozGkv1FuEpGxmfmU9HFg1pl5++pa dd8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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; bh=+a67s4ku/+SPKFfdCqdmotpOqxrjkoeqEePXP17ix+E=; fh=oWLcPJxnKq4dSYKEL252oFvFAim14Gy59aQ+WFb//EY=; b=NuNcRhdEoRmA+DgJ+J27ITsw0mm+PrGUJzD+Ml/XWDnE0LdB8H/RMLbdSp8bDDi105 Y9zLyQQpNqgPut5MOA2Mubpl1qZYVaKhqO72X9fOYnjuug57xzjRhPYlHUJ029hu5mwW E0MoYo3MoYp9uZX4b0mog6rRcEJ2MzxBk3PjXfAnxyX8rYp5CthT5msBjx/ZN/G6whG4 TMkDtEaoBDtXJTgvcWGQtadihJ8SoH+CYok2ft68lvf2HhzZ6bLPiwnFvHCjPnr906Co Wg4JONrIby/T2Ogpy2Y/t/JwAmdRQWqaHul6NNQ6rjzncutZR/RAqc7stKbU9SiKCZMd xXng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4945257e96dsi139554081cf.372.2025.05.14.12.03.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 12:03:32 -0700 (PDT) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFHNu-0007vc-RN; Wed, 14 May 2025 15:03:19 -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 1uFHLj-0004Jv-AM; Wed, 14 May 2025 15:01:03 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFHLf-0007LE-QR; Wed, 14 May 2025 15:01:02 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 3ACA6121D90; Wed, 14 May 2025 22:00:32 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 3E70D20BA82; Wed, 14 May 2025 22:00:42 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Michael Tokarev Subject: [Stable-10.0.1 06/23] hw/core/cpu: gdb_arch_name string should not be freed Date: Wed, 14 May 2025 22:00:18 +0300 Message-Id: <20250514190041.104759-6-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell The documentation for the CPUClass::gdb_arch_name method claims that the returned string should be freed with g_free(). This is not correct: in commit a650683871ba728 we changed this method to instead return a simple constant string, but forgot to update the documentation. Make the documentation match the new semantics. Fixes: a650683871ba728 ("hw/core/cpu: Return static value with gdb_arch_name()") Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20250317142819.900029-2-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé (cherry picked from commit 56a9f0d4c4a483ce217e5290db69cb1788586787) Signed-off-by: Michael Tokarev diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index abd8764e83..e136b067cd 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -135,7 +135,8 @@ struct SysemuCPUOps; * @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop * before the insn which triggers a watchpoint rather than after it. * @gdb_arch_name: Optional callback that returns the architecture name known - * to GDB. The caller must free the returned string with g_free. + * to GDB. The returned value is expected to be a simple constant string: + * the caller will not g_free() it. * @disas_set_info: Setup architecture specific components of disassembly info * @adjust_watchpoint_address: Perform a target-specific adjustment to an * address before attempting to match it against watchpoints. From patchwork Wed May 14 19:00:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 889883 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2782905wrr; Wed, 14 May 2025 12:05:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVaGygxYHHu25wVQbMDtsOJKzHPiBCrTrz9B8vh0Uzhy4VgfLVPfslQuQupZk1qWZ2fRYmC5w==@linaro.org X-Google-Smtp-Source: AGHT+IHJCao/kobz8SuUgVNkNyqhCkQra+ufzqj/Jh3xHy/ThS/hoZfTglXIXWafGwIQLpdT8DJJ X-Received: by 2002:a05:6214:226c:b0:6f5:402e:6bb2 with SMTP id 6a1803df08f44-6f896e35cd1mr71152706d6.22.1747249511491; Wed, 14 May 2025 12:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747249511; cv=none; d=google.com; s=arc-20240605; b=dC9K+rfGVfrVvb9f3rplmRl65h52mk4DGFd/gbJBMR3K4D1loyj9Era3ZCyhIx5Z2k LYO+rSczcPe9NxCC0+LVa7krcNsnZ+ELObSbBUZUkK9wsryo1TWntZ1BRsxTIRuK3L8h A1kNZQNlnG0zrhPwQfAT6fX9Ccy5xd4FMwDWEi+6xMXtM3sBZcjjDfKX9EWf92igkmMx hAy6wGP9+1mgzyNOW3aS0wNnmBI1zzRQOPUtQ71PVgVFV3exZYQr/evSzG1nFj0INE34 TSO4a3Zplb19X3veRbU9gf9vuTF0ncM9ydarpGQQBSntFuR1djkY2KiTiX1ui2veiq/Z DlKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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; bh=zC89ggI/xYSm/WynD7n0ju+wBVmNqL+FMQvCe83ke5M=; fh=AgmXo2+zLpyt0lWz/ekZ8kEoo1qvR6yygj195zlOVQE=; b=YDMRuFB+RN60GAeIWUUCUtRoeSSWgEEmdQOS72Sw/Xc8IWZus7R0eg/o8lCLgsxX3s O1HGLnGAhgUkGtKz8olq7gs+SalLaCk/+yOt5UcLGi4zScyMC61q2BiSaFoUwl37bk/J Dd+upLjdcLt2KyUkZyOrdexCT8WpCxTok1I6c5Fai/SR/YMRaj6ZtHu24bbHc3tOgbmZ jLgiAdGXp7FOq8RkuTdVa9M+BjXJMyTd3pRrOpcs47Wjgisc6CTWlWxuUbYtMAgz5Xn2 DuhUpYWIWXGlw7lWZBpN05VmC20aNDtZcSenkdV5h7Erq8pcLmBdRRBgdUKC2yQS26Xl +Jng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f6e3a4ba89si143092926d6.322.2025.05.14.12.05.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 12:05:11 -0700 (PDT) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFHOw-0002EU-RR; Wed, 14 May 2025 15:04:23 -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 1uFHMH-0004wN-Ec; Wed, 14 May 2025 15:01:37 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFHME-0007Qp-5u; Wed, 14 May 2025 15:01:36 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 891D5121D96; Wed, 14 May 2025 22:00:32 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 830BA20BA88; Wed, 14 May 2025 22:00:42 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Michael Tokarev Subject: [Stable-10.0.1 12/23] accel/tcg: Don't use TARGET_LONG_BITS in decode_sleb128 Date: Wed, 14 May 2025 22:00:24 +0300 Message-Id: <20250514190041.104759-12-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson When we changed decode_sleb128 from target_long to int64_t, we failed to adjust the shift limit. Cc: qemu-stable@nongnu.org Fixes: c9ad8d27caa ("tcg: Widen gen_insn_data to uint64_t") Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson (cherry picked from commit 9401f91b9b0c46886388735b3f2033a9c254895a) Signed-off-by: Michael Tokarev diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 82bc16bd53..a497c54b80 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -106,7 +106,7 @@ static int64_t decode_sleb128(const uint8_t **pp) val |= (int64_t)(byte & 0x7f) << shift; shift += 7; } while (byte & 0x80); - if (shift < TARGET_LONG_BITS && (byte & 0x40)) { + if (shift < 64 && (byte & 0x40)) { val |= -(int64_t)1 << shift; } From patchwork Wed May 14 19:00:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 889885 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2784091wrr; Wed, 14 May 2025 12:07:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXW1lxxVTu2P9R+JgarTUHIiBWSo9+2NGJ8GaUU3y6LU1TnGBbyPHjCseNb1Dyt83qTV26rPw==@linaro.org X-Google-Smtp-Source: AGHT+IGXh6NVmv0luy2wcuy0XiuMVETxngcm2HeRmhzEIqkxfyAEK4LFzXa1u38dSLYf3g5IfPgv X-Received: by 2002:a05:6214:27c7:b0:6f5:3d25:ed3f with SMTP id 6a1803df08f44-6f896df94acmr75252756d6.9.1747249642681; Wed, 14 May 2025 12:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747249642; cv=none; d=google.com; s=arc-20240605; b=jCNfMqbRUEJGi3xwFAKM7h5DXqG27Wbt3iVwANMnwzImFy9FZVrozLBi9HeXCkCtph whhuDwO3K2ig9IH/cN97x+9PzEvgK4tnzMDHQ/ZyyvzphUgXd8LdQ9E44lCJLQz6TCYr 88uHwWtEM9YNOu3n94unNft2MYhoBTMUpVkAdmOHyKDq7mr0H4TWXQkhRyeJ2fPQL58/ KyRtc4HECmOsAdCi0M6+IX+FNsJ3zF8obi5B/JOlKTYe8MSYm83QlHmAIcvOhxS2Hz47 OU4xSyCsTxQB39SvzqN0v2IW4sgLDN8k9zzcoVV/e8ohdH+zievISRASvfXqecAeixmZ Wvtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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; bh=E27NA7+Rn8Z5+CpGoBBmDz2SHBXYRvHfJeivBPmVprU=; fh=xJ1URYKcMN3TM0/XAv5v+aCN+5tIbzAdcfBx5UNgoLw=; b=e/IgFr2XO/00SLEXV9o1yLoKSbDYYUrGZGJ5JTCHQV75fZH++Rs9xNTKGqvalfCE5J AxIwN1Z4UiQJYdQOUQ3iJT2lrc7TrFRrVNd1BMc5h7ohoynmtxZz9/vWNEmymww4sEy4 5ce6hEoGPs+7v/t199geDC2oPmUKSBv6SrBQ7EfElejjYCYnnv9DgMBa9iPmazt7vMCX nx1/sSGzIUfoindm9AzlVEoAQFVAHlWdc8ePGHfdGUNlKALDBFcl3z+xoYYHASlSYZ6l QqA2UMNNhcxTDuLLiM0GDIGntJTstApo1omKueECLLVixGLaEywAFP3tY1VSJVhsCE1b OAQg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f6e3a4bcbesi145523776d6.313.2025.05.14.12.07.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 12:07:22 -0700 (PDT) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFHQ9-0004Tz-Cc; Wed, 14 May 2025 15:05:37 -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 1uFHML-00051z-H4; Wed, 14 May 2025 15:01:44 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFHMI-0007Yh-UZ; Wed, 14 May 2025 15:01:41 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id A9A50121D98; Wed, 14 May 2025 22:00:32 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id B1CDC20BA8A; Wed, 14 May 2025 22:00:42 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Peter Maydell , Richard Henderson , Michael Tokarev Subject: [Stable-10.0.1 14/23] target/arm: Don't assert() for ISB/SB inside IT block Date: Wed, 14 May 2025 22:00:26 +0300 Message-Id: <20250514190041.104759-14-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell If the guest code has an ISB or SB insn inside an IT block, we generate incorrect code which trips a TCG assertion: qemu-system-arm: ../tcg/tcg-op.c:3343: void tcg_gen_goto_tb(unsigned int): Assertion `(tcg_ctx->goto_tb_issue_mask & (1 << idx)) == 0' failed. This is because we call gen_goto_tb(dc, 1, ...) twice: brcond_i32 ZF,$0x0,ne,$L1 add_i32 pc,pc,$0x4 goto_tb $0x1 exit_tb $0x73d948001b81 set_label $L1 add_i32 pc,pc,$0x4 goto_tb $0x1 exit_tb $0x73d948001b81 Both calls are in arm_tr_tb_stop(), one for the DISAS_NEXT/DISAS_TOO_MANY handling, and one for the dc->condjump condition-failed codepath. The DISAS_NEXT handling doesn't have this problem because arm_post_translate_insn() does the handling of "emit the label for the condition-failed conditional execution" and so arm_tr_tb_stop() doesn't have dc->condjump set. But for DISAS_TOO_MANY we don't do that. Fix the bug by making arm_post_translate_insn() handle the DISAS_TOO_MANY case. This only affects the SB and ISB insns when used in Thumb mode inside an IT block: only these insns specifically set is_jmp to TOO_MANY, and their A32 encodings are unconditional. For the major TOO_MANY case (breaking the TB because it would cross a page boundary) we do that check and set is_jmp to TOO_MANY only after the call to arm_post_translate_insn(); so arm_post_translate_insn() sees is_jmp == DISAS_NEXT, and we emit the correct code for that situation. With this fix we generate the somewhat more sensible set of TCG ops: brcond_i32 ZF,$0x0,ne,$L1 set_label $L1 add_i32 pc,pc,$0x4 goto_tb $0x1 exit_tb $0x7c5434001b81 (NB: the TCG optimizer doesn't optimize out the jump-to-next, but we can't really avoid emitting it because we don't know at the point we're emitting the handling for the condexec check whether this insn is going to happen to be a nop for us or not.) Cc: qemu-stable@nongnu.org Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2942 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20250501125544.727038-1-peter.maydell@linaro.org (cherry picked from commit 8ed7c0b6488a7f20318d6ba414f1cbcd0ed92afe) Signed-off-by: Michael Tokarev diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c index d280018138..7e749fc15b 100644 --- a/target/arm/tcg/translate.c +++ b/target/arm/tcg/translate.c @@ -7770,7 +7770,8 @@ static bool arm_check_ss_active(DisasContext *dc) static void arm_post_translate_insn(DisasContext *dc) { - if (dc->condjmp && dc->base.is_jmp == DISAS_NEXT) { + if (dc->condjmp && + (dc->base.is_jmp == DISAS_NEXT || dc->base.is_jmp == DISAS_TOO_MANY)) { if (dc->pc_save != dc->condlabel.pc_save) { gen_update_pc(dc, dc->condlabel.pc_save - dc->pc_save); } From patchwork Wed May 14 19:00:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 889884 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2783437wrr; Wed, 14 May 2025 12:06:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX5vFK52ciDlsWDk4JzAqCUWAQBzZWo6/6e/tQ/MRcBdGlxIe6sbxJOICA4upcc+6pdIKmUbQ==@linaro.org X-Google-Smtp-Source: AGHT+IGQca8I3wBxhvKkAEP3uCsVIv1Tm7ej3nc2UHCalC3Z+nqNI0d0UdzBo0ugVX+98LdzrShV X-Received: by 2002:ad4:5048:0:b0:6f8:997d:fc83 with SMTP id 6a1803df08f44-6f8997dfe2cmr37046756d6.23.1747249576683; Wed, 14 May 2025 12:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747249576; cv=none; d=google.com; s=arc-20240605; b=Pj7inIdN9QNmu1aWBx1q5sBnFW96/ac5VEjK6LQWhQtdEMw6o/dR0fZfoQgC1hlTsK kI0UP/dCH2EOjmiG1abeQCpAL0wjzXpaGcHfFG5qt7k0QTQxPdOiUhqsYBy/aulCPc7l z43G2BijPiFZnT/QXUJTUUQ9pdZkYomJjUnTicqeEgIP/Z6NIbB4g682Em3UVW7oy4fH p859jGw/Wf4ZN4SJ84t3LAOQRUhS6Kxz05/s/Xc7aeL+qkJhVjbace9SmrrNtokvaGfw JMppoQZ+HI8lPbQ+cOUW5IlOEqJNt0D8akuO/bRCzyXfwSuWTQv5IA81dC2+dA/N4ACA vKvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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; bh=Qvjpy9fii0rZ+pzDpXZbeaop6G3Ie27gLJJ6TkY9SC0=; fh=in5AYaflw3DFQzBcnu0CidqVfrZJS4E+AOESKz4G06s=; b=KgxKM35FIJcNyF4KseJaYlE++xR3PONzD+O8X2eZ71TDFIV5i23Foua6Yot0JlcGqr CkT1BrJBHq8VKf3JnUime2KdulcABj1SKEgYNvPBnrad6QU8Rtbp+99hssw/3unP1mQI lLUDApoDfdTyX86QTDHIfGtN/FAVyywqKSyYoENjSVv6s6Zkh86LJmgyUv8sn3fRo4Cw ZtiIUu7Mhw73uV9Av6rAlelWI3xVDzOxlzsBfmyjNR4xcz0hjpPjp+MaPEtD0CYJ9cEf CIiMrP3YVU3sanil46QPWmIVPH8JzICa2FiQNFo68dEl4HHnG62dVUrkfY978Ca68VR7 ygCg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f6e3a58d93si142076626d6.411.2025.05.14.12.06.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 12:06:16 -0700 (PDT) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFHQA-0004YG-Kt; Wed, 14 May 2025 15:05:39 -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 1uFHMN-00052Q-BK; Wed, 14 May 2025 15:01:44 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFHMK-0007ZB-Up; Wed, 14 May 2025 15:01:42 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id B6E86121D99; Wed, 14 May 2025 22:00:32 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id BCC0220BA8B; Wed, 14 May 2025 22:00:42 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Peter Maydell , Dario Faggioli , Eric Blake , Pierrick Bouvier , Michael Tokarev Subject: [Stable-10.0.1 15/23] docs: Don't define duplicate label in qemu-block-drivers.rst.inc Date: Wed, 14 May 2025 22:00:27 +0300 Message-Id: <20250514190041.104759-15-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell Sphinx requires that labels within documents are unique across the whole manual. This is because the "create a hyperlink" directive specifies only the name of the label, not a filename+label. Some Sphinx versions will warn about duplicate labels, but even if there is no warning there is still an ambiguity and no guarantee that the hyperlink will be created to the right target. For QEMU this is awkward, because we have various .rst.inc fragments which we include into multiple .rst files. If you define a label in the .rst.inc file then it will be a duplicate label. We have mostly worked around this by not putting labels into those .rst.inc files, or by adding "insert a label" functionality into the hxtool extension (see commit 1eeb432a953b0 "doc/sphinx/hxtool.py: add optional label argument to SRST directive"). Unfortunately in commit 7f6314427e78 ("docs/devel: add a codebase section") we accidentally added a duplicate label, because not all Sphinx versions warn about the mistake. In this case the link was only from the developer docs codebase summary, so as the simplest fix for the stable branch, we drop the link entirely. Cc: qemu-stable@nongnu.org Fixes: 1eeb432a953b0 "doc/sphinx/hxtool.py: add optional label argument to SRST directive" Reported-by: Dario Faggioli Signed-off-by: Peter Maydell Acked-by: Eric Blake Reviewed-by: Pierrick Bouvier Message-id: 20250501093126.716667-1-peter.maydell@linaro.org (cherry picked from commit 82707dd4f07613eed8d639956a43bddffca5cd5c) Signed-off-by: Michael Tokarev diff --git a/docs/devel/codebase.rst b/docs/devel/codebase.rst index ef98578296..085da10a22 100644 --- a/docs/devel/codebase.rst +++ b/docs/devel/codebase.rst @@ -116,7 +116,7 @@ yet, so sometimes the source code is all you have. * `monitor `_: `Monitor ` implementation (HMP & QMP). * `nbd `_: - QEMU `NBD (Network Block Device) ` server. + QEMU NBD (Network Block Device) server. * `net `_: Network (host) support. * `pc-bios `_: diff --git a/docs/system/qemu-block-drivers.rst.inc b/docs/system/qemu-block-drivers.rst.inc index cfe1acb78a..384e95ba76 100644 --- a/docs/system/qemu-block-drivers.rst.inc +++ b/docs/system/qemu-block-drivers.rst.inc @@ -500,8 +500,6 @@ What you should *never* do: - expect it to work when loadvm'ing - write to the FAT directory on the host system while accessing it with the guest system -.. _nbd: - NBD access ~~~~~~~~~~