From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEZNz-00028C-Cf for qemu-devel@nongnu.org; Wed, 28 Aug 2013 02:37:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEZNq-0002IQ-VC for qemu-devel@nongnu.org; Wed, 28 Aug 2013 02:37:47 -0400 Received: from mail-ea0-x233.google.com ([2a00:1450:4013:c01::233]:42145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEZNq-0002IK-OY for qemu-devel@nongnu.org; Wed, 28 Aug 2013 02:37:38 -0400 Received: by mail-ea0-f179.google.com with SMTP id b10so2725857eae.10 for ; Tue, 27 Aug 2013 23:37:38 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <521D9AAC.3000306@redhat.com> Date: Wed, 28 Aug 2013 08:37:32 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1377069536-12658-1-git-send-email-lilei@linux.vnet.ibm.com> <1377069536-12658-9-git-send-email-lilei@linux.vnet.ibm.com> <521677CD.70801@linux.vnet.ibm.com> <521712CD.2000106@linux.vnet.ibm.com> <521D6DC9.4060408@linux.vnet.ibm.com> In-Reply-To: <521D6DC9.4060408@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/18] migration-local: introduce qemu_fopen_local() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lei Li Cc: Andrea Arcangeli , quintela@redhat.com, qemu-devel@nongnu.org, "Michael R. Hines" , Anthony Liguori , lagarcia@br.ibm.com, rcj@linux.vnet.ibm.com Il 28/08/2013 05:26, Lei Li ha scritto: >>> >>> RAMBlock structs are not visible outside of exec.c and arch_init.c, >>> how did you do this? >> >> Hi Michael, >> >> Good catch! >> Actually this is the 'Known issue' that I listed in the cover >> letter, and I planed to ask suggestions on this. >> >> Currently the implementation of override of the RDMA hook like >> save_page for localhost migration needs to have knowledge of >> MemoryRegion and RAMBlock, say, when saving ram page, need to know >> which RAMBlock the given ram address save_page hook passed is >> belong to, or which is the last ram block has been sent. But seems >> that such structs can not be exported to the private code in >> migration-local.c. >> >> My guess for now is that there might be two possible ways to handle this: >> >> 1) Choose another way around, like representation of a RAMBlock and >> MemoryRegion from localhost migration perspective. This might need >> more work to handle the descriptions. >> >> 2) It could be exported directly into private code like migration-local.c >> through some ways that I don't know yet. I remembered that the >> implementation of postcopy migration did this. >> >> So I'd like to post and ask for your suggestions to make sure it's the >> right and best way to handle. > > Hi Paolo, > > Any suggestions on this? Unlike the RAM constants and migration states, I think exporting MemoryRegion (not sure about RAMBlock) is fine. In fact, replacing the save_page hook's block_offset argument with a MemoryRegion would be a nice cleanup. Paolo