qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] [PATCH v3] memory-region: Report if region is read-only or write-only on info mtree
Date: Sat, 04 Feb 2012 16:25:42 +0100	[thread overview]
Message-ID: <4F2D4DF6.4090502@web.de> (raw)
In-Reply-To: <CAAu8pHu8fq4LwqgBWAuh1wTTAoD-qiCitXPNSTc0d5XZgnpnYQ@mail.gmail.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

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>
---

Changes in v3:
 - refactored writable condition (which DO makes sense as a ROM device
   is either in ROM or in write mode. It's readable and writable in
   both modes, but only in special ways. So let's tag it abstractly.)

 memory.c |   14 +++++++++++---
 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);
     }
 
-- 
1.7.3.4

  reply	other threads:[~2012-02-04 15:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 12:02 [Qemu-devel] [PATCH] memory-region: Report if region is read-only on info mtree Jan Kiszka
2012-02-04 12:12 ` Blue Swirl
2012-02-04 12:23   ` Jan Kiszka
2012-02-04 12:32     ` Blue Swirl
2012-02-04 14:51       ` Jan Kiszka
2012-02-09  8:35         ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2012-02-09 10:08           ` Jan Kiszka
2012-02-09 11:54             ` Stefan Hajnoczi
2012-02-04 14:57 ` [Qemu-devel] [PATCH v2] memory-region: Report if region is read-only or write-only " Jan Kiszka
2012-02-04 15:04   ` Blue Swirl
2012-02-04 15:25     ` Jan Kiszka [this message]
2012-02-11 11:09       ` [Qemu-devel] [PATCH v3] " Blue Swirl

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=4F2D4DF6.4090502@web.de \
    --to=jan.kiszka@web.de \
    --cc=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).