From: Cornelia Huck <cohuck@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: "Lukáš Doktor" <ldoktor@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Janosch Frank" <frankja@linux.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@de.ibm.com>,
qemu-s390x <qemu-s390x@nongnu.org>,
"Igor Mammedov" <imammedo@redhat.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [PATCH v3 1/1] vl/s390x: fixup ram sizes for compat machines
Date: Thu, 2 Apr 2020 11:22:06 +0200 [thread overview]
Message-ID: <20200402112206.17c942de.cohuck@redhat.com> (raw)
In-Reply-To: <285819e0-e23e-32ac-b061-a0b683baeb5a@redhat.com>
On Wed, 1 Apr 2020 15:14:12 +0200
David Hildenbrand <david@redhat.com> wrote:
> On 01.04.20 14:37, Christian Borntraeger wrote:
> > +static ram_addr_t s390_fixup_ram_size(ram_addr_t sz)
> > +{
> > + /* same logic as in sclp.c */
> > + int increment_size = 20;
> > + ram_addr_t newsz;
> > +
> > + while ((sz >> increment_size) > MAX_STORAGE_INCREMENTS) {
> > + increment_size++;
> > + }
> > + newsz = sz >> increment_size << increment_size;
> > +
> > + if (sz != newsz) {
> > + qemu_printf("Ram size %" PRIu64 "MB was fixed up to %" PRIu64
> > + "MB to match machine restrictions. Consider updating "
> > + "the guest definition.i\n", sz / MiB, newsz / MiB);
>
> Not sure if news/zs will be printed correctly in case ram_addr_t !=
> uint64_t.
RAM_ADDR_FMT might be the right thing to use here?
next prev parent reply other threads:[~2020-04-02 9:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 12:37 [PATCH v3 1/1] vl/s390x: fixup ram sizes for compat machines Christian Borntraeger
2020-04-01 12:46 ` Christian Borntraeger
2020-04-01 13:14 ` David Hildenbrand
2020-04-02 9:22 ` Cornelia Huck [this message]
2020-04-02 9:25 ` Christian Borntraeger
2020-04-02 10:27 ` Cornelia Huck
2020-04-02 10:32 ` Christian Borntraeger
2020-04-01 16:34 ` Igor Mammedov
2020-04-02 9:27 ` Cornelia Huck
2020-04-02 9:39 ` Christian Borntraeger
2020-04-02 9:43 ` Cornelia Huck
2020-04-02 11:25 ` Cornelia Huck
2020-04-02 11:32 ` Christian Borntraeger
2020-04-02 11:39 ` Igor Mammedov
2020-04-02 11:42 ` Christian Borntraeger
2020-04-02 12:05 ` Igor Mammedov
2020-04-02 12:09 ` Christian Borntraeger
2020-04-02 12:35 ` Christian Borntraeger
2020-04-02 14:18 ` Cornelia Huck
2020-04-02 15:01 ` Igor Mammedov
2020-04-02 17:48 ` Peter Xu
2020-04-02 15:16 ` Cornelia Huck
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=20200402112206.17c942de.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imammedo@redhat.com \
--cc=ldoktor@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
/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).