qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] kvm: align ram_size to page boundary


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH] kvm: align ram_size to page boundary
Date: Sun, 17 Jun 2012 13:47:20 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2012-06-17 13:30, Avi Kivity wrote:
> On 06/17/2012 02:03 PM, Jan Kiszka wrote:
>> On 2012-06-17 10:47, Avi Kivity wrote:
>>> kvm is not able to execute out of partial pages; align the RAM size
>>> so partial pages aren't present.
>>>
>>> Reported-by: Michael Tokarev <address@hidden>
>>> Signed-off-by: Avi Kivity <address@hidden>
>>> ---
>>>  kvm-all.c |    2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/kvm-all.c b/kvm-all.c
>>> index 4ea7d85..482768f 100644
>>> --- a/kvm-all.c
>>> +++ b/kvm-all.c
>>> @@ -1311,6 +1311,8 @@ int kvm_init(void)
>>>  
>>>      cpu_interrupt_handler = kvm_handle_interrupt;
>>>  
>>> +    ram_size = TARGET_PAGE_ALIGN(ram_size);
>>> +
>>>      return 0;
>>>  
>>>  err:
>>
>> I think this should rather go into generic code. 
> 
> To be honest, I put this in kvm-specific code because vl.c doesn't have
> TARGET_PAGE_ALIGN.  Maybe we should have machine->page_size or
> machine->ram_alignment.
> 
>> What sense does it make
>> to have partial pages with TCG?
> 
> Why impose an artificial restriction?

Beca...

> 
> (answer: to reduce differences among various accelerators)
> 

Oh, you found the answer. :)

At least, it should be enforce for the x86 target, independent of the
accelerator.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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