Leonardo Bras Soares Passos <leob...@redhat.com> wrote: > On Fri, Aug 19, 2022 at 6:52 AM Juan Quintela <quint...@redhat.com> wrote: >> >> - the value that we receive in ram_save_setup() is a RAMState >> - We would have to change all the callers form >> * ram_save_iterate() >> * ram_find_and_save_block() >> * ram_save_host_page() > > Maybe RAMState could be part of a bigger struct, and we could use > something like a container_of(). > So whenever you want to use it, it would be available. > > What about that?
New struct it is: typedef struct { int (*ram_save_target_page)(RAMState *rs, PageSearchStatus *pss); } MigrationOps; And go from there. Later, Juan.