From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwAyR-00011y-Cl for qemu-devel@nongnu.org; Wed, 24 Aug 2011 06:46:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwAyQ-0006x8-7X for qemu-devel@nongnu.org; Wed, 24 Aug 2011 06:46:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwAyP-0006wy-VN for qemu-devel@nongnu.org; Wed, 24 Aug 2011 06:46:18 -0400 Message-ID: <4E54D673.2020601@redhat.com> Date: Wed, 24 Aug 2011 13:46:11 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1314180683-8227-1-git-send-email-avi@redhat.com> <1314180683-8227-7-git-send-email-avi@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 06/24] QEMUMachine: pass address space to machine init function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On 08/24/2011 01:32 PM, Peter Maydell wrote: > On 24 August 2011 11:11, Avi Kivity wrote: > > Avoids get_system_memory() everywhere. > > > - machine->init(ram_size, boot_devices, > > + machine->init(get_system_memory(), get_system_io(), ram_size, boot_devices, > > kernel_filename, kernel_cmdline, initrd_filename, cpu_model); > > I think this is conceptually wrong. The system memory/IO address spaces > are not configurable properties of the machine model (in the way that > the other arguments to machine->init() are), they're purely an internal > implementation detail of it. (In fact for many of the machines we support > there isn't even any such thing as the system IO space...) I agree with all you say, but does it make the patch incorrect? The purpose here is to allow removal of get_system_memory() from the general code base. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.