On Fri, Jun 26, 2026 at 09:27:20AM +0200, Paolo Bonzini wrote:
> Il ven 17 apr 2026, 12:57 Magnus Kulke <[email protected]> ha
> scritto:
> 
> > +#ifdef CONFIG_MSHV
> 
> + VMSTATE_BUFFER(hv_lapic_state, APICCommonState),
> 
> +#endif
> 
> 
> This breaks migration across releases for everyone else, and also across
> builds that have different --enable-mshv. Compile-time defines are almost
> always wrong in VMState definitions.
> 
>      DeviceState *vapic;
> >      hwaddr vapic_paddr; /* note: persistence via kvmvapic */
> >      uint32_t extended_log_dest;
> > +
> > +#ifdef CONFIG_MSHV
> > +    uint8_t hv_lapic_state[sizeof(struct
> > hv_local_interrupt_controller_state)];
> > +#endif
> >
> 
> No, this is called common for a reason. You need to implement a subclass
> and handle migration in there.
> 

makes sense. I think I found a way to put the additional fields into a
subclass. the apic_id is semantic, so we cannot use the auto-wiring
dc->vmds state, but APIC_COMMON is doing the same. I'll send a revised patch
soon.

thanks,

magnus

Reply via email to