Skip to content

Background snapshots

Denis Plotnikov qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 16 repliesIn review

Changes in v1 from the cover letter

============
the patch series has been split in smaller chunks

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17migration: add background snapshot capabilitymigration/migration.c migration/migration.h qapi/migration.json+41 -11 reply
2/17bitops: add some atomic versions of bitmap operationsinclude/qemu/bitops.h+25 -01 reply
3/17threads: add infrastructure to process sigsegvinclude/qemu/thread.h util/qemu-thread-posix.c+57 -01 reply
4/17background snapshot: make a dedicated type for ram block listinclude/exec/ramlist.h+3 -10 replies
5/17ram: extend the data structures for background snapshottinginclude/exec/ram_addr.h+7 -01 reply
6/17background snapshot: add helpers to manage a copy of ram block listmigration/ram.c migration/ram.h+57 -01 reply
7/17background snapshot: introduce page buffermigration/ram.c migration/ram.h+94 -02 replies
8/17migration: add helpers to change VM memory protection rightsmigration/ram.c migration/ram.h+57 -01 reply
9/17background snapshot: extend RAM request for holding a page copy pointermigration/ram.c+3 -00 replies
10/17background snapshots: adapt the page queueing code for using page copiesmigration/migration.c migration/ram.c migration/ram.h+47 -172 replies
11/17background snapshot: add a memory page copying functionmigration/ram.c migration/ram.h+57 -00 replies
12/17ram: add background snapshot support in ram page saving part of migrationmigration/ram.c+17 -00 replies
13/17background snapshot: add write-protected page access handler functionmigration/ram.c migration/ram.h+44 -00 replies
14/17kvm: add failed memeory access exit reasonlinux-headers/linux/kvm.h+5 -00 replies
15/17kvm: add vCPU failed memeory access processingtarget/i386/kvm.c+17 -01 reply
16/17migration: move the device state saving logic to a separate functionmigration/savevm.c migration/savevm.h+52 -410 replies
17/17background snapshot: enable background snapshotmigration/migration.c+101 -20 replies

Reviews trailers per patch

1 of 17 patches has a Reviewed-by or Acked-by.

PatchPeter Xu
1/17
2/17R-b
3/17
4/17
5/17
6/17
7/17
8/17
9/17
10/17
11/17
12/17
13/17
14/17
15/17
16/17
17/17

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH v1 00/17] Background snapshots

The workflow to make a snapshot is the following:
1. Pause the vm
2. Make a snapshot of block devices using the scheme of your choice
3. Turn on background-snapshot migration capability
4. Start the migration using the destination (migration stream) of your choice. The migration will resume the vm execution by itself
when it has the devices' states saved and is ready to start ram writing to the migration stream.
5. Listen to the migration finish event

The bakground snapshot works with support of KVM patch:
"x86: mmu: report failed memory access to the userspace" (not applied to the mainstream, it's in the kvm mailing list)

--
Change log:

v0 => v1:
============
the patch series has been split in smaller chunks

Denis Plotnikov (17):
migration: add background snapshot capability
bitops: add some atomic versions of bitmap operations
threads: add infrastructure to process sigsegv
background snapshot: make a dedicated type for ram block list
ram: extend the data structures for background snapshotting background snapshot: add helpers to manage a copy of ram block list background snapshot: introduce page buffer
migration: add helpers to change VM memory protection rights background snapshot: extend RAM request for holding a page copy
pointer
background snapshots: adapt the page queueing code for using page
copies
background snapshot: add a memory page copying function
ram: add background snapshot support in ram page saving part of
migration
background snapshot: add write-protected page access handler function
kvm: add failed memeory access exit reason
kvm: add vCPU failed memeory access processing
migration: move the device state saving logic to a separate function background snapshot: enable background snapshot

 include/exec/ram_addr.h   |   7 +
 include/exec/ramlist.h    |   4 +-
 include/qemu/bitops.h     |  25 +++
 include/qemu/thread.h     |   5 +
 linux-headers/linux/kvm.h |   5 +
 migration/migration.c     | 140 +++++++++++++-
 migration/migration.h     |   1 +
 migration/ram.c           | 374 ++++++++++++++++++++++++++++++++++++--
 migration/ram.h           |  17 +-
 migration/savevm.c        |  91 +++++-----
 migration/savevm.h        |   2 +
 qapi/migration.json       |   6 +-
 target/i386/kvm.c         |  17 ++
 util/qemu-thread-posix.c  |  52 ++++++
 14 files changed, 684 insertions(+), 62 deletions(-)
Signature · 1 line
2.17.0