From: John Baboval <john.baboval@virtualcomputer.com>
To: qemu-devel@nongnu.org, avi@redhat.com
Subject: [Qemu-devel] New Memory API Question
Date: Wed, 26 Oct 2011 09:52:20 -0400 [thread overview]
Message-ID: <4EA81094.5050400@virtualcomputer.com> (raw)
Sorry for coming late to the party on this... I only read qemu-devel
through a filter so I missed all the discussions on the new memory API.
I have a question as to how it works and how it's supposed to work in
certain scenarios.
It's a question of flow. I'm following the code path through the
creation of a new memory subregion. If I'm reading this properly, it
would seem that a MemoryRegion - for example the ones used by VGA - go
through the following flow:
memory_region_init_ram() - (mr->destructor is set to
memory_region_destructor_ram)
memory_region_add_subregion(system_memory, ...) ->
memory_region_update_topology() ->
address_space_update_topology()
address_space_update_topology_part()
as_memory_range_add() - through the ops vector
memory_region_prepare_ram_addr()
At this point it seems that the destructor is overwritten with the
memory_region_destructor_iomem(), and it loses track of the proper way
to ever free the memory region. Is this correct, or am I missing something?
Or does it not matter because nobody ever calls memory_region_destroy
for system memory regions?
Thanks,
-John
next reply other threads:[~2011-10-26 14:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 13:52 John Baboval [this message]
2011-10-26 17:54 ` [Qemu-devel] New Memory API Question John Baboval
2011-10-30 11:54 ` Avi Kivity
2011-10-27 10:23 ` Avi Kivity
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=4EA81094.5050400@virtualcomputer.com \
--to=john.baboval@virtualcomputer.com \
--cc=avi@redhat.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).