From: Avi Kivity <avi@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 2/2] memory: print aliased IO ranges in info mtree
Date: Mon, 12 Mar 2012 14:01:51 +0200 [thread overview]
Message-ID: <4F5DE5AF.9000208@redhat.com> (raw)
In-Reply-To: <CAAu8pHtuS19veaShc_RUCHO=8xq2YuvPRi0BE5Zk4HpyaUwc1Q@mail.gmail.com>
On 03/11/2012 01:00 PM, Blue Swirl wrote:
> Print also I/O ports behind bridges and other aliases.
>
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
> ---
> memory.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/memory.c b/memory.c
> index 4c3dc49..0201392 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -1639,7 +1639,20 @@ void mtree_info(fprintf_function mon_printf, void *f)
> if (address_space_io.root &&
> !QTAILQ_EMPTY(&address_space_io.root->subregions)) {
> QTAILQ_INIT(&ml_head);
> +
> mon_printf(f, "I/O\n");
> mtree_print_mr(mon_printf, f, address_space_io.root, 0, 0, &ml_head);
> +
> + /* print aliased I/O regions */
> + QTAILQ_FOREACH(ml, &ml_head, queue) {
> + if (!ml->printed) {
> + mon_printf(f, "%s\n", ml->mr->name);
> + mtree_print_mr(mon_printf, f, ml->mr, 0, 0, &ml_head);
> + }
> + }
> + }
> +
> + QTAILQ_FOREACH_SAFE(ml, &ml_head, queue, ml2) {
> + g_free(ml);
> }
> }
This is just duplication. A little refactoring would eliminate it.
Also, we might have an alias from the memory address space and an alias
from the I/O address space pointing into the same region. So maybe
alias printing should be consolidated for all address spaces.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2012-03-12 12:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-11 11:00 [Qemu-devel] [PATCH 2/2] memory: print aliased IO ranges in info mtree Blue Swirl
2012-03-12 12:01 ` Avi Kivity [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=4F5DE5AF.9000208@redhat.com \
--to=avi@redhat.com \
--cc=blauwirbel@gmail.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).