On Tue, May 20, 2025 at 05:16:22PM +0200, Paolo Bonzini wrote: > Date: Tue, 20 May 2025 17:16:22 +0200 > From: Paolo Bonzini <pbonz...@redhat.com> > Subject: Re: [PATCH 2/5] hw/timer/hpet: Adjust num_timers in hpet_init() > > On 5/20/25 17:27, Zhao Liu wrote: > > Currently, HPET adjusts num_timers in hpet_realize(), and doesn't change > > it in any other place. And this field is initialized as a property. > > Properties are initialized *after* hpet_init. For hw/timer/hpet you can > check s->num_timers and return an error if it's out of bounds, but for the > Rust version we don't have Error** support yet. :(
Oops, yes. (Note for myself,) the default property value is set before hpet_init(), but the subsequent adjustments to property (via object_property_set_uint8()) need to take boundaries into account, which is why the num_timers adjustment is placed in realize(). > Queued 1-4-5 for now. Thanks! Zhao