[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] tools/xen-hvmctx: drop bogus casts from dump_mtrr()



commit 4b04aee92cc599a186ce812f1bea5de75153e903
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Oct 4 14:55:38 2018 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Oct 4 14:55:38 2018 +0200

    tools/xen-hvmctx: drop bogus casts from dump_mtrr()
    
    Also make the iteration variable unsigned.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/misc/xen-hvmctx.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/tools/misc/xen-hvmctx.c b/tools/misc/xen-hvmctx.c
index d32989bd0d..40e77851be 100644
--- a/tools/misc/xen-hvmctx.c
+++ b/tools/misc/xen-hvmctx.c
@@ -344,19 +344,17 @@ static void dump_pmtimer(void)
 static void dump_mtrr(void)
 {
     HVM_SAVE_TYPE(MTRR) p;
-    int i;
+    unsigned int i;
+
     READ(p);
-    printf("    MTRR: PAT 0x%llx, cap 0x%llx, default 0x%llx\n", 
-           (unsigned long long) p.msr_pat_cr,
-           (unsigned long long) p.msr_mtrr_cap,
-           (unsigned long long) p.msr_mtrr_def_type);
+    printf("    MTRR: PAT %#" PRIx64 ", cap %#" PRIx64 ", default %#" PRIx64 
"\n",
+           p.msr_pat_cr, p.msr_mtrr_cap, p.msr_mtrr_def_type);
     for ( i = 0 ; i < MTRR_VCNT ; i++ )
-        printf("          var %i 0x%16.16llx 0x%16.16llx\n", i,
-               (unsigned long long) p.msr_mtrr_var[2 * i], 
-               (unsigned long long) p.msr_mtrr_var[2 * i + 1]);
+        printf("          var %u %#18.13" PRIx64 " %#18.13" PRIx64 "\n", i,
+               p.msr_mtrr_var[2 * i], p.msr_mtrr_var[2 * i + 1]);
     for ( i = 0 ; i < NUM_FIXED_MSR ; i++ )
-        printf("          fixed %.2i 0x%16.16llx\n", i,
-               (unsigned long long) p.msr_mtrr_fixed[i]);
+        printf("          fixed %02x %#18.16" PRIx64 "\n",
+               i, p.msr_mtrr_fixed[i]);
 }
 
 static void dump_viridian_domain(void)
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.