aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-02-04 16:25:42 +0100
committerBlue Swirl <blauwirbel@gmail.com>2012-02-11 10:49:07 +0000
commit4896d74b844b1845de32c29743fe09e4145f0601 (patch)
tree2681b9645e4b88e855d5772d2359201ccd55fa4f /memory.c
parent734781c9a03745a28fba3e538d33d4e39c5e4ff5 (diff)
downloadqemu-4896d74b844b1845de32c29743fe09e4145f0601.zip
qemu-4896d74b844b1845de32c29743fe09e4145f0601.tar.gz
qemu-4896d74b844b1845de32c29743fe09e4145f0601.tar.bz2
memory-region: Report if region is read-only or write-only on info mtree
Helpful to understand guest configurations of things like the i440FX's PAM or the state of ROM devices. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/memory.c b/memory.c
index 5e77d8a..22816e2 100644
--- a/memory.c
+++ b/memory.c
@@ -1609,23 +1609,31 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
ml->printed = false;
QTAILQ_INSERT_TAIL(alias_print_queue, ml, queue);
}
- mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d): alias %s @%s "
- TARGET_FMT_plx "-" TARGET_FMT_plx "\n",
+ mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx
+ " (prio %d, %c%c): alias %s @%s " TARGET_FMT_plx
+ "-" TARGET_FMT_plx "\n",
base + mr->addr,
base + mr->addr
+ (target_phys_addr_t)int128_get64(mr->size) - 1,
mr->priority,
+ mr->readable ? 'R' : '-',
+ !mr->readonly && !(mr->rom_device && mr->readable) ? 'W'
+ : '-',
mr->name,
mr->alias->name,
mr->alias_offset,
mr->alias_offset
+ (target_phys_addr_t)int128_get64(mr->size) - 1);
} else {
- mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d): %s\n",
+ mon_printf(f,
+ TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d, %c%c): %s\n",
base + mr->addr,
base + mr->addr
+ (target_phys_addr_t)int128_get64(mr->size) - 1,
mr->priority,
+ mr->readable ? 'R' : '-',
+ !mr->readonly && !(mr->rom_device && mr->readable) ? 'W'
+ : '-',
mr->name);
}