qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 06/24] QEMUMachine: pass address space to machin


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 06/24] QEMUMachine: pass address space to machine init function
Date: Wed, 24 Aug 2011 13:46:11 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 08/24/2011 01:32 PM, Peter Maydell wrote:
On 24 August 2011 11:11, Avi Kivity<address@hidden>  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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]