Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2080607/?format=api
{ "id": 2080607, "url": "http://patchwork.ozlabs.org/api/patches/2080607/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20250503075858.277375-4-pbonzini@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": "<20250503075858.277375-4-pbonzini@redhat.com>", "list_archive_url": null, "date": "2025-05-03T07:58:48", "name": "[PULL,03/13] rust: assertions: Support index field wrapped in BqlCell", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "b08906d8f31cff2ca94063f999c4a654b4f6b6e4", "submitter": { "id": 2701, "url": "http://patchwork.ozlabs.org/api/people/2701/?format=api", "name": "Paolo Bonzini", "email": "pbonzini@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20250503075858.277375-4-pbonzini@redhat.com/mbox/", "series": [ { "id": 455199, "url": "http://patchwork.ozlabs.org/api/series/455199/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=455199", "date": "2025-05-03T07:58:51", "name": "[PULL,01/13] rust/vmstate: Add support for field_exists checks", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/455199/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2080607/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2080607/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=LT/Y4jTo;\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 4ZqKvD2ddhz1yXD\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 3 May 2025 17:59:34 +1000 (AEST)", "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 1uB7mJ-00084R-QO; Sat, 03 May 2025 03:59:19 -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 <pbonzini@redhat.com>)\n id 1uB7mH-000845-RH\n for qemu-devel@nongnu.org; Sat, 03 May 2025 03:59:17 -0400", "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1uB7mG-0006dC-0L\n for qemu-devel@nongnu.org; Sat, 03 May 2025 03:59:17 -0400", "from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-47-pm-jBnJ9OA-g-W0Eoi_rew-1; Sat, 03 May 2025 03:59:11 -0400", "by mail-wm1-f72.google.com with SMTP id\n 5b1f17b1804b1-43d01024089so17696365e9.1\n for <qemu-devel@nongnu.org>; Sat, 03 May 2025 00:59:11 -0700 (PDT)", "from [192.168.10.48] ([151.95.54.106])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-441b8a286cfsm66028495e9.29.2025.05.03.00.59.08\n for <qemu-devel@nongnu.org>\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 03 May 2025 00:59:08 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1746259153;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=LqeniZgXmPTdrTI+xq1XQTwnSc7B7nOzlTpRU2OjaDw=;\n b=LT/Y4jToNXaZMYzP5ammOewo/TP4ekawOUSUu0IeEgj+hfXPZpRwygWTT/dgxQvT66pzYl\n FWFJkKsdFcu1hXHZhty4KvyQ8ynVA3qADMutDkGu4uZfLD8mY4p2xpt2sGsmMTzg+HRAgQ\n WelPXaMd/qGDRpIFvsv62+ZTGKIx0/I=", "X-MC-Unique": "pm-jBnJ9OA-g-W0Eoi_rew-1", "X-Mimecast-MFC-AGG-ID": "pm-jBnJ9OA-g-W0Eoi_rew_1746259150", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1746259150; x=1746863950;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=LqeniZgXmPTdrTI+xq1XQTwnSc7B7nOzlTpRU2OjaDw=;\n b=XtFxk0ln3mK6FwFnnK4dv7IKIf5U3Txm398QRFqdG62EU2UUfyqdPrbMXbLGOmTOIO\n XstnTtvMBc1bqLEdjN15zMFdrO7zSjrSCp9nkttCAs24pL4mGzISadL3i5O/qjCKqn9A\n 8MkO4QtGzP2jnmV9hjx3ke+ZeQPzndzqYtoefxg91TgKopPY5CZoUnN4LPNbRJm4JNRc\n Mlar3qf+3CLHsnSE6r3jXfnsI8xoJ1UAkvY/ur73xum3bTsQhyFDZSXRBVDH25tfeH2W\n th2wLbd23rdG2/lX++HwlDCYR8wUprURL87CnYbrofbG34G0eYupvN9XgN5pyaPCHSab\n mcfQ==", "X-Gm-Message-State": "AOJu0YwXtu0ys4TCRb2qeKva0fDA2gJ4SgpTupcxWjZYG246sx0228Rw\n CqgLpeJ+ZTnxMObg+jjzeknjTi+DRyAXbWZzkZWTgNes53Wri241C9HL7J85biwpyez+2KqvbDX\n e4dMbPzusxmMF1K5jSrYn/ueK14nHfNxO0/fHOIrqPwOYgGKN+ZZFRBIN8xh3V01fRDb8TaVTWd\n lHrn91D7GNb17lBpMxnkoSfz8Wlq0nkY1aV6cO", "X-Gm-Gg": "ASbGncszjIjFvsGi2PErjV8wwUCGQEBaTsiKEfdKCRGdDcfMALhYYNeoiSmyfg95sNr\n f9VC/Or2AtDSq4DHUlhg69/PRQ4S/CLzgv5jMPumHUf9ZBMvDb/JaIrfsQKA5G8SwXpHUVttvOA\n Qm8rvnCnO12Rkj6CZhGPg+/ERPjClVnFiPR2ApT194zFbERRkgUMbgQGmsoF1fMbRKSwz05z7tp\n 1id8OkGNDjp3aB0isqqToQ/2QqH3Vl8kkJsJAZz1z+9nP7Fsv1t+7uxwd0UU4W2LWbHSUuxv+Oi\n UNygxYRG2NwJne4=", "X-Received": [ "by 2002:a05:600c:698e:b0:43d:1b74:e89a with SMTP id\n 5b1f17b1804b1-441c48bb3f1mr1956715e9.9.1746259149684;\n Sat, 03 May 2025 00:59:09 -0700 (PDT)", "by 2002:a05:600c:698e:b0:43d:1b74:e89a with SMTP id\n 5b1f17b1804b1-441c48bb3f1mr1956515e9.9.1746259149254;\n Sat, 03 May 2025 00:59:09 -0700 (PDT)" ], "X-Google-Smtp-Source": "\n AGHT+IGEB4g0SB8xuvvrDXehhO/Y9iC/uw0m7XxVPI8hzB8Vk3xOdm9PpL6xyXzverJiPb33P+NT0Q==", "From": "Paolo Bonzini <pbonzini@redhat.com>", "To": "qemu-devel@nongnu.org", "Subject": "[PULL 03/13] rust: assertions: Support index field wrapped in BqlCell", "Date": "Sat, 3 May 2025 09:58:48 +0200", "Message-ID": "<20250503075858.277375-4-pbonzini@redhat.com>", "X-Mailer": "git-send-email 2.49.0", "In-Reply-To": "<20250503075858.277375-1-pbonzini@redhat.com>", "References": "<20250503075858.277375-1-pbonzini@redhat.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=170.10.129.124;\n envelope-from=pbonzini@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com", "X-Spam_score_int": "-26", "X-Spam_score": "-2.7", "X-Spam_bar": "--", "X-Spam_report": "(-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.644,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_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": "<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": "Currently, if the `num` field of a varray is not a numeric type, such as\nbeing placed in a wrapper, the array variant of assert_field_type will\nfail the check.\n\nHPET currently wraps num_timers in BqlCell<>. Although BqlCell<> is not\nnecessary from strictly speaking, it makes sense for vmstate to respect\nBqlCell.\n\nThe failure of assert_field_type is because it cannot convert BqlCell<T>\ninto usize for use as the index. Use a constant 0 instead for the index,\nby avoiding $(...)? and extracting the common parts of\nassert_field_type! into an internal case.\n\nCommit message based on a patch by Zhao Liu <zhao1.liu@intel.com>.\n\nLink: https://lore.kernel.org/r/20250414144943.1112885-3-zhao1.liu@intel.com\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n---\n rust/qemu-api/src/assertions.rs | 25 +++++++++----------------\n 1 file changed, 9 insertions(+), 16 deletions(-)", "diff": "diff --git a/rust/qemu-api/src/assertions.rs b/rust/qemu-api/src/assertions.rs\nindex eb12e9499a7..a2d38c877df 100644\n--- a/rust/qemu-api/src/assertions.rs\n+++ b/rust/qemu-api/src/assertions.rs\n@@ -78,33 +78,26 @@ fn types_must_be_equal<T, U>(_: T)\n /// ```\n #[macro_export]\n macro_rules! assert_field_type {\n- ($t:ty, $i:tt, $ti:ty) => {\n+ (@internal $param_name:ident, $ti:ty, $t:ty, $($field:tt)*) => {\n const _: () = {\n #[allow(unused)]\n- fn assert_field_type(v: $t) {\n- fn types_must_be_equal<T, U>(_: T)\n+ fn assert_field_type($param_name: &$t) {\n+ fn types_must_be_equal<T, U>(_: &T)\n where\n T: $crate::assertions::EqType<Itself = U>,\n {\n }\n- types_must_be_equal::<_, $ti>(v.$i);\n+ types_must_be_equal::<_, $ti>(&$($field)*);\n }\n };\n };\n \n+ ($t:ty, $i:tt, $ti:ty) => {\n+ $crate::assert_field_type!(@internal v, $ti, $t, v.$i);\n+ };\n+\n ($t:ty, $i:tt, $ti:ty, num = $num:ident) => {\n- const _: () = {\n- #[allow(unused)]\n- fn assert_field_type(v: $t) {\n- fn types_must_be_equal<T, U>(_: T)\n- where\n- T: $crate::assertions::EqType<Itself = U>,\n- {\n- }\n- let index: usize = v.$num.try_into().unwrap();\n- types_must_be_equal::<_, &$ti>(&v.$i[index]);\n- }\n- };\n+ $crate::assert_field_type!(@internal v, $ti, $t, v.$i[0]);\n };\n }\n \n", "prefixes": [ "PULL", "03/13" ] }