[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Persistent Main Memory in QEmu
From: |
Li, Tianyou |
Subject: |
Re: [Qemu-devel] Persistent Main Memory in QEmu |
Date: |
Thu, 21 Apr 2016 00:59:11 +0000 |
Hi Dave,
Thanks for your response. Below are my explanations:
> Can you explain what you mean by 'persistent' - where do you intend to store
> the guests memory?
There could be a file or memory region that can survive across guest
shutdown/reboot. Seems Artyom has pointed out the right direction and I have
verified by looking into the code throughout the call stack from pc_memory_init
to qemu_ram_alloc_from_file. I plan to write something like kernel module to
verify the persistency characteristics from guest point of view.
> Also, remember that you'll need to save/load the device state as well as the
> rest of RAM.
Device state handling could be done from two different aspects: 1. From host
perspective or, 2. From guest perspective. From host, qemu will always know the
state of guest devices so that we can use qemu command to checkpoint states, as
you point out (very appreciated that, I do not know the command
xen-save-devices-state before). From guest, it can be something like suspend to
RAM or S3 for PC to checkpoint the current state of PC and restore them when
wakeup. Currently I will prefer the #2.
In summary, I'd like to have the functionality in qemu that can save & restore
PC main memory at shutdown/power-on phase. Thanks.
Regards,
Tianyou
-----Original Message-----
From: Dr. David Alan Gilbert [mailto:address@hidden
Sent: Wednesday, April 20, 2016 4:36 PM
To: Li, Tianyou <address@hidden>
Cc: address@hidden
Subject: Re: [Qemu-devel] Persistent Main Memory in QEmu
* Li, Tianyou (address@hidden) wrote:
> Hi,
>
> Currently we are trying to implement below functionalities in QEmu: main
> memory in guest can be logically viewed as persistent and its content can be
> survived through reboot or shutdown/powerup.
>
> I have looked into the QEmu memory management code include memory.c, exec.c
> and other related source, unfortunately I do not have the chance to get clue
> of how to make QEmu main memory persistent. I found that
> pmemsave<http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-kvm/cha.qemu.monitor.html#id547777>
> could dump physical memory of guest, but I could not find how to restore the
> dump file before VM startup to execution.
Can you explain what you mean by 'persistent' - where do you intend to store
the guests memory?
Also, remember that you'll need to save/load the device state as well as the
rest of RAM. If you've got a way to preserve RAM then maybe hte
xen-save-devices-state qemu command could be used to store the rest of devices.
Dave
>
> Could anyone provide some hints to me? Thanks in advance!
>
> Regards,
> Tianyou
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK