From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdvEb-0004Hb-Da for qemu-devel@nongnu.org; Tue, 14 Oct 2014 02:05:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdvEW-0001R7-ET for qemu-devel@nongnu.org; Tue, 14 Oct 2014 02:05:25 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:44043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdvEU-0001Ns-Vo for qemu-devel@nongnu.org; Tue, 14 Oct 2014 02:05:20 -0400 Message-ID: <543CBCF5.5060303@huawei.com> Date: Tue, 14 Oct 2014 14:04:37 +0800 From: Yijun Zhu MIME-Version: 1.0 References: <1413254164-6320-1-git-send-email-zhuyijun@huawei.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with memory_region_allocate_system_memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , hangaohuai@huawei.com, QEMU Developers , peter.huangpeng@huawei.com Hi Peter, On 2014/10/14 12:54, Peter Maydell wrote: > On 14 October 2014 04:36, zhuyijun wrote: >> From: Zhu Yijun >> >> Commit 0b183fc871:"memory: move mem_path handling to >> memory_region_allocate_system_memory" split memory_region_init_ram and >> memory_region_init_ram_from_file. Also it moved mem-path handling a step >> up from memory_region_init_ram to memory_region_allocate_system_memory. >> >> Therefore for any board that uses memory_region_init_ram directly, >> -mem-path is not supported. >> >> Commit e938ba0c35:"ppc: memory: Replace memory_region_init_ram with >> memory_region_allocate_system_memory" have already fixed this on ppc. >> >> arm/arm64 board also occurs, this patch is only for arm64 board(virt). > > Why is this patch only changing this board? What's special > about virt that means we don't want to also make this > change for the other ARM boards? What about all the other > boards for the other architectures? > I think all of the other ARM boards should be changed. If changes in virt is ok, I will make the patch again including the modification of other ARM boards. Best regards, Yijun > The commit message for 0b183fc871 suggests we decided to > just break -mem-path for all those boards, which seems an > odd thing to do... Paolo? > > Incidentally I can't see anything that guards against > calling memory_region_allocate_system_memory() twice, > so I think you would end up with two blocks of RAM > both backed by the same file then. Or have I misread > the code? > > -- PMM > >