On Mon, Mar 17, 2025 at 05:37:06PM +0100, Paolo Bonzini wrote: > Date: Mon, 17 Mar 2025 17:37:06 +0100 > From: Paolo Bonzini <pbonz...@redhat.com> > Subject: Re: [PATCH 03/17] rust/vmstate: Add a prefix separator ", " for > the array field in vmstate macros > > On Mon, Mar 17, 2025 at 3:52 PM Zhao Liu <zhao1....@intel.com> wrote: > > > > The fields are separated by ",", so it's necessary to add ", " in array > > field to avoid matching failure. > > This is not a field though, the only (intended) fields are name and > field. It's meant to mimic the slice since &a[0..n]. >
Oops, I misunderstood the format...yes, something like vmstate_struct!(HPETState, timers[0 .. num_timers], VMSTATE_HPET_TIMER, BqlRefCell<HPETTimer>) can work! I'll drop this patch and refresh the unit test in v2. Thanks, Zhao