Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218744/?format=api
{ "id": 2218744, "url": "http://patchwork.ozlabs.org/api/patches/2218744/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260401202844.673494-3-peterx@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260401202844.673494-3-peterx@redhat.com>", "list_archive_url": null, "date": "2026-04-01T20:28:35", "name": "[02/11] vmstate: Pass in struct itself for VMSTATE_VARRAY_OF_POINTER_UINT32", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "95119052536cbe8038b1b7ba8be2eb200aff1cf9", "submitter": { "id": 67717, "url": "http://patchwork.ozlabs.org/api/people/67717/?format=api", "name": "Peter Xu", "email": "peterx@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260401202844.673494-3-peterx@redhat.com/mbox/", "series": [ { "id": 498385, "url": "http://patchwork.ozlabs.org/api/series/498385/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498385", "date": "2026-04-01T20:28:34", "name": "vmstate: Implement VMS_ARRAY_OF_POINTER_AUTO_ALLOC", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498385/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218744/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218744/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=GUC+Cy/9;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=BfR5clHO;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmGnP0MtSz1yGY\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 07:30:00 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w82BR-0004Kn-RO; Wed, 01 Apr 2026 16:29:01 -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 <peterx@redhat.com>) id 1w82BM-0004Ik-Tm\n for qemu-devel@nongnu.org; Wed, 01 Apr 2026 16:28:58 -0400", "from us-smtp-delivery-124.mimecast.com ([170.10.133.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <peterx@redhat.com>) id 1w82BJ-00037r-J9\n for qemu-devel@nongnu.org; Wed, 01 Apr 2026 16:28:56 -0400", "from mail-qk1-f198.google.com (mail-qk1-f198.google.com\n [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-126-hNl_X9wDPvyqrP42-nHMbA-1; Wed, 01 Apr 2026 16:28:51 -0400", "by mail-qk1-f198.google.com with SMTP id\n af79cd13be357-8cd767c51efso23209185a.2\n for <qemu-devel@nongnu.org>; Wed, 01 Apr 2026 13:28:51 -0700 (PDT)", "from x1.com ([142.189.10.167]) by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8d2a548a4efsm68194085a.8.2026.04.01.13.28.47\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 01 Apr 2026 13:28:47 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775075332;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=eRbvL+0t6sjZnldiXjIF1mD8feBd0aVCt4GXp2N7Shk=;\n b=GUC+Cy/9EtJrG9EmWG3s6PPHRpajmtgeiJmT7abHsiMmK/r4IxF0vrRwD4b7yE7eaggS1T\n nYMVcA3idKihxA1I9dngQaYuBlrAhb2+R5VUfouHotlgBChAESK8UWpuPGDVa5ZAzYZuYJ\n YCQLsEgHo/jlAeNmMS5ulPz6NofrXBc=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1775075330; x=1775680130; 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=eRbvL+0t6sjZnldiXjIF1mD8feBd0aVCt4GXp2N7Shk=;\n b=BfR5clHOxv3cdlaifnv3Iv2o0L3iOb8jtBBa3tg/bQ+Mj16YdJylASIwF2qdAYIdWp\n s1eIGKfwqmAHHHD/Evo67No+GIOFBxs8Xh/4l9z9Q4Gl85dIByq/kuPYUfx8F8qKcxmh\n mmonToF63PYYBMG+C2PlbtVdd3VaN6lShX7+qP7ESx7CUczu7yVvvAU3Bs7X6X+5AcpB\n BrVsb9OO2oYAAVfEGF68kFYQ+0hK/otgexDctVSRZcDu8IJCZ6KF9s1E3+3wRCYompyJ\n 0fdEYJhEN+Ry2kBoXGHLP6WM7hcZbRhdCqFJWotxvGdQIFtlI0DUSqU2CVXciDaaL4wa\n O6QA==" ], "X-MC-Unique": "hNl_X9wDPvyqrP42-nHMbA-1", "X-Mimecast-MFC-AGG-ID": "hNl_X9wDPvyqrP42-nHMbA_1775075331", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775075330; x=1775680130;\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=eRbvL+0t6sjZnldiXjIF1mD8feBd0aVCt4GXp2N7Shk=;\n b=CmtRwxx5ESEoJdR/Rg93K96fOKQ7d0lr0XEb2ArBwX6tNFL8eFA8BeTanMBKIUA7iF\n +32uuMRGRNpVST0uyeBG5YkYX55dF+WUUERagimHmNfn+ztAwx6su6FZWCjfF+bBiUS6\n Bu1aWuoHp3RWKLenuTSyimdeI6CBVv1xCSyTNyqnAu0Fb0eegsbQgPLRYHRzwsvxDwSN\n 4BeLf+wqIRd4XO2+6Rv1rnUj9Oi2p5IANZQg+J/CMJfHVCiu4cnCQleug42fWZsSs9wh\n 1RJifyoTvbFbwUZipctYfZ58511IhfhQBsGlTfe82JIHJ+EpippkiPepy64JEInhIO+/\n 5yCQ==", "X-Gm-Message-State": "AOJu0YyYLL/JWMU4rk28G8c8sDTtC8AI4vnbIu8I/N5k357b0ozqhmAu\n IY/N2zz/nd8rZ8zRlzwbcWWlQTHsIHYNCekwyAiXSCk7YQPy/ZdNGX/MqLmUPxARIzwHhL+lrhX\n 5Q83VMIrYEXmk1WNTFIdqgaeuoF2nO2RYZ7+fCDgkkugISti/NYyvovun3NiXkQuhZ+Kyjga5zF\n e7zo5hXgs1DkiO2itrJhUOVmIkVJ4aCaWHYKJzUA==", "X-Gm-Gg": "ATEYQzz+OtqNc0JlKiPeAl5oDi9czOmJZtNZYn5tfgAExz8yss5clQlf6vlUXWrZRg4\n TBHOMqpb/yGJGkSxOmd66wA6eLWfrNa6aKZ19npqr7QWAI16InLM03LgSOJchnT2RWOH2Yz99/E\n IOX8mCfBOJQ9uBWGlyUoxZP/2BLZDyNyIOoeTHJSaDXeZ5duG8bzZLMzSxTIHetgp2iZkQLwESY\n oNvfyALzwBPSLIWdgUvdx5z4cnw0l12PjBQItfKBNExpCr4M46KLCRtmeL26wOw1Qi8XjyOKM2h\n e2o3bv+Qun5oSha9rrCGXQjc1Y/2xHwnQxRiSfuR9QY7FRNPLrB3Z0ppBqSU4K9WYCivIqCmsEc\n tevoRkUpMC6aPxsNgZ+ixPEdoS+7vnTdUZkNK57e2A4c=", "X-Received": [ "by 2002:a05:620a:711a:b0:8cf:d2a0:d8b6 with SMTP id\n af79cd13be357-8d1b5a9fe41mr744037985a.10.1775075330282;\n Wed, 01 Apr 2026 13:28:50 -0700 (PDT)", "by 2002:a05:620a:711a:b0:8cf:d2a0:d8b6 with SMTP id\n af79cd13be357-8d1b5a9fe41mr744030285a.10.1775075329556;\n Wed, 01 Apr 2026 13:28:49 -0700 (PDT)" ], "From": "Peter Xu <peterx@redhat.com>", "To": "qemu-devel@nongnu.org", "Cc": "Juraj Marcin <jmarcin@redhat.com>,\n Alexander Mikhalitsyn <alexander@mihalicyn.com>,\n Fabiano Rosas <farosas@suse.de>, Peter Xu <peterx@redhat.com>,\n Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>, =?utf-8?q?Phi?=\n\t=?utf-8?q?lippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>", "Subject": "[PATCH 02/11] vmstate: Pass in struct itself for\n VMSTATE_VARRAY_OF_POINTER_UINT32", "Date": "Wed, 1 Apr 2026 16:28:35 -0400", "Message-ID": "<20260401202844.673494-3-peterx@redhat.com>", "X-Mailer": "git-send-email 2.50.1", "In-Reply-To": "<20260401202844.673494-1-peterx@redhat.com>", "References": "<20260401202844.673494-1-peterx@redhat.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com", "X-Spam_score_int": "-6", "X-Spam_score": "-0.7", "X-Spam_bar": "/", "X-Spam_report": "(-0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.01,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1,\n SPF_HELO_PASS=-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": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "Passing in a pointer almost never helps. Convert it to pass in struct for\nfurther refactoring on VMS_ARRAY_OF_POINTER.\n\nReviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>\nReviewed-by: Fabiano Rosas <farosas@suse.de>\nReviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nSigned-off-by: Peter Xu <peterx@redhat.com>\n---\n include/hw/intc/riscv_aclint.h | 6 +++---\n include/migration/vmstate.h | 4 ++--\n 2 files changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/include/hw/intc/riscv_aclint.h b/include/hw/intc/riscv_aclint.h\nindex 5310615cbf..0e0b98acb0 100644\n--- a/include/hw/intc/riscv_aclint.h\n+++ b/include/hw/intc/riscv_aclint.h\n@@ -80,8 +80,8 @@ enum {\n RISCV_ACLINT_SWI_SIZE = 0x4000\n };\n \n-#define VMSTATE_TIMER_PTR_VARRAY(_f, _s, _f_n) \\\n-VMSTATE_VARRAY_OF_POINTER_UINT32(_f, _s, _f_n, 0, vmstate_info_timer, \\\n- QEMUTimer *)\n+#define VMSTATE_TIMER_PTR_VARRAY(_f, _s, _f_n) \\\n+ VMSTATE_VARRAY_OF_POINTER_UINT32(_f, _s, _f_n, 0, vmstate_info_timer, \\\n+ QEMUTimer)\n \n #endif\ndiff --git a/include/migration/vmstate.h b/include/migration/vmstate.h\nindex d4880e75c2..32bb8e8ebc 100644\n--- a/include/migration/vmstate.h\n+++ b/include/migration/vmstate.h\n@@ -567,9 +567,9 @@ extern const VMStateInfo vmstate_info_qlist;\n .version_id = (_version), \\\n .num_offset = vmstate_offset_value(_state, _field_num, uint32_t), \\\n .info = &(_info), \\\n- .size = sizeof(_type), \\\n+ .size = sizeof(_type *), \\\n .flags = VMS_VARRAY_UINT32 | VMS_ARRAY_OF_POINTER | VMS_POINTER, \\\n- .offset = vmstate_offset_pointer(_state, _field, _type), \\\n+ .offset = vmstate_offset_pointer(_state, _field, _type *), \\\n }\n \n #define VMSTATE_STRUCT_SUB_ARRAY(_field, _state, _start, _num, _version, _vmsd, _type) { \\\n", "prefixes": [ "02/11" ] }