migration.c (84a5a8014801a83d1b8d15fa7f0fde03db081530) | migration.c (cb8d4c8f54b8271f642f02382eec29d468bb1c77) |
---|---|
1/* 2 * QEMU live migration 3 * 4 * Copyright IBM, Corp. 2008 5 * 6 * Authors: 7 * Anthony Liguori <aliguori@us.ibm.com> 8 * --- 264 unchanged lines hidden (view full) --- 273 * rbname: Name of the RAMBlock to request the page in, if NULL it's the same 274 * as the last request (a name must have been given previously) 275 * Start: Address offset within the RB 276 * Len: Length in bytes required - must be a multiple of pagesize 277 */ 278void migrate_send_rp_req_pages(MigrationIncomingState *mis, const char *rbname, 279 ram_addr_t start, size_t len) 280{ | 1/* 2 * QEMU live migration 3 * 4 * Copyright IBM, Corp. 2008 5 * 6 * Authors: 7 * Anthony Liguori <aliguori@us.ibm.com> 8 * --- 264 unchanged lines hidden (view full) --- 273 * rbname: Name of the RAMBlock to request the page in, if NULL it's the same 274 * as the last request (a name must have been given previously) 275 * Start: Address offset within the RB 276 * Len: Length in bytes required - must be a multiple of pagesize 277 */ 278void migrate_send_rp_req_pages(MigrationIncomingState *mis, const char *rbname, 279 ram_addr_t start, size_t len) 280{ |
281 uint8_t bufc[12 + 1 + 255]; /* start (8), len (4), rbname upto 256 */ | 281 uint8_t bufc[12 + 1 + 255]; /* start (8), len (4), rbname up to 256 */ |
282 size_t msglen = 12; /* start + len */ 283 284 *(uint64_t *)bufc = cpu_to_be64((uint64_t)start); 285 *(uint32_t *)(bufc + 8) = cpu_to_be32((uint32_t)len); 286 287 if (rbname) { 288 int rbname_len = strlen(rbname); 289 assert(rbname_len < 256); --- 1521 unchanged lines hidden --- | 282 size_t msglen = 12; /* start + len */ 283 284 *(uint64_t *)bufc = cpu_to_be64((uint64_t)start); 285 *(uint32_t *)(bufc + 8) = cpu_to_be32((uint32_t)len); 286 287 if (rbname) { 288 int rbname_len = strlen(rbname); 289 assert(rbname_len < 256); --- 1521 unchanged lines hidden --- |