* [Qemu-devel] [PATCH 2/2] memory: print aliased IO ranges in info mtree
@ 2012-03-11 11:00 Blue Swirl
2012-03-12 12:01 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Blue Swirl @ 2012-03-11 11:00 UTC (permalink / raw)
To: Avi Kivity, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
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);
}
}
--
1.7.9
[-- Attachment #2: 0002-memory-print-aliased-IO-ranges-in-info-mtree.patch --]
[-- Type: text/x-patch, Size: 1476 bytes --]
From a93566c2bc6dcb703020cf50b1324a1d437d8802 Mon Sep 17 00:00:00 2001
Message-Id: <a93566c2bc6dcb703020cf50b1324a1d437d8802.1331463059.git.blauwirbel@gmail.com>
In-Reply-To: <8afc6dd4b177f1dc631d880964191de609d73b54.1331463059.git.blauwirbel@gmail.com>
References: <8afc6dd4b177f1dc631d880964191de609d73b54.1331463059.git.blauwirbel@gmail.com>
From: Blue Swirl <blauwirbel@gmail.com>
Date: Sat, 10 Mar 2012 16:58:35 +0000
Subject: [PATCH 2/5] memory: print aliased IO ranges in info mtree
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);
}
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] memory: print aliased IO ranges in info mtree
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
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2012-03-12 12:01 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-12 12:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).