diff options
| author | Fabiano Rosas <farosas@suse.de> | 2024-08-27 14:45:54 -0300 |
|---|---|---|
| committer | Fabiano Rosas <farosas@suse.de> | 2024-09-03 16:24:35 -0300 |
| commit | 9f0e10890109601f375b687736b65e8fac734b55 (patch) | |
| tree | 67c71911d2512d57939f23af2fcc8288e3051fa0 /migration/multifd-zero-page.c | |
| parent | 0e427da096d46860c2a5755295d1e05647e90154 (diff) | |
| download | focaccia-qemu-9f0e10890109601f375b687736b65e8fac734b55.tar.gz focaccia-qemu-9f0e10890109601f375b687736b65e8fac734b55.zip | |
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>
Diffstat (limited to 'migration/multifd-zero-page.c')
| -rw-r--r-- | migration/multifd-zero-page.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/multifd-zero-page.c b/migration/multifd-zero-page.c index cc624e36b3..6506a4aa89 100644 --- a/migration/multifd-zero-page.c +++ b/migration/multifd-zero-page.c @@ -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; |