qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: qemu-devel@nongnu.org
Cc: Austin Clements <amdragon@mit.edu>,
	Markus Armbruster <armbru@redhat.com>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: [Qemu-devel] [PATCH] monitor: Prevent sign-extension of 32-bit addresses printed by info tlb
Date: Sun, 21 Aug 2011 14:49:45 -0400	[thread overview]
Message-ID: <1313952585-32210-1-git-send-email-amdragon@mit.edu> (raw)
In-Reply-To: <20110821184838.GP21339@mit.edu>

This is the same fix that was recently applied to info mem.  Before
this change, info tlb output looked like:

ffffffffffffc000: 000000000fffc000 --------W
ffffffffffffd000: 000000000fffd000 --------W
ffffffffffffe000: 000000000fffe000 --------W
fffffffffffff000: 000000000ffff000 --------W

With this change, it looks like

00000000ffffc000: 000000000fffc000 --------W
00000000ffffd000: 000000000fffd000 --------W
00000000ffffe000: 000000000fffe000 --------W
00000000fffff000: 000000000ffff000 --------W

Signed-off-by: Austin Clements <amdragon@mit.edu>
---
 monitor.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/monitor.c b/monitor.c
index 249f845..001a42b 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2199,7 +2199,7 @@ static void print_pte(Monitor *mon, target_phys_addr_t addr,
 
 static void tlb_info_32(Monitor *mon, CPUState *env)
 {
-    int l1, l2;
+    unsigned int l1, l2;
     uint32_t pgd, pde, pte;
 
     pgd = env->cr[3] & ~0xfff;
@@ -2227,7 +2227,7 @@ static void tlb_info_32(Monitor *mon, CPUState *env)
 
 static void tlb_info_pae32(Monitor *mon, CPUState *env)
 {
-    int l1, l2, l3;
+    unsigned int l1, l2, l3;
     uint64_t pdpe, pde, pte;
     uint64_t pdp_addr, pd_addr, pt_addr;
 
-- 
1.7.5.4

  reply	other threads:[~2011-08-21 18:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15  3:19 [Qemu-devel] [PATCH] monitor: Prevent sign-extension of 32-bit addresses printed by info mem Austin Clements
2011-08-21 18:26 ` Blue Swirl
2011-08-21 18:48   ` Austin Clements
2011-08-21 18:49     ` Austin Clements [this message]
2011-08-21 19:51       ` [Qemu-devel] [PATCH] monitor: Prevent sign-extension of 32-bit addresses printed by info tlb 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=1313952585-32210-1-git-send-email-amdragon@mit.edu \
    --to=amdragon@mit.edu \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@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).