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