Added a simple skeleton PCI device for snapshot/restores. Added
documentation about the snapshot/restore functionality.
Signed-off-by: Richard Liu
---
docs/devel/snapshot.rst | 26 +
hw/i386/Kconfig | 1 +
hw/misc/Kconfig | 3 ++
hw/misc/meson.build | 1 +
hw
Use a file-backed copy-on-write mmap region for snapshots. Restores are
handled by remmaping the fixed region. Currently, the snapshot file save
path (`filepath`) is hardcoded (to a path that is memory-backed on my
machine).
Signed-off-by: Richard Liu
---
hw/misc/snapshot.c | 72
it is outside the vcpu thread by temporarily setting
`current_cpu` to be null.
The restore code (qemu_loadvm_state in particular) needs to be called
in a bottom half or a coroutine. I am not sure why.
Signed-off-by: Richard Liu
---
hw/misc/snapshot.c | 6
migration/savevm.c | 84
= 0;
memory[0] = 0x101; // save snapshot
printf("before: value of a = %d\n", a);
a = 1;
printf("middle: value of a = %d\n", a);
memory[0] = 0x102; // load snapshot
printf("after: value of a = %d\n", a);
r
- create a document outlining specifications for a virtual device to
manage snapshot/restore mechanism for fuzzing
Signed-off-by: Richard Liu
---
docs/devel/snapshot.rst | 26 ++
1 file changed, 26 insertions(+)
create mode 100644 docs/devel/snapshot.rst
diff --git