hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
PATCH 1/1 hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
In commit 84d43d2e82da we rearranged the logging of errors in process_mapc(), and inadvertently dropped the trailing newlines from the log messages. Restore them.
--- hw/intc/arm_gicv3_its.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/intc/arm_gicv3_its.c +2 -2
@@ -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 ; }
Signature · 1 line
2.25.1
Quoted 15 lines · Peter Maydell
In commit
84d43d2e82dawe rearranged the logging of errors inprocess_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 <[email protected]>--- hw/intc/arm_gicv3_its.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/intc/arm_gicv3_its.c +0
-0
hw/intc/arm_gicv3_its.c static ItsCmdResult process_mapc(GICv3ITSState *s, const uint64_t *cmdpkt) · line 527
Quoted 5 lines
hw/intc/arm_gicv3_its.c +1
-1@@ -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)
Quoted 9 lines
hw/intc/arm_gicv3_its.c +1
-1return 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 ; }
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Peter Maydell
In commit
84d43d2e82dawe rearranged the logging of errors inprocess_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 <[email protected]>---
hw/intc/arm_gicv3_its.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines
hw/intc/arm_gicv3_its.c static ItsCmdResult process_mapc(GICv3ITSState *s, const uint64_t · line 527
Quoted 10 lines
hw/intc/arm_gicv3_its.c +1
-1@@ -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~
Quoted 27 lines · Richard Henderson
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Peter Maydell
In commit
84d43d2e82dawe rearranged the logging of errors inprocess_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 <[email protected]>---
hw/intc/arm_gicv3_its.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)Quoted 14 lines
hw/intc/arm_gicv3_its.c static ItsCmdResult process_mapc(GICv3ITSState · line 529
Quoted 12 lines
hw/intc/arm_gicv3_its.c +1
-1@@ -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)
Quoted 2 lines
Worse than that: 0x%d is going to be *very* misleading. Should fix to 0x%x right away.
Triple review is helpful :)
Quoted 16 lines · Peter Maydell
In commit
84d43d2e82dawe rearranged the logging of errors inprocess_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 <[email protected]>--- hw/intc/arm_gicv3_its.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/intc/arm_gicv3_its.c +0
-0@@ -524,12 +524,12 @@ static ItsCmdResult process_mapc(GICv3ITSState *s, const uint64_t *cmdpkt)trace_gicv3_its_cmd_mapc (icid, cte.rdbase, cte.valid);
hw/intc/arm_gicv3_its.c static ItsCmdResult process_mapc(GICv3ITSState *s, const uint64_t *cmdpkt) · line 532
Quoted 10 lines
hw/intc/arm_gicv3_its.c +2
-2if (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,
r~