diff mbox series

target/i386: tracing: format length values as hex

Message ID 20201103100745.160409-1-dovmurik@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show
Series target/i386: tracing: format length values as hex | expand

Commit Message

Dov Murik Nov. 3, 2020, 10:07 a.m. UTC
Three trace events had a literal "0x" prefix but the 'len' values were
formatted in decimal base.  Keep the prefix and format the numbers as
hex, as is usually the case for length of memory regions.

Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
---
 target/i386/trace-events | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Philippe Mathieu-Daudé Nov. 3, 2020, 10:42 a.m. UTC | #1
On 11/3/20 11:07 AM, Dov Murik wrote:
> Three trace events had a literal "0x" prefix but the 'len' values were
> formatted in decimal base.  Keep the prefix and format the numbers as
> hex, as is usually the case for length of memory regions.
> 
> Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
> ---
>  target/i386/trace-events | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Dov Murik Dec. 9, 2020, 5:58 p.m. UTC | #2
ping

Adding CC qemu-trivial.

This already got one R-b:
https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg00525.html

-Dov


On 03/11/2020 12:07, Dov Murik wrote:
> Three trace events had a literal "0x" prefix but the 'len' values were
> formatted in decimal base.  Keep the prefix and format the numbers as
> hex, as is usually the case for length of memory regions.
> 
> Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
> ---
>   target/i386/trace-events | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/i386/trace-events b/target/i386/trace-events
> index 789c700d4a..65c9b0fdda 100644
> --- a/target/i386/trace-events
> +++ b/target/i386/trace-events
> @@ -8,10 +8,10 @@ kvm_x86_update_msi_routes(int num) "Updated %d MSI routes"
> 
>   # sev.c
>   kvm_sev_init(void) ""
> -kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zu"
> -kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zu"
> +kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zx"
> +kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zx"
>   kvm_sev_change_state(const char *old, const char *new) "%s -> %s"
>   kvm_sev_launch_start(int policy, void *session, void *pdh) "policy 0x%x session %p pdh %p"
> -kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIu64
> +kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIx64
>   kvm_sev_launch_measurement(const char *value) "data %s"
>   kvm_sev_launch_finish(void) ""
>
Laurent Vivier Dec. 13, 2020, 3:27 p.m. UTC | #3
Le 09/12/2020 à 18:58, Dov Murik a écrit :
> ping
> 
> Adding CC qemu-trivial.
> 
> This already got one R-b:
> https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg00525.html
> 
> -Dov
> 
> 
> On 03/11/2020 12:07, Dov Murik wrote:
>> Three trace events had a literal "0x" prefix but the 'len' values were
>> formatted in decimal base.  Keep the prefix and format the numbers as
>> hex, as is usually the case for length of memory regions.
>>
>> Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
>> ---
>>   target/i386/trace-events | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/target/i386/trace-events b/target/i386/trace-events
>> index 789c700d4a..65c9b0fdda 100644
>> --- a/target/i386/trace-events
>> +++ b/target/i386/trace-events
>> @@ -8,10 +8,10 @@ kvm_x86_update_msi_routes(int num) "Updated %d MSI routes"
>>
>>   # sev.c
>>   kvm_sev_init(void) ""
>> -kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zu"
>> -kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zu"
>> +kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zx"
>> +kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zx"
>>   kvm_sev_change_state(const char *old, const char *new) "%s -> %s"
>>   kvm_sev_launch_start(int policy, void *session, void *pdh) "policy 0x%x session %p pdh %p"
>> -kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIu64
>> +kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIx64
>>   kvm_sev_launch_measurement(const char *value) "data %s"
>>   kvm_sev_launch_finish(void) ""
>>
> 

Applied to my linux-user-for-6.0 branch.

Thanks,
Laurent
Laurent Vivier Dec. 13, 2020, 4:03 p.m. UTC | #4
Le 13/12/2020 à 16:27, Laurent Vivier a écrit :
> Le 09/12/2020 à 18:58, Dov Murik a écrit :
>> ping
>>
>> Adding CC qemu-trivial.
>>
>> This already got one R-b:
>> https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg00525.html
>>
>> -Dov
>>
>>
>> On 03/11/2020 12:07, Dov Murik wrote:
>>> Three trace events had a literal "0x" prefix but the 'len' values were
>>> formatted in decimal base.  Keep the prefix and format the numbers as
>>> hex, as is usually the case for length of memory regions.
>>>
>>> Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
>>> ---
>>>   target/i386/trace-events | 6 +++---
>>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/target/i386/trace-events b/target/i386/trace-events
>>> index 789c700d4a..65c9b0fdda 100644
>>> --- a/target/i386/trace-events
>>> +++ b/target/i386/trace-events
>>> @@ -8,10 +8,10 @@ kvm_x86_update_msi_routes(int num) "Updated %d MSI routes"
>>>
>>>   # sev.c
>>>   kvm_sev_init(void) ""
>>> -kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zu"
>>> -kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zu"
>>> +kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zx"
>>> +kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zx"
>>>   kvm_sev_change_state(const char *old, const char *new) "%s -> %s"
>>>   kvm_sev_launch_start(int policy, void *session, void *pdh) "policy 0x%x session %p pdh %p"
>>> -kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIu64
>>> +kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIx64
>>>   kvm_sev_launch_measurement(const char *value) "data %s"
>>>   kvm_sev_launch_finish(void) ""
>>>
>>
> 
> Applied to my linux-user-for-6.0 branch.

s/linux-user-for-6.0/trivial-patches/
diff mbox series

Patch

diff --git a/target/i386/trace-events b/target/i386/trace-events
index 789c700d4a..65c9b0fdda 100644
--- a/target/i386/trace-events
+++ b/target/i386/trace-events
@@ -8,10 +8,10 @@  kvm_x86_update_msi_routes(int num) "Updated %d MSI routes"
 
 # sev.c
 kvm_sev_init(void) ""
-kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zu"
-kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zu"
+kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zx"
+kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zx"
 kvm_sev_change_state(const char *old, const char *new) "%s -> %s"
 kvm_sev_launch_start(int policy, void *session, void *pdh) "policy 0x%x session %p pdh %p"
-kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIu64
+kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIx64
 kvm_sev_launch_measurement(const char *value) "data %s"
 kvm_sev_launch_finish(void) ""