Skip to contentSkip to conversation

xlnx_dp: drop unsupported AUXCommand in xlnx_dp_aux_set_command

PATCH Applied Qiang Liu 4 participants 4 messages Aug 8, 2022

lore
Share & tools
lore

Qiang Liu

author
#0 lore raw

PATCH 1/1 xlnx_dp: drop unsupported AUXCommand in xlnx_dp_aux_set_command

In xlnx_dp_aux_set_command, when the command leads to the default branch, xlxn-dp will abort and then crash.

This patch removes this abort and drops this operation.

Fixes 58ac482 ("introduce xlnx-dp")

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/411

---
 hw/display/xlnx_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/display/xlnx_dp.c +2 -2
index a071c81..b0828d6 100644
@@ -532,8 +532,8 @@ static void xlnx_dp_aux_set_command(XlnxDPState *s, uint32_t value)
         qemu_log_mask(LOG_UNIMP, "xlnx_dp: Write i2c status not implemented\n");
         break;
     default:
-        error_report("%s: invalid command: %u", __func__, cmd);
-        abort();
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid command: %u", __func__, cmd);
+        return;
     }
 
     s->core_registers[DP_INTERRUPT_SIGNAL_STATE] |= 0x04;
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · Qiang Liu

In xlnx_dp_aux_set_command, when the command leads to the default branch, xlxn-dp will abort and then crash.

This patch removes this abort and drops this operation.

Fixes 58ac482 ("introduce xlnx-dp")

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/411

---
  hw/display/xlnx_dp.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
hw/display/xlnx_dp.c +0 -0
index a071c81..b0828d6 100644

hw/display/xlnx_dp.c static void xlnx_dp_aux_set_command(XlnxDPState *s, uint32_t value) · line 539

Quoted 10 lines
hw/display/xlnx_dp.c +2 -2
@@ -532,8 +532,8 @@ static void xlnx_dp_aux_set_command(XlnxDPState *s, uint32_t value)
          qemu_log_mask(LOG_UNIMP, "xlnx_dp: Write i2c status not implemented\n");
          break;
      default:
-        error_report("%s: invalid command: %u", __func__, cmd);
-        abort();
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid command: %u", __func__, cmd);
+        return;
      }
 
      s->core_registers[DP_INTERRUPT_SIGNAL_STATE] |= 0x04;
#2 lore raw
In reply to Qiang Liu

Le 08/08/2022 à 10:01, Qiang Liu a écrit :

Quoted 20 lines

In xlnx_dp_aux_set_command, when the command leads to the default branch, xlxn-dp will abort and then crash.

This patch removes this abort and drops this operation.

Fixes 58ac482 ("introduce xlnx-dp")

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/411

---
  hw/display/xlnx_dp.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
hw/display/xlnx_dp.c +0 -0
index a071c81..b0828d6 100644

hw/display/xlnx_dp.c static void xlnx_dp_aux_set_command(XlnxDPState *s, uint32_t value) · line 539

Quoted 10 lines
hw/display/xlnx_dp.c +2 -2
@@ -532,8 +532,8 @@ static void xlnx_dp_aux_set_command(XlnxDPState *s, uint32_t value)
          qemu_log_mask(LOG_UNIMP, "xlnx_dp: Write i2c status not implemented\n");
          break;
      default:
-        error_report("%s: invalid command: %u", __func__, cmd);
-        abort();
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid command: %u", __func__, cmd);
+        return;
      }
 
      s->core_registers[DP_INTERRUPT_SIGNAL_STATE] |= 0x04;

Applied to my trivial-patches branch.

Thanks,
Laurent

Reviewed-by on v1 1/1
#3 lore raw
In reply to Qiang Liu
Quoted 4 lines · Qiang Liu

In xlnx_dp_aux_set_command, when the command leads to the default branch, xlxn-dp will abort and then crash.

Quoted 8 lines

This patch removes this abort and drops this operation.

Fixes 58ac482 ("introduce xlnx-dp")

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/411

Alistair

Quoted 23 lines
---
 hw/display/xlnx_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/display/xlnx_dp.c +2 -3
index a071c81..b0828d6 100644
@@ -532,8 +532,8 @@ static void xlnx_dp_aux_set_command(XlnxDPState *s, uint32_t value)
         qemu_log_mask(LOG_UNIMP, "xlnx_dp: Write i2c status not implemented\n");
         break;
     default:
-        error_report("%s: invalid command: %u", __func__, cmd);
-        abort();
+        qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid command: %u", __func__, cmd);
+        return;
     }
 
     s->core_registers[DP_INTERRUPT_SIGNAL_STATE] |= 0x04;
--

2.25.1