[{"id":3669286,"web_url":"http://patchwork.ozlabs.org/comment/3669286/","msgid":"<acQ3fae3pdLagfwV@x1.local>","list_archive_url":null,"date":"2026-03-25T19:29:01","subject":"Re: [RFC PATCH v1 13/17] vmstate: Drop\n VMS_ARRAY_OF_POINTER_AUTO_ALLOC","submitter":{"id":67717,"url":"http://patchwork.ozlabs.org/api/people/67717/","name":"Peter Xu","email":"peterx@redhat.com"},"content":"On Tue, Mar 24, 2026 at 04:43:28PM -0300, Fabiano Rosas wrote:\n> The semantics of the VMS_ARRAY_OF_POINTER_AUTO_ALLOC of allocating\n> memory dynamically for an array of pointers could be thought to be the\n> same as the currently non-existent combination of VMS_ARRAY_OF_POINTER\n> | VMS_ALLOC. The code is now able to handle such invalid combination,\n> so drop the new flag and enable the VMS_ARRAY_OF_POINTER | VMS_ALLOC\n> combo.\n\nI was intentionally leaving VMS_ALLOC only for the top layer vmsd field,\nbut then.. I think you're right, there's no way the driver code can offload\nthe allocation of top layer vmsd field, while without offloading together\nthe pointer allocations inside the array altogether when it's\nVMS_ARRAY_OF_POINTERS.\n\nLet me see how I can incorporate this change, unless extremely awkward to\nrearrange, otherwise I'll make it not introduce this flag when repost.","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=CjHPMW71;\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=sv3FgqjN;\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 4fgxmq08zxz1yG1\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 06:29:31 +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 1w5Tuh-0005cA-42; Wed, 25 Mar 2026 15:29:11 -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 1w5Tuf-0005c0-RX\n for qemu-devel@nongnu.org; Wed, 25 Mar 2026 15:29:09 -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 <peterx@redhat.com>) id 1w5Tud-0007Si-M8\n for qemu-devel@nongnu.org; Wed, 25 Mar 2026 15:29:09 -0400","from mail-qt1-f200.google.com (mail-qt1-f200.google.com\n [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-663-sICz0jR0NRysifkkcyMR3A-1; Wed, 25 Mar 2026 15:29:04 -0400","by mail-qt1-f200.google.com with SMTP id\n d75a77b69052e-50b52a2d70cso8534221cf.3\n for <qemu-devel@nongnu.org>; Wed, 25 Mar 2026 12:29:03 -0700 (PDT)","from x1.local ([142.189.10.167]) by smtp.gmail.com with ESMTPSA id\n d75a77b69052e-50b9214a72asm6277311cf.8.2026.03.25.12.29.01\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 25 Mar 2026 12:29:02 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1774466945;\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 in-reply-to:in-reply-to:references:references;\n bh=YIIjpGIYHMcim7ckn3rjNpqIdyIStyEpF768RxPkmuc=;\n b=CjHPMW71aQnmEFBcSXTmt2uQ+7Oo0EJmtiApmWEhuCK6UcG4vmbXciM51WSezOkrhHBQ3h\n VTSRnWKTOr1ZU+r5BqshsHXKrW1ga7XkoucujIk9cQdQDsjCHcAw87COrw/aetgtekUzfd\n WD9RPJsU92XdjoWjjyFrhPGXP0jMaQ0=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1774466943; x=1775071743; darn=nongnu.org;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;\n bh=YIIjpGIYHMcim7ckn3rjNpqIdyIStyEpF768RxPkmuc=;\n b=sv3FgqjNy1/dxkvErnj9wdws5vGnnOKdzAeXQw5dDaUDYBHxyt0gnGWIPf8MRkgrs7\n ab8qRsClW6CmNinBMjhHE9t+8ZbV3kH/rt6x54yjOcOI6AB8cS5t4pc/Uv12APTUGkoE\n 36ItSn28TT3LmDO64AL1DfgRaY3sva+5Am+LViOVDJAiNG+wwa2lxLN+Spgf0jTaj5/Q\n vsltRXzxmV8iYCSkEy4LAmKTp407hvkPYCJ9sXbSnqORHR8XaVKtUdFyNCXEeikJZ5GP\n H0hhUSiGihaNXR8YnF1zG0zuNKNaNy1xGDzyoBF90b5HbojFttqxGK+SZ4n1/slkElNY\n TgXw=="],"X-MC-Unique":"sICz0jR0NRysifkkcyMR3A-1","X-Mimecast-MFC-AGG-ID":"sICz0jR0NRysifkkcyMR3A_1774466943","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774466943; x=1775071743;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=YIIjpGIYHMcim7ckn3rjNpqIdyIStyEpF768RxPkmuc=;\n b=ZKFc5YrmxK+TVIMYMF0gBVur0EjoGt4YpddUmriT/wV5V63PzQNIYZfhJ/8Xg0T9sn\n l7We3DdPlfMuR4Zi6nHp1WxXkaZXrQQoxrmMqpHbFfRhmxL3q6ziB/IyvBotmXzI4frF\n +142xi2nzQtqb74D8y2thCdW6u8CqFsdOjxrl3hlYVv3huyzi7h/eRp4UwpvaxKCBtrX\n +RxiTdshebwKosoYJJXH96tDdsQKzxu+NlJtu/U04kRyJBq+VGdubbP6Pkc4SMJ8Pzod\n yFE1/u+N8DeaqEoZo5WQ9c87Yp+OIVNLkFvuiy5Q3ZlSTqaTzSfN8lJTPoYiBtL0s+az\n stJQ==","X-Gm-Message-State":"AOJu0YxvzfNAStpw0tIvHmfRQb5Vc++NbW/xXmoe0s3vyVqsKY1912OY\n cLjf94eoApTRR5R54CcILaBLKNj6KTfbPm6bHjht7PARiUzhZ8goay7YxSl9ajCqua3OsGTaF8X\n cPHBX3BLT5XqAHfoAxy+73aCkfxjcEMNttkWC7qMwy6JOG4vO93zxdraP","X-Gm-Gg":"ATEYQzxUxAOicjVZ0MNxvqCQw03b7raZF/ZehT5NZc5LbfbwdugFo/BZ87HUfSxweDe\n Tk8xqqGum4z05c9EEu7+lXTVBseKl4vA7ibRfi2jLQA/G6JxnAPELfQG8QPUQVTGUlowz3UCkzy\n iY/vafhpWhnCUhLLyPsb2sipURK/x1Smry6Ealmz0R4W61LG9+JIwoMHGqwc6BTix3tv42dbPDm\n nUfaPYmz+FVA5HTRCQ4gpG+KktGQbwGwcEi8Q3VlCh2ip1wc/s1iEUpByLrIYufd4Y9nfHJRwhO\n EyUaXbTk6Ulb5MuEzQj828bOQhKovDlFa5Sfvzk3TLshrSsPDUcb3PJVniSUTb9LYaCk0EmSTGZ\n HCdy5JNGBG6KxeQ==","X-Received":["by 2002:a05:622a:5c17:b0:50b:5024:9091 with SMTP id\n d75a77b69052e-50b80eb20d8mr69019351cf.68.1774466943228;\n Wed, 25 Mar 2026 12:29:03 -0700 (PDT)","by 2002:a05:622a:5c17:b0:50b:5024:9091 with SMTP id\n d75a77b69052e-50b80eb20d8mr69018891cf.68.1774466942600;\n Wed, 25 Mar 2026 12:29:02 -0700 (PDT)"],"Date":"Wed, 25 Mar 2026 15:29:01 -0400","From":"Peter Xu <peterx@redhat.com>","To":"Fabiano Rosas <farosas@suse.de>","Cc":"qemu-devel@nongnu.org, Alexander Mikhalitsyn <alexander@mihalicyn.com>,\n Juraj Marcin <jmarcin@redhat.com>","Subject":"Re: [RFC PATCH v1 13/17] vmstate: Drop\n VMS_ARRAY_OF_POINTER_AUTO_ALLOC","Message-ID":"<acQ3fae3pdLagfwV@x1.local>","References":"<20260324194333.30004-1-farosas@suse.de>\n <20260324194333.30004-14-farosas@suse.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260324194333.30004-14-farosas@suse.de>","Received-SPF":"pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com;\n helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001,\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_H3=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_PASS=-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 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"}},{"id":3669360,"web_url":"http://patchwork.ozlabs.org/comment/3669360/","msgid":"<acRYZoq3ydLFKs_q@x1.local>","list_archive_url":null,"date":"2026-03-25T21:49:26","subject":"Re: [RFC PATCH v1 13/17] vmstate: Drop\n VMS_ARRAY_OF_POINTER_AUTO_ALLOC","submitter":{"id":67717,"url":"http://patchwork.ozlabs.org/api/people/67717/","name":"Peter Xu","email":"peterx@redhat.com"},"content":"On Wed, Mar 25, 2026 at 03:29:01PM -0400, Peter Xu wrote:\n> On Tue, Mar 24, 2026 at 04:43:28PM -0300, Fabiano Rosas wrote:\n> > The semantics of the VMS_ARRAY_OF_POINTER_AUTO_ALLOC of allocating\n> > memory dynamically for an array of pointers could be thought to be the\n> > same as the currently non-existent combination of VMS_ARRAY_OF_POINTER\n> > | VMS_ALLOC. The code is now able to handle such invalid combination,\n> > so drop the new flag and enable the VMS_ARRAY_OF_POINTER | VMS_ALLOC\n> > combo.\n> \n> I was intentionally leaving VMS_ALLOC only for the top layer vmsd field,\n> but then.. I think you're right, there's no way the driver code can offload\n> the allocation of top layer vmsd field, while without offloading together\n> the pointer allocations inside the array altogether when it's\n> VMS_ARRAY_OF_POINTERS.\n> \n> Let me see how I can incorporate this change, unless extremely awkward to\n> rearrange, otherwise I'll make it not introduce this flag when repost.\n\nHmm, I forgot one thing, which is when the array doesn't need allocation\nbut the field does.  In that case VMS_ALLOC mustn't be set, but we still\nneed another flag to say \"we need allocation for the elements in the array\".\n\nSo maybe we still need a flag.","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=ISvRo+8U;\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=IMQQa5xe;\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 4fh0vG5NVcz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 08:50:18 +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 1w5W6Z-00083T-90; Wed, 25 Mar 2026 17:49:35 -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 1w5W6X-00082R-E0\n for qemu-devel@nongnu.org; Wed, 25 Mar 2026 17:49:33 -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 <peterx@redhat.com>) id 1w5W6W-0002I8-2D\n for qemu-devel@nongnu.org; Wed, 25 Mar 2026 17:49:33 -0400","from mail-qk1-f197.google.com (mail-qk1-f197.google.com\n [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-625-F2Z3rSkPOxCrAJVY9DL9yw-1; Wed, 25 Mar 2026 17:49:29 -0400","by mail-qk1-f197.google.com with SMTP id\n af79cd13be357-8cfcebeb1f3so160082685a.0\n for <qemu-devel@nongnu.org>; Wed, 25 Mar 2026 14:49:29 -0700 (PDT)","from x1.local ([142.189.10.167]) by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8d00e39f1d6sm82279085a.10.2026.03.25.14.49.27\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 25 Mar 2026 14:49:27 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1774475371;\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 in-reply-to:in-reply-to:references:references;\n bh=yPymySHSDc57pYf4VlH0Mh284WvwJPgHlUYtYnHwF5Q=;\n b=ISvRo+8U17lXHmWJzdlD1hf/M5NReC8tn8RDUI4hficwPYjtfQVkdLeq22G/k8Qcz84Xsp\n 39ZTQWFuMgGlFHsVaw7+icNnNXFftul5Y603WFQ+hHkC064dByFo5aAuBLSdxY881QsjKJ\n jzjIg2Pbbs/AeOVk/UZNib9l0nyxMe4=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1774475369; x=1775080169; darn=nongnu.org;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;\n bh=yPymySHSDc57pYf4VlH0Mh284WvwJPgHlUYtYnHwF5Q=;\n b=IMQQa5xeuaeUWWJo+zLqGF0G+4sUVHalgqUtEuBb2VnLrVmPsqSOZ6KOrdbkHzZaUL\n HsGCHLGPvL5DiAkjPiXwBdC9JkLdSFu0/XV2DpJcFSP6MF5XAyFM3j2mPv9llrn6CKte\n Bv2qGSLogT3I0T5pxvIr9UzHHc8DqQqU4zvNbo1o+IvGF7/vjiqzpBkRb1Qbnknw+ukM\n URYlIKLiwt6J5ByAAT0jxBUJYIbjoTIlQ9xqbaLzTjwahSBcIUySbVrB5ImDThSM3K7b\n avH/ou9KujSblJfvlCipkiBjkl7Q4+PFQaAKC46/D28+nN/tgy1DxrsrvGyPypA14DH5\n VrKw=="],"X-MC-Unique":"F2Z3rSkPOxCrAJVY9DL9yw-1","X-Mimecast-MFC-AGG-ID":"F2Z3rSkPOxCrAJVY9DL9yw_1774475369","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774475369; x=1775080169;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=yPymySHSDc57pYf4VlH0Mh284WvwJPgHlUYtYnHwF5Q=;\n b=qKrCVlpTf4uDomuB/q2MZYPSngATRspjl4JrxZrMOKKx4c9MImSq2hLyWCsFmyL3T7\n w/C4IZD9uoYva4oukZlJfE8Q8UFmplFsgSG4OXCjUgcv62i0N8nO4HMoXiD6csze5HYM\n G/Q4ml3AxxGTzMb20Y6h5plm88MhO5A0gMnL7PWPwajWrKRw1MJRzssbZkz9ZzM7Stv1\n HOxaDCls+gn1daYhdSJicSzBrbPt6DKy3M+YCgbbGO4J4S4OotrUfI0yiVaARiyTZRC/\n DQ/xnAWshZUJKYXmy0Org7CPIc8nY7dfi/S/WCVz+55/YRlpUl9eCWrsTapbfAyDEcFn\n ndXA==","X-Gm-Message-State":"AOJu0Ywz74PKyaHXp8xv79DPzYLLz3q9n+QjtrWHPY7ScoBY5jW5Nha3\n a9QlOc27gQIlGgrnKmhKlWd9F+b0bikLW9KdEddI/iU14Y+piLwaBayC7vsj5+jWRfIixgH0ZFk\n d3ptDHFF7YGEVNbHu+cx3zQv7aiyH+Sf1euNF7+zHu2p6mgwYQ65NGcQJ","X-Gm-Gg":"ATEYQzw2Krd06xJLELbpAxd6iGjyCxm8wYJS2r4i451Zkjgtm04aEL9BPwvp47lmGyx\n w64iPISSz063H684t2V8E3CJtVuKZZ8/AtrPF3wjkvc+ffB1cLO+QFgCyjgWV9sywBIRVEPcoJ0\n eTNY1TLwaZZ/M55leduZ8AX81CZaI/X4Nl/SzaE1ErlqNwQjXZWAId8mxM/xeO0PjEGeJmbU6iJ\n 5UzFr2XN2l6ghbFRi51W0I3e1+F9dQce7jTCA3ZF/8MkiRwx3h4AVdK2eDwhfm0kYnT47a3RRki\n IgOgBIQmfiCDRESpjysRI8WnwcO+yBZ7EGHkI+kJLbbW8ml/DJeURpkywhHke97zTRYYq51M6w7\n dm53K5yhcsnMHYA==","X-Received":["by 2002:a05:620a:4009:b0:8c3:7f27:a65d with SMTP id\n af79cd13be357-8d000f7e172mr809847285a.28.1774475369028;\n Wed, 25 Mar 2026 14:49:29 -0700 (PDT)","by 2002:a05:620a:4009:b0:8c3:7f27:a65d with SMTP id\n af79cd13be357-8d000f7e172mr809841585a.28.1774475368354;\n Wed, 25 Mar 2026 14:49:28 -0700 (PDT)"],"Date":"Wed, 25 Mar 2026 17:49:26 -0400","From":"Peter Xu <peterx@redhat.com>","To":"Fabiano Rosas <farosas@suse.de>","Cc":"qemu-devel@nongnu.org, Alexander Mikhalitsyn <alexander@mihalicyn.com>,\n Juraj Marcin <jmarcin@redhat.com>","Subject":"Re: [RFC PATCH v1 13/17] vmstate: Drop\n VMS_ARRAY_OF_POINTER_AUTO_ALLOC","Message-ID":"<acRYZoq3ydLFKs_q@x1.local>","References":"<20260324194333.30004-1-farosas@suse.de>\n <20260324194333.30004-14-farosas@suse.de>\n <acQ3fae3pdLagfwV@x1.local>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<acQ3fae3pdLagfwV@x1.local>","Received-SPF":"pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com;\n helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001,\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_H3=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_PASS=-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 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"}},{"id":3669363,"web_url":"http://patchwork.ozlabs.org/comment/3669363/","msgid":"<acRaZpYQy4y87lkM@x1.local>","list_archive_url":null,"date":"2026-03-25T21:57:58","subject":"Re: [RFC PATCH v1 13/17] vmstate: Drop\n VMS_ARRAY_OF_POINTER_AUTO_ALLOC","submitter":{"id":67717,"url":"http://patchwork.ozlabs.org/api/people/67717/","name":"Peter Xu","email":"peterx@redhat.com"},"content":"On Tue, Mar 24, 2026 at 04:43:28PM -0300, Fabiano Rosas wrote:\n> Note: I don't quite understand why we cannot allocate the first\n> element of the array with VMS_ARRAY_OF_POINTER_AUTO_ALLOC, so I\n> avoided that case when using the other flags as well.\n\nI just notice what this question is about after reading slightly more of\nthe code: note that we should allocate all elements if AUTO_ALLOC is\nspecified, what is introduced in patch 11 (vmstate_first) is essentially\nprocessing the array itself, so if VMS_ALLOC is set we alloc the array, if\nfurther _AUTO_ALLOC is specified we alloc all elements in the array.","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=OuS3Y8t6;\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=llzbk7X5;\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 4fh14l6L7Dz1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 08:58:31 +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 1w5WEq-0003U9-8F; Wed, 25 Mar 2026 17:58:08 -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 1w5WEo-0003T0-KD\n for qemu-devel@nongnu.org; Wed, 25 Mar 2026 17:58:06 -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 <peterx@redhat.com>) id 1w5WEn-0007KS-0Z\n for qemu-devel@nongnu.org; Wed, 25 Mar 2026 17:58:06 -0400","from mail-qt1-f197.google.com (mail-qt1-f197.google.com\n [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-517-fSXzVdYDM-myJqqEuSAjpQ-1; Wed, 25 Mar 2026 17:58:01 -0400","by mail-qt1-f197.google.com with SMTP id\n d75a77b69052e-50925fed647so11136061cf.3\n for <qemu-devel@nongnu.org>; Wed, 25 Mar 2026 14:58:01 -0700 (PDT)","from x1.local ([142.189.10.167]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-89cd5855280sm7818406d6.1.2026.03.25.14.57.59\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 25 Mar 2026 14:57:59 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1774475882;\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 in-reply-to:in-reply-to:references:references;\n bh=IOSsXQwXgCyohSWF4ickTCb+bYsKHCvLaHWhl5yfdy4=;\n b=OuS3Y8t6/kgGMMcR7fOk1a6M4yb3etf+7SjDVXQZJ+u/ABzmxAxTCSHukJTgkL0srIUfVm\n QEzMk5aDtQVV1FwUeqm0IoVxS3qP6hbVbT3LVDoc0et748nF4sc3KFjGUVaJqCc9ECxkcz\n c8L4xusC62oSICL2iJHlwkS9YUcKlHs=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1774475880; x=1775080680; darn=nongnu.org;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;\n bh=IOSsXQwXgCyohSWF4ickTCb+bYsKHCvLaHWhl5yfdy4=;\n b=llzbk7X56m+Ojbt7U10VoWcRJE0RPrvTTJIVKHA9+mT4TxBPzeu/UNond0DRWM/h54\n HHWgPtrAK3vTUXwk1G1EKuTwmOz6vvlQOV3L3PDewZuT302e4LAfjc1Nb3W87Md4M56X\n 3ib2uqE3SOvOZp7+G9nlnPpiZIcGHOroAL+7Yvaw/DsHXyRdOyZyJ7hptQbZBdYvHr0D\n 2BbATRSJjdxUxffOuJWqZv6UhJYmDKzVfAW6ymPl98Lxdfow+xEf5DPkAK0ex+496BnH\n 6jGXdzYciAYNxxcOXz5sg5W/VhWKREyCBf1gHqZ135S9GcyvVRtmGblcHKeLdOMYgLs4\n il2A=="],"X-MC-Unique":"fSXzVdYDM-myJqqEuSAjpQ-1","X-Mimecast-MFC-AGG-ID":"fSXzVdYDM-myJqqEuSAjpQ_1774475881","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774475880; x=1775080680;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=IOSsXQwXgCyohSWF4ickTCb+bYsKHCvLaHWhl5yfdy4=;\n b=TUypWlpRiX+JbGWVE926xGvNr25VF1aVlaZIEgBWVXD87fy/YfmkLtvaXJP2RP3Bvh\n /CMgpLKfNhGkmEO/XuHbE5YZF/8ION5rbhUip1nrMNkWVMpS6orr3K6a1gDC9FtAwb1i\n uivpXhuIZeg1X9daujhQdYGPbcQIVIt7Gb/FUwU8xm572A2DjMpFno0JVLYir+dD23in\n 3KJhaft/Y2KyRkx9jhTtUz7UCnAxJn3neGi6wsStfAhbO4yVfE+GGLlGIK7zoWS5TfW5\n aFdRmil7bkmM295oDnq0MesuIFn/t6IYTcyv8fLlt0KCttq8QXCD8LtxZb7CqMHK/QSr\n 5rFg==","X-Gm-Message-State":"AOJu0YxV5yIX3S23UFhVBXYJntb8dR0CZ3eEAwERFgC/z+VC6kEDjKyC\n Mcny70kCC40YklkRG/zWB0cR+aN28zmzj8GRsElJw7LSiRRjcBknj7KiRrqy5mOw3Kl6kFTM1/v\n QivMXfhn7EPOjP/GQBMkSrj2R+GYOl44JDYpbh0Zvz2zriVS5jvsqfEC6","X-Gm-Gg":"ATEYQzwSTL1vGb8Ld/m2nwJrBWKlWkF6u/0V7FN5fnOZQLDus0JvgmZJpxfr1sPUMJR\n BoRhOJGOHJHGXmroOv6ShlX3Xy1jwu0gx82tkjzSQXNNzEk4IvL0BFz5je/dn5LTFw3WJpCjxgN\n WKXTTPthkjbTfpYFSD/hoZP8z8M1ZTQVN6FOOryyLSJ07CZyey7L2/10XprocjrEnc1H9epQhEF\n n3KTy5LqiyO2KtMEbhccXntyj4TIyzmegoYsMtQItQwko6zl24Ankqb6q9/LO7fWUUb0hll8Ldm\n AmxQ1kq660dZI0o5AXC+96sqYcb16JOq31+MNqUaJwvpsFbMpWPOtTPlYrASs0UvvFPyca8Z5d6\n mI0TyYl++kOIEDg==","X-Received":["by 2002:a05:622a:5b03:b0:50b:3f09:1942 with SMTP id\n d75a77b69052e-50b80eeb845mr70257651cf.66.1774475880535;\n Wed, 25 Mar 2026 14:58:00 -0700 (PDT)","by 2002:a05:622a:5b03:b0:50b:3f09:1942 with SMTP id\n d75a77b69052e-50b80eeb845mr70257441cf.66.1774475880007;\n Wed, 25 Mar 2026 14:58:00 -0700 (PDT)"],"Date":"Wed, 25 Mar 2026 17:57:58 -0400","From":"Peter Xu <peterx@redhat.com>","To":"Fabiano Rosas <farosas@suse.de>","Cc":"qemu-devel@nongnu.org, Alexander Mikhalitsyn <alexander@mihalicyn.com>,\n Juraj Marcin <jmarcin@redhat.com>","Subject":"Re: [RFC PATCH v1 13/17] vmstate: Drop\n VMS_ARRAY_OF_POINTER_AUTO_ALLOC","Message-ID":"<acRaZpYQy4y87lkM@x1.local>","References":"<20260324194333.30004-1-farosas@suse.de>\n <20260324194333.30004-14-farosas@suse.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260324194333.30004-14-farosas@suse.de>","Received-SPF":"pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com;\n helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001,\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_H3=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_PASS=-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 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"}}]