kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] accel: kvm: clarify that extra exit data is hexadecimal
@ 2021-04-28 14:24 David Edmondson
  2021-04-28 16:03 ` Philippe Mathieu-Daudé
  2021-04-30 13:07 ` Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: David Edmondson @ 2021-04-28 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Paolo Bonzini, kvm, David Edmondson

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>
---
 accel/kvm/kvm-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index b6d9f92f15..93d7cbfeaf 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -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]);
         }
     }
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] accel: kvm: clarify that extra exit data is hexadecimal
  2021-04-28 14:24 [PATCH] accel: kvm: clarify that extra exit data is hexadecimal David Edmondson
@ 2021-04-28 16:03 ` Philippe Mathieu-Daudé
  2021-04-30 13:07 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-04-28 16:03 UTC (permalink / raw)
  To: David Edmondson, qemu-devel; +Cc: qemu-trivial, Paolo Bonzini, kvm

On 4/28/21 4:24 PM, David Edmondson wrote:
> 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>
> ---
>  accel/kvm/kvm-all.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] accel: kvm: clarify that extra exit data is hexadecimal
  2021-04-28 14:24 [PATCH] accel: kvm: clarify that extra exit data is hexadecimal David Edmondson
  2021-04-28 16:03 ` Philippe Mathieu-Daudé
@ 2021-04-30 13:07 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-04-30 13:07 UTC (permalink / raw)
  To: David Edmondson, qemu-devel; +Cc: qemu-trivial, Paolo Bonzini, kvm

Le 28/04/2021 à 16:24, David Edmondson a écrit :
> 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>
> ---
>  accel/kvm/kvm-all.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
> index b6d9f92f15..93d7cbfeaf 100644
> --- a/accel/kvm/kvm-all.c
> +++ b/accel/kvm/kvm-all.c
> @@ -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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-30 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 14:24 [PATCH] accel: kvm: clarify that extra exit data is hexadecimal David Edmondson
2021-04-28 16:03 ` Philippe Mathieu-Daudé
2021-04-30 13:07 ` Laurent Vivier

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