From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffoal-0003Hq-KB for qemu-devel@nongnu.org; Wed, 18 Jul 2018 11:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffoag-0000Hp-JN for qemu-devel@nongnu.org; Wed, 18 Jul 2018 11:42:15 -0400 Received: from relay.sw.ru ([185.231.240.75]:36390) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ffoag-0000FW-3V for qemu-devel@nongnu.org; Wed, 18 Jul 2018 11:42:10 -0400 From: Denis Plotnikov Date: Wed, 18 Jul 2018 18:41:52 +0300 Message-Id: <20180718154200.26777-10-dplotnikov@virtuozzo.com> In-Reply-To: <20180718154200.26777-1-dplotnikov@virtuozzo.com> References: <20180718154200.26777-1-dplotnikov@virtuozzo.com> Subject: [Qemu-devel] [PATCH v1 09/17] background snapshot: extend RAM request for holding a page copy pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dgilbert@redhat.com, quintela@redhat.com, pbonzini@redhat.com Cc: qemu-devel@nongnu.org This pointer is going to be used to transfer a memory. Once the memory page is copied the content the snapshot interested in is saved for writing and we can make the page writable again. Signed-off-by: Denis Plotnikov --- migration/ram.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index ce3dead932..dc7dfe0726 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -188,6 +188,7 @@ struct RAMSrcPageRequest { RAMBlock *rb; hwaddr offset; hwaddr len; + void *page_copy; QSIMPLEQ_ENTRY(RAMSrcPageRequest) next_req; }; @@ -265,6 +266,8 @@ struct PageSearchStatus { unsigned long page; /* Set once we wrap around */ bool complete_round; + /* Pointer to the cached page */ + void *page_copy; }; typedef struct PageSearchStatus PageSearchStatus; -- 2.17.0