qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 03/11] target/mips: Create report_fault for semihosting


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v4 03/11] target/mips: Create report_fault for semihosting
Date: Fri, 10 Jun 2022 17:05:57 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

Hi Richard,

On 8/6/22 07:19, Richard Henderson wrote:
The UHI specification does not have an EFAULT value,
and further specifies that "undefined UHI operations
should not return control to the target".

So, log the error and abort.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  target/mips/tcg/sysemu/mips-semi.c | 33 ++++++++++++++----------------
  1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/target/mips/tcg/sysemu/mips-semi.c 
b/target/mips/tcg/sysemu/mips-semi.c
index 2a039baf4c..33221444e1 100644
--- a/target/mips/tcg/sysemu/mips-semi.c
+++ b/target/mips/tcg/sysemu/mips-semi.c
@@ -114,6 +114,13 @@ enum UHIErrno {
      UHI_EXDEV           = 18,
  };
+static void report_fault(CPUMIPSState *env)
+{
+    int op = env->active_tc.gpr[25];
+    error_report("Fault during UHI operation %d", op);
+    abort();

This is a guest error, no need to debug QEMU internals...
Can we simply exit(1) instead?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]