From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: Carsten Otte <cotte@de.ibm.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PatchV2] s390x: fix memory detection for guests > 64GB
Date: Thu, 12 May 2011 09:59:01 +0200 [thread overview]
Message-ID: <4DCB9345.9000804@de.ibm.com> (raw)
In-Reply-To: <BA9FAC21-C2FE-4DDD-8C2D-3228444387FE@suse.de>
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
next prev parent reply other threads:[~2011-05-12 7:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 12:49 [Qemu-devel] s390x: fix memory detection for guests > 64GB Christian Borntraeger
2011-05-11 22:36 ` Alexander Graf
2011-05-12 7:50 ` [Qemu-devel] [PatchV2] " Christian Borntraeger
2011-05-12 7:55 ` Alexander Graf
2011-05-12 7:59 ` Christian Borntraeger [this message]
2011-05-12 8:01 ` Alexander Graf
2011-05-12 8:50 ` [Qemu-devel] [PatchV3] " Christian Borntraeger
2011-05-17 13:16 ` Alexander Graf
2011-05-17 14:03 ` Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DCB9345.9000804@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=agraf@suse.de \
--cc=cotte@de.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).