qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: David Hildenbrand <david@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	QEMU <qemu-devel@nongnu.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
	qiaonuohan@cn.fujitsu.com
Subject: Re: Page alignment & memory regions expectations
Date: Thu, 25 Aug 2022 13:18:28 +0100	[thread overview]
Message-ID: <CAFEAcA9X-ZcjtJRNZWa97_JS_oT+vm2XEehMPtri1asX72skWg@mail.gmail.com> (raw)
In-Reply-To: <cc366956-adc7-7ca6-a056-0bad28fdca06@redhat.com>

On Thu, 25 Aug 2022 at 12:57, David Hildenbrand <david@redhat.com> wrote:
>
> On 25.08.22 13:47, Peter Maydell wrote:
> > On Thu, 25 Aug 2022 at 08:27, David Hildenbrand <david@redhat.com> wrote:
> >> On 24.08.22 21:55, Peter Maydell wrote:
> >>> Lumps of memory can be any size you like and anywhere in
> >>> memory you like. Sometimes we are modelling real hardware
> >>> that has done something like that. Sometimes it's just
> >>> a convenient way to model a device. Generic code in
> >>> QEMU does need to cope with this...
> >>
> >> But we are talking about system RAM here. And judging by the fact that
> >> this is the first time dump.c blows up like this, this doesn't seem to
> >> very common, no?
> >
> > What's your definition of "system RAM", though? The biggest
>
> I'd say any RAM memory region that lives in address_space_memory /
> get_system_memory(). That's what softmmu/memory_mapping.c cares about
> and where we bail out here.
>
>
> > bit of RAM in the system? Anything over X bytes? Whatever
> > the machine set up as MachineState::ram ? As currently
> > written, dump.c is operating on every RAM MemoryRegion
> > in the system, which includes a lot of things which aren't
> > "system RAM" (for instance, it includes framebuffers and
> > ROMs).
>
> Anything in address_space_memory / get_system_memory(), correct. And
> this seems to be the first time that we fail here, so it's either a case
> we should be handling in dump code (as you indicate) or some case we
> shouldn't have to worry about (as I questioned).

I suspect that most of the odd-alignment things are not going
to be ones you really care about having in a dump, but the
difficulty is going to be defining what counts as "a region
we don't care about", because we don't really have "purposes"
attached to MemoryRegions. So in practice the dump code is
going to have to either (a) be able to put odd-alignment
regions into the dump, and put them all in or (b) skip all of
them, regardless. Chances of anybody noticing a difference
between a and b in practice seem minimal :-)

-- PMM


      reply	other threads:[~2022-08-25 12:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 12:43 Page alignment & memory regions expectations Marc-André Lureau
2022-08-24 16:42 ` David Hildenbrand
2022-08-24 19:55   ` Peter Maydell
2022-08-25  7:26     ` David Hildenbrand
2022-08-25 11:47       ` Peter Maydell
2022-08-25 11:57         ` David Hildenbrand
2022-08-25 12:18           ` Peter Maydell [this message]

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=CAFEAcA9X-ZcjtJRNZWa97_JS_oT+vm2XEehMPtri1asX72skWg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=david@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qiaonuohan@cn.fujitsu.com \
    --cc=stefanb@linux.vnet.ibm.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).