All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-7.0] hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
@ 2022-03-22 10:28 Peter Maydell
  2022-03-22 10:38 ` Philippe Mathieu-Daudé
  2022-03-22 15:00 ` Richard Henderson
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Maydell @ 2022-03-22 10:28 UTC (permalink / raw)
  To: qemu-arm, qemu-devel

In commit 84d43d2e82da we rearranged the logging of errors in
process_mapc(), and inadvertently dropped the trailing newlines
from the log messages. Restore them.

Fixes: 84d43d2e82da ("hw/intc/arm_gicv3_its: In MAPC with V=0, don't check rdbase field")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/intc/arm_gicv3_its.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c
index b96b874afdf..d9c741f5fdd 100644
--- a/hw/intc/arm_gicv3_its.c
+++ b/hw/intc/arm_gicv3_its.c
@@ -524,12 +524,12 @@ static ItsCmdResult process_mapc(GICv3ITSState *s, const uint64_t *cmdpkt)
     trace_gicv3_its_cmd_mapc(icid, cte.rdbase, cte.valid);
 
     if (icid >= s->ct.num_entries) {
-        qemu_log_mask(LOG_GUEST_ERROR, "ITS MAPC: invalid ICID 0x%d", icid);
+        qemu_log_mask(LOG_GUEST_ERROR, "ITS MAPC: invalid ICID 0x%d\n", icid);
         return CMD_CONTINUE;
     }
     if (cte.valid && cte.rdbase >= s->gicv3->num_cpu) {
         qemu_log_mask(LOG_GUEST_ERROR,
-                      "ITS MAPC: invalid RDBASE %u ", cte.rdbase);
+                      "ITS MAPC: invalid RDBASE %u\n", cte.rdbase);
         return CMD_CONTINUE;
     }
 
-- 
2.25.1



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

* Re: [PATCH for-7.0] hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
  2022-03-22 10:28 [PATCH for-7.0] hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging Peter Maydell
@ 2022-03-22 10:38 ` Philippe Mathieu-Daudé
  2022-03-22 14:58   ` Richard Henderson
  2022-03-22 15:00 ` Richard Henderson
  1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-22 10:38 UTC (permalink / raw)
  To: Peter Maydell, qemu-arm, qemu-devel

On 22/3/22 11:28, Peter Maydell wrote:
> In commit 84d43d2e82da we rearranged the logging of errors in
> process_mapc(), and inadvertently dropped the trailing newlines
> from the log messages. Restore them.
> 
> Fixes: 84d43d2e82da ("hw/intc/arm_gicv3_its: In MAPC with V=0, don't check rdbase field")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   hw/intc/arm_gicv3_its.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c
> index b96b874afdf..d9c741f5fdd 100644
> --- a/hw/intc/arm_gicv3_its.c
> +++ b/hw/intc/arm_gicv3_its.c
> @@ -524,12 +524,12 @@ static ItsCmdResult process_mapc(GICv3ITSState *s, const uint64_t *cmdpkt)
>       trace_gicv3_its_cmd_mapc(icid, cte.rdbase, cte.valid);
>   
>       if (icid >= s->ct.num_entries) {
> -        qemu_log_mask(LOG_GUEST_ERROR, "ITS MAPC: invalid ICID 0x%d", icid);
> +        qemu_log_mask(LOG_GUEST_ERROR, "ITS MAPC: invalid ICID 0x%d\n", icid);

(pre-existing: "%u" format, since icid is uint32_t)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

>           return CMD_CONTINUE;
>       }
>       if (cte.valid && cte.rdbase >= s->gicv3->num_cpu) {
>           qemu_log_mask(LOG_GUEST_ERROR,
> -                      "ITS MAPC: invalid RDBASE %u ", cte.rdbase);
> +                      "ITS MAPC: invalid RDBASE %u\n", cte.rdbase);
>           return CMD_CONTINUE;
>       }
>   



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

* Re: [PATCH for-7.0] hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
  2022-03-22 10:38 ` Philippe Mathieu-Daudé
@ 2022-03-22 14:58   ` Richard Henderson
  2022-03-22 19:03     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2022-03-22 14:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Peter Maydell, qemu-arm, qemu-devel

On 3/22/22 03:38, Philippe Mathieu-Daudé wrote:
> On 22/3/22 11:28, Peter Maydell wrote:
>> In commit 84d43d2e82da we rearranged the logging of errors in
>> process_mapc(), and inadvertently dropped the trailing newlines
>> from the log messages. Restore them.
>>
>> Fixes: 84d43d2e82da ("hw/intc/arm_gicv3_its: In MAPC with V=0, don't check rdbase field")
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>>   hw/intc/arm_gicv3_its.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c
>> index b96b874afdf..d9c741f5fdd 100644
>> --- a/hw/intc/arm_gicv3_its.c
>> +++ b/hw/intc/arm_gicv3_its.c
>> @@ -524,12 +524,12 @@ static ItsCmdResult process_mapc(GICv3ITSState *s, const uint64_t 
>> *cmdpkt)
>>       trace_gicv3_its_cmd_mapc(icid, cte.rdbase, cte.valid);
>>       if (icid >= s->ct.num_entries) {
>> -        qemu_log_mask(LOG_GUEST_ERROR, "ITS MAPC: invalid ICID 0x%d", icid);
>> +        qemu_log_mask(LOG_GUEST_ERROR, "ITS MAPC: invalid ICID 0x%d\n", icid);
> 
> (pre-existing: "%u" format, since icid is uint32_t)

Worse than that: 0x%d is going to be *very* misleading.
Should fix to 0x%x right away.


r~


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

* Re: [PATCH for-7.0] hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
  2022-03-22 10:28 [PATCH for-7.0] hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging Peter Maydell
  2022-03-22 10:38 ` Philippe Mathieu-Daudé
