thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 6 months ago
Clone
1be5c7
From 8c1edb1889ff44506f35fa185d6569b0dd9d7260 Mon Sep 17 00:00:00 2001
1be5c7
From: Juan Quintela <quintela@redhat.com>
1be5c7
Date: Wed, 18 May 2022 02:52:23 -0300
1be5c7
Subject: [PATCH 07/37] multifd: Fill offset and block for reception
1be5c7
MIME-Version: 1.0
1be5c7
Content-Type: text/plain; charset=UTF-8
1be5c7
Content-Transfer-Encoding: 8bit
1be5c7
1be5c7
RH-Author: Leonardo Brás <leobras@redhat.com>
1be5c7
RH-MergeRequest: 191: MSG_ZEROCOPY + Multifd @ rhel8.7
1be5c7
RH-Commit: [7/26] 51a9e6b76af956d63fc735172211d9bf6f0f6f80
1be5c7
RH-Bugzilla: 2072049
1be5c7
RH-Acked-by: Peter Xu <peterx@redhat.com>
1be5c7
RH-Acked-by: Daniel P. Berrangé <berrange@redhat.com>
1be5c7
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
1be5c7
1be5c7
We were using the iov directly, but we will need this info on the
1be5c7
following patch.
1be5c7
1be5c7
Signed-off-by: Juan Quintela <quintela@redhat.com>
1be5c7
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
1be5c7
(cherry picked from commit 01102a2ef6c97acc5cc8a2c3bb62b7665a20f51f)
1be5c7
Signed-off-by: Leonardo Bras <leobras@redhat.com>
1be5c7
---
1be5c7
 migration/multifd.c | 2 ++
1be5c7
 1 file changed, 2 insertions(+)
1be5c7
1be5c7
diff --git a/migration/multifd.c b/migration/multifd.c
1be5c7
index 55d99a8232..0533da154a 100644
1be5c7
--- a/migration/multifd.c
1be5c7
+++ b/migration/multifd.c
1be5c7
@@ -354,6 +354,7 @@ static int multifd_recv_unfill_packet(MultiFDRecvParams *p, Error **errp)
1be5c7
         return -1;
1be5c7
     }
1be5c7
 
1be5c7
+    p->pages->block = block;
1be5c7
     for (i = 0; i < p->pages->num; i++) {
1be5c7
         uint64_t offset = be64_to_cpu(packet->offset[i]);
1be5c7
 
1be5c7
@@ -363,6 +364,7 @@ static int multifd_recv_unfill_packet(MultiFDRecvParams *p, Error **errp)
1be5c7
                        offset, block->used_length);
1be5c7
             return -1;
1be5c7
         }
1be5c7
+        p->pages->offset[i] = offset;
1be5c7
         p->pages->iov[i].iov_base = block->host + offset;
1be5c7
         p->pages->iov[i].iov_len = page_size;
1be5c7
     }
1be5c7
-- 
1be5c7
2.35.3
1be5c7