All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: pbonzini@redhat.com, Anthony Liguori <aliguori@us.ibm.com>,
	Laszlo Ersek <lersek@redhat.com>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-1.6 2/2] loader: put FW CFG ROM files into RAM
Date: Mon, 12 Aug 2013 13:07:48 +0300	[thread overview]
Message-ID: <20130812100748.GA30400@redhat.com> (raw)
In-Reply-To: <CAFEAcA9yu2rd4BeAOsVJ6Rv3=jT-zXoQ7jnxjxwjUevfL59=cA@mail.gmail.com>

On Mon, Aug 12, 2013 at 10:32:40AM +0100, Peter Maydell wrote:
> On 12 August 2013 09:49, Michael S. Tsirkin <mst@redhat.com> wrote:
> > +static void *rom_set_mr(Rom *rom, Object *owner, const char *name)
> > +{
> > +    /*
> > +     * Migration code expects that all RAM blocks are full target pages.
> > +     * Round MR size up to make this work.
> > +     */
> > +    unsigned size = ROUND_UP(rom->datasize, qemu_target_page_size);
> > +    void *data = g_malloc0(size);
> 
> If we don't really care where the data lives (ie we are just
> allocating a block for it here) it would be better to get the
> memory subsystem to do the allocation, because then the information
> about the constraints on the size of the region would be confined
> to the memory system.

OK but that looks like a bigger patch. I'm looking
for a small fix that we can make for 1.6.
APIs are easy to tweak migration on-wire format is
set in stone on release.

OK

> > +    data = data;
> 
> Huh?
> 
> -- PMM

I'll drop this in v2 but let's figure out what's acceptable.

-- 
MST

  reply	other threads:[~2013-08-12 10:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12  8:49 [Qemu-devel] [PATCH for-1.6 0/2] future proof rom loading for cross versiom migration Michael S. Tsirkin
2013-08-12  8:49 ` [Qemu-devel] [PATCH for-1.6 1/2] memory: export target page size Michael S. Tsirkin
2013-08-12  9:17   ` Peter Maydell
2013-08-12  9:25     ` Michael S. Tsirkin
2013-08-12  8:49 ` [Qemu-devel] [PATCH for-1.6 2/2] loader: put FW CFG ROM files into RAM Michael S. Tsirkin
2013-08-12  9:32   ` Peter Maydell
2013-08-12 10:07     ` Michael S. Tsirkin [this message]
2013-08-12 13:57 ` [Qemu-devel] [PATCH for-1.6 0/2] future proof rom loading for cross versiom migration Anthony Liguori

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=20130812100748.GA30400@redhat.com \
    --to=mst@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.