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: Alexander Graf
Subject: Re: [Qemu-devel] [PatchV2] s390x: fix memory detection for guests > 64GB
Date: Thu, 12 May 2011 10:01:20 +0200

On 12.05.2011, at 09:59, Christian Borntraeger wrote:

> 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.

I'd definitely prefer that over the change on vl.c :)


Alex




reply via email to

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