@ 2022-03-22 15:00 ` Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2022-03-22 15:00 UTC (permalink / raw)
  To: Peter Maydell, qemu-arm, qemu-devel

On 3/22/22 03:28, Peter Maydell wrote:
> In commit 84d43d2e82da we rearranged the logging of errors in
> process_mapc(), and inadvertently dropped the trailing newlines
> from the log messages. Restore them.
> 
> Fixes: 84d43d2e82da ("hw/intc/arm_gicv3_its: In MAPC with V=0, don't check rdbase field")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   hw/intc/arm_gicv3_its.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c
> index b96b874afdf..d9c741f5fdd 100644
> --- a/hw/intc/arm_gicv3_its.c
> +++ b/hw/intc/arm_gicv3_its.c
> @@ -524,12 +524,12 @@ static ItsCmdResult process_mapc(GICv3ITSState *s, const uint64_t *cmdpkt)
>       trace_gicv3_its_cmd_mapc(icid, cte.rdbase, cte.valid);
>   
>       if (icid >= s->ct.num_entries) {
> -        qemu_log_mask(LOG_GUEST_ERROR, "ITS MAPC: invalid ICID 0x%d", icid);
> +        qemu_log_mask(LOG_GUEST_ERROR, "ITS MAPC: invalid ICID 0x%d\n", icid);
>           return CMD_CONTINUE;
>       }
>       if (cte.valid && cte.rdbase >= s->gicv3->num_cpu) {
>           qemu_log_mask(LOG_GUEST_ERROR,
> -                      "ITS MAPC: invalid RDBASE %u ", cte.rdbase);
> +                      "ITS MAPC: invalid RDBASE %u\n", cte.rdbase);

Should fix %d as well, broken with the same patch, 84d43d2e82d.

With that,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


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

* Re: [PATCH for-7.0] hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
  2022-03-22 14:58   ` Richard Henderson
@ 2022-03-22 19:03     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-22 19:03 UTC (permalink / raw)
  To: Richard Henderson, Peter Maydell, qemu-arm, qemu-devel

On 22/3/22 15:58, Richard Henderson wrote:
> On 3/22/22 03:38, Philippe Mathieu-Daudé wrote:
>> On 22/3/22 11:28, Peter Maydell wrote:
>>> In commit 84d43d2e82da we rearranged the logging of errors in
>>> process_mapc(), and inadvertently dropped the trailing newlines
>>> from the log messages. Restore them.
>>>
>>> Fixes: 84d43d2e82da ("hw/intc/arm_gicv3_its: In MAPC with V=0, don't 
>>> check rdbase field")
>>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>> ---
>>>   hw/intc/arm_gicv3_its.c | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c
>>> index b96b874afdf..d9c741f5fdd 100644
>>> --- a/hw/intc/arm_gicv3_its.c
>>> +++ b/hw/intc/arm_gicv3_its.c
>>> @@ -524,12 +524,12 @@ static ItsCmdResult process_mapc(GICv3ITSState 
>>> *s, const uint64_t *cmdpkt)
>>>       trace_gicv3_its_cmd_mapc(icid, cte.rdbase, cte.valid);
>>>       if (icid >= s->ct.num_entries) {
>>> -        qemu_log_mask(LOG_GUEST_ERROR, "ITS MAPC: invalid ICID 
>>> 0x%d", icid);
>>> +        qemu_log_mask(LOG_GUEST_ERROR, "ITS MAPC: invalid ICID 
>>> 0x%d\n", icid);
>>
>> (pre-existing: "%u" format, since icid is uint32_t)
> 
> Worse than that: 0x%d is going to be *very* misleading.
> Should fix to 0x%x right away.

Triple review is helpful :)



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

end of thread, other threads:[~2022-03-22 19:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 10:28 [PATCH for-7.0] hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging Peter Maydell
2022-03-22 10:38 ` Philippe Mathieu-Daudé
2022-03-22 14:58   ` Richard Henderson
2022-03-22 19:03     ` Philippe Mathieu-Daudé
2022-03-22 15:00 ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.