qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] split memory allocation


From: Glauber Costa
Subject: Re: [Qemu-devel] [PATCH] split memory allocation
Date: Thu, 11 Sep 2008 11:42:03 -0300
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Sep 11, 2008 at 09:35:44AM -0500, Anthony Liguori wrote:
> Aurelien Jarno wrote:
>> Glauber Costa a écrit :
>>   
>>> Right now, kvm keeps the memory allocation split, so we can
>>> handle different areas in different ways. This schema works with qemu
>>> too, so it appears to be the common ground.
>>>
>>> This patch proposes using this common ground for everyone, by spliting
>>> raw qemu.
>>>
>>> Signed-off-by: Glauber Costa <address@hidden>
>>> ---
>>>  hw/pc.c |   16 ++++++++++++----
>>>  1 files changed, 12 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/hw/pc.c b/hw/pc.c
>>> index 435c7d4..d6084ee 100644
>>> --- a/hw/pc.c
>>> +++ b/hw/pc.c
>>> @@ -777,16 +777,24 @@ static void pc_init1(ram_addr_t ram_size, int 
>>> vga_ram_size,
>>>      vmport_init();
>>>       /* allocate RAM */
>>> -    ram_addr = qemu_ram_alloc(ram_size);
>>> -    cpu_register_physical_memory(0, below_4g_mem_size, ram_addr);
>>> +    ram_addr = qemu_ram_alloc(0xa0000);
>>> +    cpu_register_physical_memory(0, 0xa0000, ram_addr);
>>> +
>>> +    ram_addr = qemu_ram_alloc(0x100000 - 0xa0000);   /* hole */
>>>     
>>
>> What the point of allocating RAM for the memory hole if it is not mapped?
>>   
>
> If you don't, you violate the phys_ram_base + PA assumption for all of  
> memory.  No code should rely on this but practically speaking, there is  
> still some code in QEMU that does.
>
> Since the RAM is never touched, it doesn't actually impact the RSS size  
> so it's not all that important.
>
> Regards,
>
> Anthony Liguori
>
Precisely.

We actually saw this a while ago. the kernel loader was broken due to that.




reply via email to

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