qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Zhi Yong Wu <zwu.kernel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] memory: Why subpage is introduced?
Date: Thu, 22 Dec 2011 14:38:58 +0200	[thread overview]
Message-ID: <4EF324E2.2010306@redhat.com> (raw)
In-Reply-To: <CAEH94Lgi1NYRSBcToShdqg5VR6fgOCE312EOzY1kGfkUiLzY6g@mail.gmail.com>

On 12/22/2011 01:24 PM, Zhi Yong Wu wrote:
> >
> >> 2.) How to render MemoryRegion into one disjoint flatrange list? That
> >> rendering function is a bit difficult to understand. Can anyone simply
> >> explain it?
> >
> > What exactly don't you understand?
> 1.) e.g. some fields such as offset_in_region, terminates, offset in
> MemoryRegion struct. What are separately their meanings?

Well, read the code, it's not that complicated.  Afterwards you can add
documentation based on your findings.

> 2.)  render_memory_region(), how does it render one MemoryRegion into
> the global view flatview? Can you simply explain this function's
> algorithm logic?

Again, what can I say that the code doesn't?  It recursively descends
the hierarchy and finds out which region goes where.

Also read docs/memory.txt

>
> >
> >>
> >> 3.) What are separately the meanings of these flags? such as
> >> IO_MEM_RAM, IO_MEM_ROM, IO_MEM_UNASSIGNED, IO_MEM_*, IO_MEM_ROMD, and
> >> IO_MEM_SUBPAGE.
> >
> > RAM = RAM
> > ROM = ROM
> > UNASSIGNED = nothing handles this range
> > ROMD = ROM when read, device (i.e. callbacks) when written
> > SUBPAGE = dispatch using the lower address bits to obtain final I/O handler.
> thanks.
>
> By the way, if you are available, can you simply explain what is the
> relationship among them and how they work together? such as
> MemoryRegion, RamBlock, PhysPageDesc, and MemorySlot.
>

Sorry, it's a long and complicated story that is changing now.  You'll
have to educate yourself mostly.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2011-12-22 12:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21 12:09 [Qemu-devel] memory: Why subpage is introduced? Zhi Yong Wu
2011-12-21 13:30 ` Avi Kivity
2011-12-22 11:24   ` Zhi Yong Wu
2011-12-22 12:38     ` Avi Kivity [this message]
2011-12-23  5:56       ` Zhi Yong Wu

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=4EF324E2.2010306@redhat.com \
    --to=avi@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zwu.kernel@gmail.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).