qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PatchV2] s390x: fix memory detection for guests > 64GB


From: Christian Borntraeger
Subject: Re: [Qemu-devel] [PatchV2] s390x: fix memory detection for guests > 64GB
Date: Thu, 12 May 2011 09:59:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10

On 12/05/11 09:55, Alexander Graf wrote:
>> +    /* s390x ram size detection needs a 16bit multiplier + an increment. So
>> +       guests > 64GB can be specified in 2MB steps etc */
>> +    if (strstr(machine->name, "s390")) {
>> +        int shift = 0;
>> +
>> +        while ((ram_size >> (20 + shift)) > 65535) {
>> +            shift++;
>> +        }
>> +        ram_size = ram_size >> (20 + shift) << (20 + shift);
> 
> This one really belongs to hw/s390-virtio.c. Just move the same code to 
> s390_init there and it should work out. The less hacks we can have in generic 
> code, the better :).

Unfortunately this does not work. The slcp op helper uses the global variable
ram_size fro vl.c. I could change the global ram_size in s390_init, but this
is also pretty ugly.

Christian



reply via email to

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