accel: kvm: clarify that extra exit data is hexadecimal
authorDavid Edmondson <david.edmondson@oracle.com>
Wed, 28 Apr 2021 14:24:31 +0000 (15:24 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Sun, 2 May 2021 15:24:50 +0000 (17:24 +0200)
When dumping the extra exit data provided by KVM, make it clear that
the data is hexadecimal.

At the same time, zero-pad the output.

Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210428142431.266879-1-david.edmondson@oracle.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
accel/kvm/kvm-all.c

index b6d9f92f1513fca0b954658c100be1e53471f425..93d7cbfeaf88253dc55e28843a3dc7b7f7512e66 100644 (file)
@@ -2269,7 +2269,7 @@ static int kvm_handle_internal_error(CPUState *cpu, struct kvm_run *run)
         int i;
 
         for (i = 0; i < run->internal.ndata; ++i) {
-            fprintf(stderr, "extra data[%d]: %"PRIx64"\n",
+            fprintf(stderr, "extra data[%d]: 0x%016"PRIx64"\n",
                     i, (uint64_t)run->internal.data[i]);
         }
     }