mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
migration/multifd: Replace p->pages with an union pointer
We want multifd to be able to handle more types of data than just ram pages. To start decoupling multifd from pages, replace p->pages (MultiFDPages_t) with the new type MultiFDSendData that hides the client payload inside an union. The general idea here is to isolate functions that *need* to handle MultiFDPages_t and move them in the future to multifd-ram.c, while multifd.c will stay with only the core functions that handle MultiFDSendData/MultiFDRecvData. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
parent
0e427da096
commit
9f0e108901
7 changed files with 57 additions and 47 deletions
|
@ -46,7 +46,7 @@ static void swap_page_offset(ram_addr_t *pages_offset, int a, int b)
|
|||
*/
|
||||
void multifd_send_zero_page_detect(MultiFDSendParams *p)
|
||||
{
|
||||
MultiFDPages_t *pages = p->pages;
|
||||
MultiFDPages_t *pages = &p->data->u.ram;
|
||||
RAMBlock *rb = pages->block;
|
||||
int i = 0;
|
||||
int j = pages->num - 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue