Skip to contentSkip to conversation

accel: kvm: clarify that extra exit data is hexadecimal

PATCH Applied David Edmondson 3 participants 3 messages Apr 28, 2021 – Apr 30, 2021 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 accel: kvm: clarify that extra exit data is hexadecimal

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.

---
 accel/kvm/kvm-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
accel/kvm/kvm-all.c +1 -1
index b6d9f92f15..93d7cbfeaf 100644
@@ -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]);
         }
     }
Signature · 1 line
2.30.2
#2 lore raw
In reply to David Edmondson

Le 28/04/2021 à 16:24, David Edmondson a écrit :

Quoted 16 lines

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.

---
 accel/kvm/kvm-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
accel/kvm/kvm-all.c +0 -0
index b6d9f92f15..93d7cbfeaf 100644

accel/kvm/kvm-all.c static int kvm_handle_internal_error(CPUState *cpu, struct kvm_run *run) · line 2275

Quoted 8 lines
accel/kvm/kvm-all.c +1 -1
@@ -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]);
         }
     }

Applied to my trivial-patches branch.

Thanks,
Laurent