Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2216118/?format=api
{ "id": 2216118, "url": "http://patchwork.ozlabs.org/api/patches/2216118/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-ppc/patch/20260325211728.89204-10-philmd@linaro.org/", "project": { "id": 69, "url": "http://patchwork.ozlabs.org/api/projects/69/?format=api", "name": "QEMU powerpc development", "link_name": "qemu-ppc", "list_id": "qemu-ppc.nongnu.org", "list_email": "qemu-ppc@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260325211728.89204-10-philmd@linaro.org>", "list_archive_url": null, "date": "2026-03-25T21:17:27", "name": "[PATCH-for-11.1,09/10] target/sparc: Replace VMSTATE_VARRAY_MULTIPLY -> VMSTATE_UINTTL_ARRAY", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6608de2afeddf2cc587f932bc0ed736064d2c817", "submitter": { "id": 85046, "url": "http://patchwork.ozlabs.org/api/people/85046/?format=api", "name": "Philippe Mathieu-Daudé", "email": "philmd@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-ppc/patch/20260325211728.89204-10-philmd@linaro.org/mbox/", "series": [ { "id": 497511, "url": "http://patchwork.ozlabs.org/api/series/497511/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-ppc/list/?series=497511", "date": "2026-03-25T21:17:18", "name": "migration: Reduce uses of target-specific macros", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497511/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2216118/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2216118/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=S/YXUGD6;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fh0CL2S7bz1y1G\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 08:19:10 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-ppc-bounces@nongnu.org>)\n\tid 1w5Vcd-0001ct-SS; Wed, 25 Mar 2026 17:18:39 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1w5Vcc-0001aK-J5\n for qemu-ppc@nongnu.org; Wed, 25 Mar 2026 17:18:38 -0400", "from mail-wr1-x430.google.com ([2a00:1450:4864:20::430])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1w5Vca-0001qq-OC\n for qemu-ppc@nongnu.org; Wed, 25 Mar 2026 17:18:38 -0400", "by mail-wr1-x430.google.com with SMTP id\n ffacd0b85a97d-439bcec8613so175153f8f.3\n for <qemu-ppc@nongnu.org>; Wed, 25 Mar 2026 14:18:35 -0700 (PDT)", "from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43b9192e3e8sm2917709f8f.5.2026.03.25.14.18.33\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Wed, 25 Mar 2026 14:18:34 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1774473515; x=1775078315; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=sYLEjfbOiczTZUFDQRpJ1WZc2p5N+UskvmbNC3BaZgI=;\n b=S/YXUGD6YXLJjanHRcE+nmVClXdBBIv+shjUwLVqpzHsjSCWOIurU23J3IHKTG6HIz\n uhvIPwqkD+AhruLJ0pJ3f92H2HXBCGbABF6jFDZNwV0Mmt4TF1ytjsC+n6S5Kdf5u5Lj\n 2l608vgp7PdBM3ka0A9MM1ezJpvqw/lqoeghvr/WHWq86c6ADkE9xdWHIyjNIq0CKI9D\n 5Wm0GuFb9dZdF6BYZplUS7m5e+lGtTZTWsWoIirzLoemMdGteqROw7tyJ+JzUqUIO/a9\n Syg5OJlQBMgZyl4ggpALcHf8WUy0TY1+exvgbDxRu1rOOn8TCrkmDeiuGni9LEzsK1pJ\n ZjdQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774473515; x=1775078315;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=sYLEjfbOiczTZUFDQRpJ1WZc2p5N+UskvmbNC3BaZgI=;\n b=aUqXRzm4Yrh/ACe8bHjISkdaIYH2TNjBfvQ7vlwvlD27ZNxq+Dl7XmLdNLOwdz6vI+\n Muac7FHEu0UHb59/9i0T2kAYQdkPmi5MxM74HUPAJbkd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b0:439:b6d6:723 with SMTP id\n ffacd0b85a97d-43b88a1bcc5mr7764409f8f.42.1774473514778;\n Wed, 25 Mar 2026 14:18:34 -0700 (PDT)", "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>", "To": "qemu-devel@nongnu.org", "Cc": "Glenn Miles <milesg@linux.ibm.com>,\n Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n Nicholas Piggin <npiggin@gmail.com>, qemu-ppc@nongnu.org,\n Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,\n Fabiano Rosas <farosas@suse.de>, Alistair Francis <alistair.francis@wdc.com>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, qemu-riscv@nongnu.org,\n Paolo Bonzini <pbonzini@redhat.com>, Artyom Tarasenko <atar4qemu@gmail.com>,\n Anton Johansson <anjo@rev.ng>, Peter Xu <peterx@redhat.com>, =?utf-8?q?Phil?=\n\t=?utf-8?q?ippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>", "Subject": "[PATCH-for-11.1 09/10] target/sparc: Replace VMSTATE_VARRAY_MULTIPLY\n -> VMSTATE_UINTTL_ARRAY", "Date": "Wed, 25 Mar 2026 22:17:27 +0100", "Message-ID": "<20260325211728.89204-10-philmd@linaro.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260325211728.89204-1-philmd@linaro.org>", "References": "<20260325211728.89204-1-philmd@linaro.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2a00:1450:4864:20::430;\n envelope-from=philmd@linaro.org; helo=mail-wr1-x430.google.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-ppc@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<qemu-ppc.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-ppc>,\n <mailto:qemu-ppc-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-ppc>", "List-Post": "<mailto:qemu-ppc@nongnu.org>", "List-Help": "<mailto:qemu-ppc-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-ppc>,\n <mailto:qemu-ppc-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "VMSTATE_VARRAY_MULTIPLY() seems to be an \"optimized\" version\nof VMSTATE_UINTTL_ARRAY(), and is only used once. Prefer the\ngeneric macro, removing the need for the VMS_MULTIPLY_ELEMENTS\nfield.\n\nBump the SPARC CPU migration stream version.\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\n---\n include/migration/cpu.h | 2 --\n include/migration/vmstate.h | 22 +++-------------------\n migration/vmstate.c | 4 ----\n target/sparc/machine.c | 7 +++----\n 4 files changed, 6 insertions(+), 29 deletions(-)", "diff": "diff --git a/include/migration/cpu.h b/include/migration/cpu.h\nindex ea411d863ad..05a1ddde343 100644\n--- a/include/migration/cpu.h\n+++ b/include/migration/cpu.h\n@@ -12,13 +12,11 @@\n VMSTATE_UINT64_V(_f, _s, _v)\n #define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v) \\\n VMSTATE_UINT64_ARRAY_V(_f, _s, _n, _v)\n-#define vmstate_info_uinttl vmstate_info_uint64\n #else\n #define VMSTATE_UINTTL_V(_f, _s, _v) \\\n VMSTATE_UINT32_V(_f, _s, _v)\n #define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v) \\\n VMSTATE_UINT32_ARRAY_V(_f, _s, _n, _v)\n-#define vmstate_info_uinttl vmstate_info_uint32\n #endif\n \n #define VMSTATE_UINTTL(_f, _s) \\\ndiff --git a/include/migration/vmstate.h b/include/migration/vmstate.h\nindex 62c2abd0c49..663b0c8ae06 100644\n--- a/include/migration/vmstate.h\n+++ b/include/migration/vmstate.h\n@@ -94,7 +94,7 @@ enum VMStateFlags {\n VMS_ARRAY_OF_POINTER = 0x040,\n \n /* The field is an array of variable size. The uint16_t at opaque\n- * + VMStateField.num_offset (subject to VMS_MULTIPLY_ELEMENTS)\n+ * + VMStateField.num_offset\n * contains the number of entries in the array. See the VMS_ARRAY\n * description regarding array handling in general. May not be\n * combined with VMS_ARRAY or any other VMS_VARRAY*. */\n@@ -115,14 +115,14 @@ enum VMStateFlags {\n VMS_MULTIPLY = 0x200,\n \n /* The field is an array of variable size. The uint8_t at opaque +\n- * VMStateField.num_offset (subject to VMS_MULTIPLY_ELEMENTS)\n+ * VMStateField.num_offset\n * contains the number of entries in the array. See the VMS_ARRAY\n * description regarding array handling in general. May not be\n * combined with VMS_ARRAY or any other VMS_VARRAY*. */\n VMS_VARRAY_UINT8 = 0x400,\n \n /* The field is an array of variable size. The uint32_t at opaque\n- * + VMStateField.num_offset (subject to VMS_MULTIPLY_ELEMENTS)\n+ * + VMStateField.num_offset\n * contains the number of entries in the array. See the VMS_ARRAY\n * description regarding array handling in general. May not be\n * combined with VMS_ARRAY or any other VMS_VARRAY*. */\n@@ -139,12 +139,6 @@ enum VMStateFlags {\n * cause the individual entries to be allocated. */\n VMS_ALLOC = 0x2000,\n \n- /* Multiply the number of entries given by the integer at opaque +\n- * VMStateField.num_offset (see VMS_VARRAY*) with VMStateField.num\n- * to determine the number of entries in the array. Only valid in\n- * combination with one of VMS_VARRAY*. */\n- VMS_MULTIPLY_ELEMENTS = 0x4000,\n-\n /* A structure field that is like VMS_STRUCT, but uses\n * VMStateField.struct_version_id to tell which version of the\n * structure we are referencing to use. */\n@@ -398,16 +392,6 @@ extern const VMStateInfo vmstate_info_qlist;\n .offset = vmstate_offset_2darray(_state, _field, _type, _n1, _n2), \\\n }\n \n-#define VMSTATE_VARRAY_MULTIPLY(_field, _state, _field_num, _multiply, _info, _type) { \\\n- .name = (stringify(_field)), \\\n- .num_offset = vmstate_offset_value(_state, _field_num, uint32_t),\\\n- .num = (_multiply), \\\n- .info = &(_info), \\\n- .size = sizeof(_type), \\\n- .flags = VMS_VARRAY_UINT32|VMS_MULTIPLY_ELEMENTS, \\\n- .offset = vmstate_offset_varray(_state, _field, _type), \\\n-}\n-\n #define VMSTATE_SUB_ARRAY(_field, _state, _start, _num, _version, _info, _type) { \\\n .name = (stringify(_field)), \\\n .version_id = (_version), \\\ndiff --git a/migration/vmstate.c b/migration/vmstate.c\nindex 4d28364f7ba..e960bc7a7c4 100644\n--- a/migration/vmstate.c\n+++ b/migration/vmstate.c\n@@ -97,10 +97,6 @@ static int vmstate_n_elems(void *opaque, const VMStateField *field)\n n_elems = *(uint8_t *)(opaque + field->num_offset);\n }\n \n- if (field->flags & VMS_MULTIPLY_ELEMENTS) {\n- n_elems *= field->num;\n- }\n-\n trace_vmstate_n_elems(field->name, n_elems);\n return n_elems;\n }\ndiff --git a/target/sparc/machine.c b/target/sparc/machine.c\nindex 0a449f2f8c6..5f402e098cf 100644\n--- a/target/sparc/machine.c\n+++ b/target/sparc/machine.c\n@@ -189,9 +189,9 @@ static int cpu_pre_save(void *opaque)\n * versions are different.\n */\n #ifndef TARGET_SPARC64\n-#define SPARC_VMSTATE_VER 7\n+#define SPARC_VMSTATE_VER 8\n #else\n-#define SPARC_VMSTATE_VER 9\n+#define SPARC_VMSTATE_VER 10\n #endif\n \n const VMStateDescription vmstate_sparc_cpu = {\n@@ -202,8 +202,7 @@ const VMStateDescription vmstate_sparc_cpu = {\n .fields = (const VMStateField[]) {\n VMSTATE_UINTTL_ARRAY(env.gregs, SPARCCPU, 8),\n VMSTATE_UINT32(env.nwindows, SPARCCPU),\n- VMSTATE_VARRAY_MULTIPLY(env.regbase, SPARCCPU, env.nwindows, 16,\n- vmstate_info_uinttl, target_ulong),\n+ VMSTATE_UINTTL_ARRAY(env.regbase, SPARCCPU, MAX_NWINDOWS * 16 + 8),\n VMSTATE_CPUDOUBLE_ARRAY(env.fpr, SPARCCPU, TARGET_DPREGS),\n VMSTATE_UINTTL(env.pc, SPARCCPU),\n VMSTATE_UINTTL(env.npc, SPARCCPU),\n", "prefixes": [ "PATCH-for-11.1", "09/10" ] }