Skip to contentSkip to conversation

hw/misc/virt_ctrl: Fix incorrect trace event in read operation

PATCH In review Kuan-Wei Chiu 2 participants 3 messages Jan 11 – Feb 22

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/misc/virt_ctrl: Fix incorrect trace event in read operation

The virt_ctrl_read() function currently invokes trace_virt_ctrl_write() instead of trace_virt_ctrl_read(). This results in read operations appearing as write operations in the trace output, which is misleading during debugging and analysis.

Replace the incorrect trace call with the proper read-specific trace event to accurately reflect the hardware behavior.

Fixes 0791bc02b8fb ("m68k: add a system controller")
---
 hw/misc/virt_ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/misc/virt_ctrl.c +1 -1
index 40747925a2..9b82e97ffd 100644
@@ -43,7 +43,7 @@ static uint64_t virt_ctrl_read(void *opaque, hwaddr addr, unsigned size)
         break;
     }
 
-    trace_virt_ctrl_write(s, addr, size, value);
+    trace_virt_ctrl_read(s, addr, size, value);
 
     return value;
 }
Signature · 1 line
2.52.0.457.g6b5491de43-goog
#1 lore raw

Hi Laurent,

Quoted 5 lines · Kuan-Wei Chiu

The virt_ctrl_read() function currently invokes trace_virt_ctrl_write() instead of trace_virt_ctrl_read(). This results in read operations appearing as write operations in the trace output, which is misleading during debugging and analysis.

Quoted 8 lines

Replace the incorrect trace call with the proper read-specific trace event to accurately reflect the hardware behavior.

Fixes 0791bc02b8fb ("m68k: add a system controller")
---
 hw/misc/virt_ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Any comments on this patch?

Regards,
Kuan-Wei

Quoted 17 lines
hw/misc/virt_ctrl.c +1 -1
index 40747925a2..9b82e97ffd 100644
@@ -43,7 +43,7 @@ static uint64_t virt_ctrl_read(void *opaque, hwaddr addr, unsigned size)
         break;
     }
 
-    trace_virt_ctrl_write(s, addr, size, value);
+    trace_virt_ctrl_read(s, addr, size, value);
 
     return value;
 }
Signature · 1 line
2.52.0.457.g6b5491de43-goog
Reviewed-by on v1 1/1
#2 lore raw
In reply to Kuan-Wei Chiu
Quoted 5 lines · Kuan-Wei Chiu

The virt_ctrl_read() function currently invokes trace_virt_ctrl_write() instead of trace_virt_ctrl_read(). This results in read operations appearing as write operations in the trace output, which is misleading during debugging and analysis.

Quoted 8 lines

Replace the incorrect trace call with the proper read-specific trace event to accurately reflect the hardware behavior.

Fixes 0791bc02b8fb ("m68k: add a system controller")
---
  hw/misc/virt_ctrl.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

And queued, thanks!