From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjNMp-0000y6-Vg for qemu-devel@nongnu.org; Sat, 18 Apr 2015 03:40:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjNMl-0004PL-L1 for qemu-devel@nongnu.org; Sat, 18 Apr 2015 03:40:43 -0400 Received: from mailout2.zih.tu-dresden.de ([141.30.67.73]:56678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjNMl-0004P2-7U for qemu-devel@nongnu.org; Sat, 18 Apr 2015 03:40:39 -0400 Message-ID: <55320A6F.6020006@mailbox.tu-dresden.de> Date: Sat, 18 Apr 2015 09:40:31 +0200 From: Bohdan Trach MIME-Version: 1.0 References: <55311072.2070900@redhat.com> In-Reply-To: <55311072.2070900@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 1/3] memory: Add dump-pc-mem command for checkpointing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: amit.shah@redhat.com, thomas.knauth@googlemail.com, quintela@redhat.com Thank You for the review. Please see comments inline. On 04/17/2015 03:53 PM, Eric Blake wrote: > On 04/17/2015 06:13 AM, Bohdan Trach wrote: >> From: Bohdan Trach >> >> dump-pc-mem command is added for checkpointing guest memory to >> file. Only system RAM region is saved. This checkpoint is later used to >> recover unchanged pages. >> >> Signed-off-by: Bohdan Trach >> --- > >> >> +void qmp_dump_pc_ram(const char *file, Error **errp) { >> + >> + int rc; >> + int fd; >> + fd = open(file, > > Please use qemu_open() rather than raw open(), so that your command > automatically supports /dev/fdset/nnn notation for reusing a file > descriptor passed in via SCM_RIGHTS. > OK, this will be fixed. >> +++ b/qapi-schema.json >> @@ -3648,3 +3648,14 @@ >> # Since: 2.1 >> ## >> { 'command': 'rtc-reset-reinjection' } >> + >> +## >> +# @dump-pc-ram: >> +# >> +# Checkpoints guest. > > The whole guest, or just guest memory? > dump-pc-ram command currently writes "pc.ram" MemoryRegion to the specified file. >> +# >> +# @file: the file to save the memory to as binary data >> +# >> +# Returns: Nothing on success > > Missing a 'Since: 2.4' designation. > OK, I'll add it. -- With best regards, Bohdan Trach