All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/8] target/mips: semihosting cleanup
@ 2022-06-28 11:16 Richard Henderson
  2022-06-28 11:16 ` [PATCH v5 1/8] target/mips: Create report_fault for semihosting Richard Henderson
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Richard Henderson @ 2022-06-28 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: f4bug, alex.bennee, jiaxun.yang, aleksandar.rikalo

Changes for v5:
  * Rebase on master, which includes all prereq and patches 1-3.

Not changed: Existing behaviour for exceptional conditions is to
use abort().  During review, Phil suggested to change that, but
I think the exit status of WTERMSIG(SIGABRT) is better than
overloading exit(EXIT_FAILURE).


r~


Richard Henderson (8):
  target/mips: Create report_fault for semihosting
  target/mips: Drop link syscall from semihosting
  target/mips: Use semihosting/syscalls.h
  target/mips: Avoid qemu_semihosting_log_out for UHI_plog
  target/mips: Use error_report for UHI_assert
  semihosting: Remove qemu_semihosting_log_out
  target/mips: Simplify UHI_argnlen and UHI_argn
  target/mips: Remove GET_TARGET_STRING and FREE_TARGET_STRING

 include/semihosting/console.h      |  13 -
 semihosting/console.c              |   9 -
 target/mips/tcg/sysemu/mips-semi.c | 397 ++++++++++++++---------------
 3 files changed, 186 insertions(+), 233 deletions(-)

-- 
2.34.1



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

* [PATCH v5 1/8] target/mips: Create report_fault for semihosting
  2022-06-28 11:16 [PATCH v5 0/8] target/mips: semihosting cleanup Richard Henderson
@ 2022-06-28 11:16 ` Richard Henderson
  2022-07-12 20:23   ` Philippe Mathieu-Daudé via
  2022-06-28 11:16 ` [PATCH v5 2/8] target/mips: Drop link syscall from semihosting Richard Henderson
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Richard Henderson @ 2022-06-28 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: f4bug, alex.bennee, jiaxun.yang, aleksandar.rikalo

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 67c35fe7f9..153df1fa15 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();
+}
+
 static int errno_mips(int host_errno)
 {
     /* Errno values taken from asm-mips/errno.h */
@@ -136,8 +143,7 @@ static int copy_stat_to_target(CPUMIPSState *env, const struct stat *src,
     hwaddr len = sizeof(struct UHIStat);
     UHIStat *dst = lock_user(VERIFY_WRITE, vaddr, len, 0);
     if (!dst) {
-        errno = EFAULT;
-        return -1;
+        report_fault(env);
     }
 
     dst->uhi_st_dev = tswap16(src->st_dev);
@@ -188,8 +194,7 @@ static int write_to_file(CPUMIPSState *env, target_ulong fd,
     int num_of_bytes;
     void *dst = lock_user(VERIFY_READ, vaddr, len, 1);
     if (!dst) {
-        errno = EFAULT;
-        return -1;
+        report_fault(env);
     }
 
     num_of_bytes = write(fd, dst, len);
@@ -204,8 +209,7 @@ static int read_from_file(CPUMIPSState *env, target_ulong fd,
     int num_of_bytes;
     void *dst = lock_user(VERIFY_WRITE, vaddr, len, 0);
     if (!dst) {
-        errno = EFAULT;
-        return -1;
+        report_fault(env);
     }
 
     num_of_bytes = read(fd, dst, len);
@@ -220,7 +224,7 @@ static int copy_argn_to_target(CPUMIPSState *env, int arg_num,
     int strsize = strlen(semihosting_get_arg(arg_num)) + 1;
     char *dst = lock_user(VERIFY_WRITE, vaddr, strsize, 0);
     if (!dst) {
-        return -1;
+        report_fault(env);
     }
 
     strcpy(dst, semihosting_get_arg(arg_num));
@@ -233,9 +237,7 @@ static int copy_argn_to_target(CPUMIPSState *env, int arg_num,
     do {                                        \
         p = lock_user_string(addr);             \
         if (!p) {                               \
-            gpr[2] = -1;                        \
-            gpr[3] = EFAULT;                    \
-            return;                             \
+            report_fault(env);                  \
         }                                       \
     } while (0)
 
@@ -243,16 +245,11 @@ static int copy_argn_to_target(CPUMIPSState *env, int arg_num,
     do {                                                \
         p = lock_user_string(addr);                     \
         if (!p) {                                       \
-            gpr[2] = -1;                                \
-            gpr[3] = EFAULT;                            \
-            return;                                     \
+            report_fault(env);                          \
         }                                               \
         p2 = lock_user_string(addr2);                   \
         if (!p2) {                                      \
-            unlock_user(p, addr, 0);                    \
-            gpr[2] = -1;                                \
-            gpr[3] = EFAULT;                            \
-            return;                                     \
+            report_fault(env);                          \
         }                                               \
     } while (0)
 
@@ -375,7 +372,7 @@ void mips_semihosting(CPUMIPSState *env)
         break;
 #endif
     default:
-        fprintf(stderr, "Unknown UHI operation %d\n", op);
+        error_report("Unknown UHI operation %d", op);
         abort();
     }
     return;
-- 
2.34.1



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

* [PATCH v5 2/8] target/mips: Drop link syscall from semihosting
  2022-06-28 11:16 [PATCH v5 0/8] target/mips: semihosting cleanup Richard Henderson
  2022-06-28 11:16 ` [PATCH v5 1/8] target/mips: Create report_fault for semihosting Richard Henderson
@ 2022-06-28 11:16 ` Richard Henderson
  2022-07-12 20:19   ` Philippe Mathieu-Daudé via
  2022-06-28 11:16 ` [PATCH v5 3/8] target/mips: Use semihosting/syscalls.h Richard Henderson
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Richard Henderson @ 2022-06-28 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: f4bug, alex.bennee, jiaxun.yang, aleksandar.rikalo

We don't implement it with _WIN32 hosts, and the syscall
is missing from the gdb remote file i/o interface.
Since we can't implement it universally, drop it.

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

diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mips-semi.c
index 153df1fa15..93c9d3d0b3 100644
--- a/target/mips/tcg/sysemu/mips-semi.c
+++ b/target/mips/tcg/sysemu/mips-semi.c
@@ -362,15 +362,6 @@ void mips_semihosting(CPUMIPSState *env)
         FREE_TARGET_STRING(p, gpr[4]);
         abort();
         break;
-#ifndef _WIN32
-    case UHI_link:
-        GET_TARGET_STRINGS_2(p, gpr[4], p2, gpr[5]);
-        gpr[2] = link(p, p2);
-        gpr[3] = errno_mips(errno);
-        FREE_TARGET_STRING(p2, gpr[5]);
-        FREE_TARGET_STRING(p, gpr[4]);
-        break;
-#endif
     default:
         error_report("Unknown UHI operation %d", op);
         abort();
-- 
2.34.1



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

* [PATCH v5 3/8] target/mips: Use semihosting/syscalls.h
  2022-06-28 11:16 [PATCH v5 0/8] target/mips: semihosting cleanup Richard Henderson
  2022-06-28 11:16 ` [PATCH v5 1/8] target/mips: Create report_fault for semihosting Richard Henderson
  2022-06-28 11:16 ` [PATCH v5 2/8] target/mips: Drop link syscall from semihosting Richard Henderson
@ 2022-06-28 11:16 ` Richard Henderson
  2022-07-12 20:21   ` Philippe Mathieu-Daudé via
  2022-07-12 20:25   ` Philippe Mathieu-Daudé via
  2022-06-28 11:16 ` [PATCH v5 4/8] target/mips: Avoid qemu_semihosting_log_out for UHI_plog Richard Henderson
                   ` (5 subsequent siblings)
  8 siblings, 2 replies; 17+ messages in thread
From: Richard Henderson @ 2022-06-28 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: f4bug, alex.bennee, jiaxun.yang, aleksandar.rikalo

This separates guest file descriptors from host file descriptors,
and utilizes shared infrastructure for integration with gdbstub.

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

diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mips-semi.c
index 93c9d3d0b3..5b78cf21a7 100644
--- a/target/mips/tcg/sysemu/mips-semi.c
+++ b/target/mips/tcg/sysemu/mips-semi.c
@@ -20,9 +20,11 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "qemu/log.h"
+#include "exec/gdbstub.h"
 #include "semihosting/softmmu-uaccess.h"
 #include "semihosting/semihost.h"
 #include "semihosting/console.h"
+#include "semihosting/syscalls.h"
 #include "internal.h"
 
 typedef enum UHIOp {
@@ -121,101 +123,79 @@ static void report_fault(CPUMIPSState *env)
     abort();
 }
 
-static int errno_mips(int host_errno)
+static void uhi_cb(CPUState *cs, uint64_t ret, int err)
 {
-    /* Errno values taken from asm-mips/errno.h */
-    switch (host_errno) {
-    case 0:             return 0;
-    case ENAMETOOLONG:  return 78;
-#ifdef EOVERFLOW
-    case EOVERFLOW:     return 79;
-#endif
-#ifdef ELOOP
-    case ELOOP:         return 90;
-#endif
-    default:            return EINVAL;
-    }
-}
+    CPUMIPSState *env = cs->env_ptr;
 
-static int copy_stat_to_target(CPUMIPSState *env, const struct stat *src,
-                               target_ulong vaddr)
-{
-    hwaddr len = sizeof(struct UHIStat);
-    UHIStat *dst = lock_user(VERIFY_WRITE, vaddr, len, 0);
-    if (!dst) {
+#define E(N) case E##N: err = UHI_E##N; break
+
+    switch (err) {
+    case 0:
+        break;
+    E(PERM);
+    E(NOENT);
+    E(INTR);
+    E(BADF);
+    E(BUSY);
+    E(EXIST);
+    E(NOTDIR);
+    E(ISDIR);
+    E(INVAL);
+    E(NFILE);
+    E(MFILE);
+    E(FBIG);
+    E(NOSPC);
+    E(SPIPE);
+    E(ROFS);
+    E(NAMETOOLONG);
+    default:
+        err = UHI_EINVAL;
+        break;
+    case EFAULT:
         report_fault(env);
     }
 
-    dst->uhi_st_dev = tswap16(src->st_dev);
-    dst->uhi_st_ino = tswap16(src->st_ino);
-    dst->uhi_st_mode = tswap32(src->st_mode);
-    dst->uhi_st_nlink = tswap16(src->st_nlink);
-    dst->uhi_st_uid = tswap16(src->st_uid);
-    dst->uhi_st_gid = tswap16(src->st_gid);
-    dst->uhi_st_rdev = tswap16(src->st_rdev);
-    dst->uhi_st_size = tswap64(src->st_size);
-    dst->uhi_st_atime = tswap64(src->st_atime);
-    dst->uhi_st_mtime = tswap64(src->st_mtime);
-    dst->uhi_st_ctime = tswap64(src->st_ctime);
-#ifdef _WIN32
-    dst->uhi_st_blksize = 0;
-    dst->uhi_st_blocks = 0;
-#else
-    dst->uhi_st_blksize = tswap64(src->st_blksize);
-    dst->uhi_st_blocks = tswap64(src->st_blocks);
-#endif
-    unlock_user(dst, vaddr, len);
-    return 0;
+#undef E
+
+    env->active_tc.gpr[2] = ret;
+    env->active_tc.gpr[3] = err;
 }
 
-static int get_open_flags(target_ulong target_flags)
+static void uhi_fstat_cb(CPUState *cs, uint64_t ret, int err)
 {
-    int open_flags = 0;
+    QEMU_BUILD_BUG_ON(sizeof(UHIStat) < sizeof(struct gdb_stat));
 
-    if (target_flags & UHIOpen_RDWR) {
-        open_flags |= O_RDWR;
-    } else if (target_flags & UHIOpen_WRONLY) {
-        open_flags |= O_WRONLY;
-    } else {
-        open_flags |= O_RDONLY;
+    if (!err) {
+        CPUMIPSState *env = cs->env_ptr;
+        target_ulong addr = env->active_tc.gpr[5];
+        UHIStat *dst = lock_user(VERIFY_WRITE, addr, sizeof(UHIStat), 1);
+        struct gdb_stat s;
+
+        if (!dst) {
+            report_fault(env);
+        }
+
+        memcpy(&s, dst, sizeof(struct gdb_stat));
+        memset(dst, 0, sizeof(UHIStat));
+
+        dst->uhi_st_dev = tswap16(be32_to_cpu(s.gdb_st_dev));
+        dst->uhi_st_ino = tswap16(be32_to_cpu(s.gdb_st_ino));
+        dst->uhi_st_mode = tswap32(be32_to_cpu(s.gdb_st_mode));
+        dst->uhi_st_nlink = tswap16(be32_to_cpu(s.gdb_st_nlink));
+        dst->uhi_st_uid = tswap16(be32_to_cpu(s.gdb_st_uid));
+        dst->uhi_st_gid = tswap16(be32_to_cpu(s.gdb_st_gid));
+        dst->uhi_st_rdev = tswap16(be32_to_cpu(s.gdb_st_rdev));
+        dst->uhi_st_size = tswap64(be64_to_cpu(s.gdb_st_size));
+        dst->uhi_st_atime = tswap64(be32_to_cpu(s.gdb_st_atime));
+        dst->uhi_st_mtime = tswap64(be32_to_cpu(s.gdb_st_mtime));
+        dst->uhi_st_ctime = tswap64(be32_to_cpu(s.gdb_st_ctime));
+        dst->uhi_st_blksize = tswap64(be64_to_cpu(s.gdb_st_blksize));
+        dst->uhi_st_blocks = tswap64(be64_to_cpu(s.gdb_st_blocks));
+
+        unlock_user(dst, addr, sizeof(UHIStat));
     }
 
-    open_flags |= (target_flags & UHIOpen_APPEND) ? O_APPEND : 0;
-    open_flags |= (target_flags & UHIOpen_CREAT)  ? O_CREAT  : 0;
-    open_flags |= (target_flags & UHIOpen_TRUNC)  ? O_TRUNC  : 0;
-    open_flags |= (target_flags & UHIOpen_EXCL)   ? O_EXCL   : 0;
-
-    return open_flags;
-}
-
-static int write_to_file(CPUMIPSState *env, target_ulong fd,
-                         target_ulong vaddr, target_ulong len)
-{
-    int num_of_bytes;
-    void *dst = lock_user(VERIFY_READ, vaddr, len, 1);
-    if (!dst) {
-        report_fault(env);
-    }
-
-    num_of_bytes = write(fd, dst, len);
-
-    unlock_user(dst, vaddr, 0);
-    return num_of_bytes;
-}
-
-static int read_from_file(CPUMIPSState *env, target_ulong fd,
-                          target_ulong vaddr, target_ulong len)
-{
-    int num_of_bytes;
-    void *dst = lock_user(VERIFY_WRITE, vaddr, len, 0);
-    if (!dst) {
-        report_fault(env);
-    }
-
-    num_of_bytes = read(fd, dst, len);
-
-    unlock_user(dst, vaddr, len);
-    return num_of_bytes;
+    uhi_cb(cs, ret, err);
 }
 
 static int copy_argn_to_target(CPUMIPSState *env, int arg_num,
@@ -260,68 +240,59 @@ static int copy_argn_to_target(CPUMIPSState *env, int arg_num,
 
 void mips_semihosting(CPUMIPSState *env)
 {
+    CPUState *cs = env_cpu(env);
     target_ulong *gpr = env->active_tc.gpr;
     const UHIOp op = gpr[25];
     char *p, *p2;
 
     switch (op) {
     case UHI_exit:
-        qemu_log("UHI(%d): exit(%d)\n", op, (int)gpr[4]);
+        gdb_exit(gpr[4]);
         exit(gpr[4]);
+
     case UHI_open:
-        GET_TARGET_STRING(p, gpr[4]);
-        if (!strcmp("/dev/stdin", p)) {
-            gpr[2] = 0;
-        } else if (!strcmp("/dev/stdout", p)) {
-            gpr[2] = 1;
-        } else if (!strcmp("/dev/stderr", p)) {
-            gpr[2] = 2;
-        } else {
-            gpr[2] = open(p, get_open_flags(gpr[5]), gpr[6]);
-            gpr[3] = errno_mips(errno);
+        {
+            int ret = -1;
+
+            GET_TARGET_STRING(p, gpr[4]);
+            if (!strcmp("/dev/stdin", p)) {
+                ret = 0;
+            } else if (!strcmp("/dev/stdout", p)) {
+                ret = 1;
+            } else if (!strcmp("/dev/stderr", p)) {
+                ret = 2;
+            }
+            FREE_TARGET_STRING(p, gpr[4]);
+
+            /* FIXME: reusing a guest fd doesn't seem correct. */
+            if (ret >= 0) {
+                gpr[2] = ret;
+                break;
+            }
+
+            semihost_sys_open(cs, uhi_cb, gpr[4], 0, gpr[5], gpr[6]);
         }
-        FREE_TARGET_STRING(p, gpr[4]);
         break;
+
     case UHI_close:
-        if (gpr[4] < 3) {
-            /* ignore closing stdin/stdout/stderr */
-            gpr[2] = 0;
-            return;
-        }
-        gpr[2] = close(gpr[4]);
-        gpr[3] = errno_mips(errno);
+        semihost_sys_close(cs, uhi_cb, gpr[4]);
         break;
     case UHI_read:
-        gpr[2] = read_from_file(env, gpr[4], gpr[5], gpr[6]);
-        gpr[3] = errno_mips(errno);
+        semihost_sys_read(cs, uhi_cb, gpr[4], gpr[5], gpr[6]);
         break;
     case UHI_write:
-        gpr[2] = write_to_file(env, gpr[4], gpr[5], gpr[6]);
-        gpr[3] = errno_mips(errno);
+        semihost_sys_write(cs, uhi_cb, gpr[4], gpr[5], gpr[6]);
         break;
     case UHI_lseek:
-        gpr[2] = lseek(gpr[4], gpr[5], gpr[6]);
-        gpr[3] = errno_mips(errno);
+        semihost_sys_lseek(cs, uhi_cb, gpr[4], gpr[5], gpr[6]);
         break;
     case UHI_unlink:
-        GET_TARGET_STRING(p, gpr[4]);
-        gpr[2] = remove(p);
-        gpr[3] = errno_mips(errno);
-        FREE_TARGET_STRING(p, gpr[4]);
+        semihost_sys_remove(cs, uhi_cb, gpr[4], 0);
         break;
     case UHI_fstat:
-        {
-            struct stat sbuf;
-            memset(&sbuf, 0, sizeof(sbuf));
-            gpr[2] = fstat(gpr[4], &sbuf);
-            gpr[3] = errno_mips(errno);
-            if (gpr[2]) {
-                return;
-            }
-            gpr[2] = copy_stat_to_target(env, &sbuf, gpr[5]);
-            gpr[3] = errno_mips(errno);
-        }
+        semihost_sys_fstat(cs, uhi_fstat_cb, gpr[4], gpr[5]);
         break;
+
     case UHI_argc:
         gpr[2] = semihosting_get_argc();
         break;
-- 
2.34.1



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

* [PATCH v5 4/8] target/mips: Avoid qemu_semihosting_log_out for UHI_plog
  2022-06-28 11:16 [PATCH v5 0/8] target/mips: semihosting cleanup Richard Henderson
                   ` (2 preceding siblings ...)
  2022-06-28 11:16 ` [PATCH v5 3/8] target/mips: Use semihosting/syscalls.h Richard Henderson
@ 2022-06-28 11:16 ` Richard Henderson
  2022-07-12 20:25   ` Philippe Mathieu-Daudé via
  2022-06-28 11:16 ` [PATCH v5 5/8] target/mips: Use error_report for UHI_assert Richard Henderson
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Richard Henderson @ 2022-06-28 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: f4bug, alex.bennee, jiaxun.yang, aleksandar.rikalo

Use semihost_sys_write and/or qemu_semihosting_console_write
for implementing plog.  When using gdbstub, copy the temp
string below the stack so that gdb has a guest address from
which to perform the log.

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

diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mips-semi.c
index 5b78cf21a7..ad11a46820 100644
--- a/target/mips/tcg/sysemu/mips-semi.c
+++ b/target/mips/tcg/sysemu/mips-semi.c
@@ -310,20 +310,50 @@ void mips_semihosting(CPUMIPSState *env)
         }
         gpr[2] = copy_argn_to_target(env, gpr[4], gpr[5]);
         break;
+
     case UHI_plog:
-        GET_TARGET_STRING(p, gpr[4]);
-        p2 = strstr(p, "%d");
-        if (p2) {
-            int char_num = p2 - p;
-            GString *s = g_string_new_len(p, char_num);
-            g_string_append_printf(s, "%d%s", (int)gpr[5], p2 + 2);
-            gpr[2] = qemu_semihosting_log_out(s->str, s->len);
-            g_string_free(s, true);
-        } else {
-            gpr[2] = qemu_semihosting_log_out(p, strlen(p));
+        {
+            target_ulong addr = gpr[4];
+            ssize_t len = target_strlen(addr);
+            GString *str;
+            char *pct_d;
+
+            if (len < 0) {
+                report_fault(env);
+            }
+            p = lock_user(VERIFY_READ, addr, len, 1);
+            if (!p) {
+                report_fault(env);
+            }
+
+            pct_d = strstr(p, "%d");
+            if (!pct_d) {
+                FREE_TARGET_STRING(p, addr);
+                semihost_sys_write(cs, uhi_cb, 2, addr, len);
+                break;
+            }
+
+            str = g_string_new_len(p, pct_d - p);
+            g_string_append_printf(str, "%d%s", (int)gpr[5], pct_d + 2);
+            FREE_TARGET_STRING(p, addr);
+
+            /*
+             * When we're using gdb, we need a guest address, so
+             * drop the string onto the stack below the stack pointer.
+             */
+            if (use_gdb_syscalls()) {
+                addr = gpr[29] - str->len;
+                p = lock_user(VERIFY_WRITE, addr, str->len, 0);
+                memcpy(p, str->str, str->len);
+                unlock_user(p, addr, str->len);
+                semihost_sys_write(cs, uhi_cb, 2, addr, str->len);
+            } else {
+                gpr[2] = qemu_semihosting_console_write(str->str, str->len);
+            }
+            g_string_free(str, true);
         }
-        FREE_TARGET_STRING(p, gpr[4]);
         break;
+
     case UHI_assert:
         GET_TARGET_STRINGS_2(p, gpr[4], p2, gpr[5]);
         printf("assertion '");
-- 
2.34.1



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

* [PATCH v5 5/8] target/mips: Use error_report for UHI_assert
  2022-06-28 11:16 [PATCH v5 0/8] target/mips: semihosting cleanup Richard Henderson
                   ` (3 preceding siblings ...)
  2022-06-28 11:16 ` [PATCH v5 4/8] target/mips: Avoid qemu_semihosting_log_out for UHI_plog Richard Henderson
@ 2022-06-28 11:16 ` Richard Henderson
  2022-07-12 20:22   ` Philippe Mathieu-Daudé via
  2022-06-28 11:16 ` [PATCH v5 6/8] semihosting: Remove qemu_semihosting_log_out Richard Henderson
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Richard Henderson @ 2022-06-28 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: f4bug, alex.bennee, jiaxun.yang, aleksandar.rikalo

Always log the assert locally.  Do not report_fault, but
instead include the fact of the fault in the assertion.
Don't bother freeing allocated strings before the abort().

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

diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mips-semi.c
index ad11a46820..ae4b8849b1 100644
--- a/target/mips/tcg/sysemu/mips-semi.c
+++ b/target/mips/tcg/sysemu/mips-semi.c
@@ -221,18 +221,6 @@ static int copy_argn_to_target(CPUMIPSState *env, int arg_num,
         }                                       \
     } while (0)
 
-#define GET_TARGET_STRINGS_2(p, addr, p2, addr2)        \
-    do {                                                \
-        p = lock_user_string(addr);                     \
-        if (!p) {                                       \
-            report_fault(env);                          \
-        }                                               \
-        p2 = lock_user_string(addr2);                   \
-        if (!p2) {                                      \
-            report_fault(env);                          \
-        }                                               \
-    } while (0)
-
 #define FREE_TARGET_STRING(p, gpr)              \
     do {                                        \
         unlock_user(p, gpr, 0);                 \
@@ -243,7 +231,7 @@ void mips_semihosting(CPUMIPSState *env)
     CPUState *cs = env_cpu(env);
     target_ulong *gpr = env->active_tc.gpr;
     const UHIOp op = gpr[25];
-    char *p, *p2;
+    char *p;
 
     switch (op) {
     case UHI_exit:
@@ -355,14 +343,23 @@ void mips_semihosting(CPUMIPSState *env)
         break;
 
     case UHI_assert:
-        GET_TARGET_STRINGS_2(p, gpr[4], p2, gpr[5]);
-        printf("assertion '");
-        printf("\"%s\"", p);
-        printf("': file \"%s\", line %d\n", p2, (int)gpr[6]);
-        FREE_TARGET_STRING(p2, gpr[5]);
-        FREE_TARGET_STRING(p, gpr[4]);
-        abort();
-        break;
+        {
+            const char *msg, *file;
+
+            msg = lock_user_string(gpr[4]);
+            if (!msg) {
+                msg = "<EFAULT>";
+            }
+            file = lock_user_string(gpr[5]);
+            if (!file) {
+                file = "<EFAULT>";
+            }
+
+            error_report("UHI assertion \"%s\": file \"%s\", line %d",
+                         msg, file, (int)gpr[6]);
+            abort();
+        }
+
     default:
         error_report("Unknown UHI operation %d", op);
         abort();
-- 
2.34.1



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

* [PATCH v5 6/8] semihosting: Remove qemu_semihosting_log_out
  2022-06-28 11:16 [PATCH v5 0/8] target/mips: semihosting cleanup Richard Henderson
                   ` (4 preceding siblings ...)
  2022-06-28 11:16 ` [PATCH v5 5/8] target/mips: Use error_report for UHI_assert Richard Henderson
@ 2022-06-28 11:16 ` Richard Henderson
  2022-06-28 11:17 ` [PATCH v5 7/8] target/mips: Simplify UHI_argnlen and UHI_argn Richard Henderson
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Richard Henderson @ 2022-06-28 11:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: f4bug, alex.bennee, jiaxun.yang, aleksandar.rikalo

The function is no longer used.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 include/semihosting/console.h | 13 -------------
 semihosting/console.c         |  9 ---------
 2 files changed, 22 deletions(-)

diff --git a/include/semihosting/console.h b/include/semihosting/console.h
index 61b0cb3a94..bd78e5f03f 100644
--- a/include/semihosting/console.h
+++ b/include/semihosting/console.h
@@ -40,19 +40,6 @@ int qemu_semihosting_console_read(CPUState *cs, void *buf, int len);
  */
 int qemu_semihosting_console_write(void *buf, int len);
 
-/**
- * qemu_semihosting_log_out:
- * @s: pointer to string
- * @len: length of string
- *
- * Send a string to the debug output. Unlike console_out these strings
- * can't be sent to a remote gdb instance as they don't exist in guest
- * memory.
- *
- * Returns: number of bytes written
- */
-int qemu_semihosting_log_out(const char *s, int len);
-
 /*
  * qemu_semihosting_console_block_until_ready:
  * @cs: CPUState
diff --git a/semihosting/console.c b/semihosting/console.c
index cda7cf1905..5b1ec0a1c3 100644
--- a/semihosting/console.c
+++ b/semihosting/console.c
@@ -38,15 +38,6 @@ typedef struct SemihostingConsole {
 
 static SemihostingConsole console;
 
-int qemu_semihosting_log_out(const char *s, int len)
-{
-    if (console.chr) {
-        return qemu_chr_write_all(console.chr, (uint8_t *) s, len);
-    } else {
-        return write(STDERR_FILENO, s, len);
-    }
-}
-
 #define FIFO_SIZE   1024
 
 static int console_can_read(void *opaque)
-- 
2.34.1



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

* [PATCH v5 7/8] target/mips: Simplify UHI_argnlen and UHI_argn
  2022-06-28 11:16 [PATCH v5 0/8] target/mips: semihosting cleanup Richard Henderson
                   ` (5 preceding siblings ...)
  2022-06-28 11:16 ` [PATCH v5 6/8] semihosting: Remove qemu_semihosting_log_out Richard Henderson
@ 2022-06-28 11:17 ` Richard Henderson
  2022-07-12 20:22   ` Philippe Mathieu-Daudé via
  2022-06-28 11:17 ` [PATCH v5 8/8] target/mips: Remove GET_TARGET_STRING and FREE_TARGET_STRING Richard Henderson
  2022-07-12 20:25 ` [PATCH v5 0/8] target/mips: semihosting cleanup Philippe Mathieu-Daudé via
  8 siblings, 1 reply; 17+ messages in thread
From: Richard Henderson @ 2022-06-28 11:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: f4bug, alex.bennee, jiaxun.yang, aleksandar.rikalo

With semihosting_get_arg, we already have a check vs argc, so
there's no point replicating it -- just check the result vs NULL.
Merge copy_argn_to_target into its caller.

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

diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mips-semi.c
index ae4b8849b1..b54267681e 100644
--- a/target/mips/tcg/sysemu/mips-semi.c
+++ b/target/mips/tcg/sysemu/mips-semi.c
@@ -198,21 +198,6 @@ static void uhi_fstat_cb(CPUState *cs, uint64_t ret, int err)
     uhi_cb(cs, ret, err);
 }
 
-static int copy_argn_to_target(CPUMIPSState *env, int arg_num,
-                               target_ulong vaddr)
-{
-    int strsize = strlen(semihosting_get_arg(arg_num)) + 1;
-    char *dst = lock_user(VERIFY_WRITE, vaddr, strsize, 0);
-    if (!dst) {
-        report_fault(env);
-    }
-
-    strcpy(dst, semihosting_get_arg(arg_num));
-
-    unlock_user(dst, vaddr, strsize);
-    return 0;
-}
-
 #define GET_TARGET_STRING(p, addr)              \
     do {                                        \
         p = lock_user_string(addr);             \
@@ -285,18 +270,31 @@ void mips_semihosting(CPUMIPSState *env)
         gpr[2] = semihosting_get_argc();
         break;
     case UHI_argnlen:
-        if (gpr[4] >= semihosting_get_argc()) {
-            gpr[2] = -1;
-            return;
+        {
+            const char *s = semihosting_get_arg(gpr[4]);
+            gpr[2] = s ? strlen(s) : -1;
         }
-        gpr[2] = strlen(semihosting_get_arg(gpr[4]));
         break;
     case UHI_argn:
-        if (gpr[4] >= semihosting_get_argc()) {
-            gpr[2] = -1;
-            return;
+        {
+            const char *s = semihosting_get_arg(gpr[4]);
+            target_ulong addr;
+            size_t len;
+
+            if (!s) {
+                gpr[2] = -1;
+                break;
+            }
+            len = strlen(s) + 1;
+            addr = gpr[5];
+            p = lock_user(VERIFY_WRITE, addr, len, 0);
+            if (!p) {
+                report_fault(env);
+            }
+            memcpy(p, s, len);
+            unlock_user(p, addr, len);
+            gpr[2] = 0;
         }
-        gpr[2] = copy_argn_to_target(env, gpr[4], gpr[5]);
         break;
 
     case UHI_plog:
-- 
2.34.1



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

* [PATCH v5 8/8] target/mips: Remove GET_TARGET_STRING and FREE_TARGET_STRING
  2022-06-28 11:16 [PATCH v5 0/8] target/mips: semihosting cleanup Richard Henderson
                   ` (6 preceding siblings ...)
  2022-06-28 11:17 ` [PATCH v5 7/8] target/mips: Simplify UHI_argnlen and UHI_argn Richard Henderson
@ 2022-06-28 11:17 ` Richard Henderson
  2022-07-12 20:25 ` [PATCH v5 0/8] target/mips: semihosting cleanup Philippe Mathieu-Daudé via
  8 siblings, 0 replies; 17+ messages in thread
From: Richard Henderson @ 2022-06-28 11:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: f4bug, alex.bennee, jiaxun.yang, aleksandar.rikalo

Inline these macros into the only two callers.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/mips/tcg/sysemu/mips-semi.c | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mips-semi.c
index b54267681e..5fb1ad9092 100644
--- a/target/mips/tcg/sysemu/mips-semi.c
+++ b/target/mips/tcg/sysemu/mips-semi.c
@@ -198,19 +198,6 @@ static void uhi_fstat_cb(CPUState *cs, uint64_t ret, int err)
     uhi_cb(cs, ret, err);
 }
 
-#define GET_TARGET_STRING(p, addr)              \
-    do {                                        \
-        p = lock_user_string(addr);             \
-        if (!p) {                               \
-            report_fault(env);                  \
-        }                                       \
-    } while (0)
-
-#define FREE_TARGET_STRING(p, gpr)              \
-    do {                                        \
-        unlock_user(p, gpr, 0);                 \
-    } while (0)
-
 void mips_semihosting(CPUMIPSState *env)
 {
     CPUState *cs = env_cpu(env);
@@ -225,9 +212,13 @@ void mips_semihosting(CPUMIPSState *env)
 
     case UHI_open:
         {
+            target_ulong fname = gpr[4];
             int ret = -1;
 
-            GET_TARGET_STRING(p, gpr[4]);
+            p = lock_user_string(fname);
+            if (!p) {
+                report_fault(env);
+            }
             if (!strcmp("/dev/stdin", p)) {
                 ret = 0;
             } else if (!strcmp("/dev/stdout", p)) {
@@ -235,7 +226,7 @@ void mips_semihosting(CPUMIPSState *env)
             } else if (!strcmp("/dev/stderr", p)) {
                 ret = 2;
             }
-            FREE_TARGET_STRING(p, gpr[4]);
+            unlock_user(p, fname, 0);
 
             /* FIXME: reusing a guest fd doesn't seem correct. */
             if (ret >= 0) {
@@ -243,7 +234,7 @@ void mips_semihosting(CPUMIPSState *env)
                 break;
             }
 
-            semihost_sys_open(cs, uhi_cb, gpr[4], 0, gpr[5], gpr[6]);
+            semihost_sys_open(cs, uhi_cb, fname, 0, gpr[5], gpr[6]);
         }
         break;
 
@@ -314,14 +305,14 @@ void mips_semihosting(CPUMIPSState *env)
 
             pct_d = strstr(p, "%d");
             if (!pct_d) {
-                FREE_TARGET_STRING(p, addr);
+                unlock_user(p, addr, 0);
                 semihost_sys_write(cs, uhi_cb, 2, addr, len);
                 break;
             }
 
             str = g_string_new_len(p, pct_d - p);
             g_string_append_printf(str, "%d%s", (int)gpr[5], pct_d + 2);
-            FREE_TARGET_STRING(p, addr);
+            unlock_user(p, addr, 0);
 
             /*
              * When we're using gdb, we need a guest address, so
-- 
2.34.1



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

* Re: [PATCH v5 2/8] target/mips: Drop link syscall from semihosting
  2022-06-28 11:16 ` [PATCH v5 2/8] target/mips: Drop link syscall from semihosting Richard Henderson
@ 2022-07-12 20:19   ` Philippe Mathieu-Daudé via
  0 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-07-12 20:19 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: alex.bennee, jiaxun.yang, aleksandar.rikalo

On 28/6/22 13:16, Richard Henderson wrote:
> We don't implement it with _WIN32 hosts, and the syscall
> is missing from the gdb remote file i/o interface.
> Since we can't implement it universally, drop it.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/mips/tcg/sysemu/mips-semi.c | 9 ---------
>   1 file changed, 9 deletions(-)

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


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

* Re: [PATCH v5 3/8] target/mips: Use semihosting/syscalls.h
  2022-06-28 11:16 ` [PATCH v5 3/8] target/mips: Use semihosting/syscalls.h Richard Henderson
@ 2022-07-12 20:21   ` Philippe Mathieu-Daudé via
  2022-07-12 20:25   ` Philippe Mathieu-Daudé via
  1 sibling, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-07-12 20:21 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: alex.bennee, jiaxun.yang, aleksandar.rikalo

On 28/6/22 13:16, Richard Henderson wrote:
> This separates guest file descriptors from host file descriptors,
> and utilizes shared infrastructure for integration with gdbstub.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/mips/tcg/sysemu/mips-semi.c | 219 +++++++++++++----------------
>   1 file changed, 95 insertions(+), 124 deletions(-)

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


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

* Re: [PATCH v5 5/8] target/mips: Use error_report for UHI_assert
  2022-06-28 11:16 ` [PATCH v5 5/8] target/mips: Use error_report for UHI_assert Richard Henderson
@ 2022-07-12 20:22   ` Philippe Mathieu-Daudé via
  0 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-07-12 20:22 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: alex.bennee, jiaxun.yang, aleksandar.rikalo

On 28/6/22 13:16, Richard Henderson wrote:
> Always log the assert locally.  Do not report_fault, but
> instead include the fact of the fault in the assertion.
> Don't bother freeing allocated strings before the abort().
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/mips/tcg/sysemu/mips-semi.c | 39 ++++++++++++++----------------
>   1 file changed, 18 insertions(+), 21 deletions(-)

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


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

* Re: [PATCH v5 7/8] target/mips: Simplify UHI_argnlen and UHI_argn
  2022-06-28 11:17 ` [PATCH v5 7/8] target/mips: Simplify UHI_argnlen and UHI_argn Richard Henderson
@ 2022-07-12 20:22   ` Philippe Mathieu-Daudé via
  0 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-07-12 20:22 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: alex.bennee, jiaxun.yang, aleksandar.rikalo

On 28/6/22 13:17, Richard Henderson wrote:
> With semihosting_get_arg, we already have a check vs argc, so
> there's no point replicating it -- just check the result vs NULL.
> Merge copy_argn_to_target into its caller.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/mips/tcg/sysemu/mips-semi.c | 44 ++++++++++++++----------------
>   1 file changed, 21 insertions(+), 23 deletions(-)

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


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

* Re: [PATCH v5 1/8] target/mips: Create report_fault for semihosting
  2022-06-28 11:16 ` [PATCH v5 1/8] target/mips: Create report_fault for semihosting Richard Henderson
@ 2022-07-12 20:23   ` Philippe Mathieu-Daudé via
  0 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-07-12 20:23 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: alex.bennee, jiaxun.yang, aleksandar.rikalo

On 28/6/22 13:16, 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(-)

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


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

* Re: [PATCH v5 4/8] target/mips: Avoid qemu_semihosting_log_out for UHI_plog
  2022-06-28 11:16 ` [PATCH v5 4/8] target/mips: Avoid qemu_semihosting_log_out for UHI_plog Richard Henderson
@ 2022-07-12 20:25   ` Philippe Mathieu-Daudé via
  0 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-07-12 20:25 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: alex.bennee, jiaxun.yang, aleksandar.rikalo

On 28/6/22 13:16, Richard Henderson wrote:
> Use semihost_sys_write and/or qemu_semihosting_console_write
> for implementing plog.  When using gdbstub, copy the temp
> string below the stack so that gdb has a guest address from
> which to perform the log.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/mips/tcg/sysemu/mips-semi.c | 52 +++++++++++++++++++++++-------
>   1 file changed, 41 insertions(+), 11 deletions(-)

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


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

* Re: [PATCH v5 3/8] target/mips: Use semihosting/syscalls.h
  2022-06-28 11:16 ` [PATCH v5 3/8] target/mips: Use semihosting/syscalls.h Richard Henderson
  2022-07-12 20:21   ` Philippe Mathieu-Daudé via
@ 2022-07-12 20:25   ` Philippe Mathieu-Daudé via
  1 sibling, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-07-12 20:25 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: alex.bennee, jiaxun.yang, aleksandar.rikalo

On 28/6/22 13:16, Richard Henderson wrote:
> This separates guest file descriptors from host file descriptors,
> and utilizes shared infrastructure for integration with gdbstub.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/mips/tcg/sysemu/mips-semi.c | 219 +++++++++++++----------------
>   1 file changed, 95 insertions(+), 124 deletions(-)

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


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

* Re: [PATCH v5 0/8] target/mips: semihosting cleanup
  2022-06-28 11:16 [PATCH v5 0/8] target/mips: semihosting cleanup Richard Henderson
                   ` (7 preceding siblings ...)
  2022-06-28 11:17 ` [PATCH v5 8/8] target/mips: Remove GET_TARGET_STRING and FREE_TARGET_STRING Richard Henderson
@ 2022-07-12 20:25 ` Philippe Mathieu-Daudé via
  8 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-07-12 20:25 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: alex.bennee, jiaxun.yang, aleksandar.rikalo

On 28/6/22 13:16, Richard Henderson wrote:

> Richard Henderson (8):
>    target/mips: Create report_fault for semihosting
>    target/mips: Drop link syscall from semihosting
>    target/mips: Use semihosting/syscalls.h
>    target/mips: Avoid qemu_semihosting_log_out for UHI_plog
>    target/mips: Use error_report for UHI_assert
>    semihosting: Remove qemu_semihosting_log_out
>    target/mips: Simplify UHI_argnlen and UHI_argn
>    target/mips: Remove GET_TARGET_STRING and FREE_TARGET_STRING
> 
>   include/semihosting/console.h      |  13 -
>   semihosting/console.c              |   9 -
>   target/mips/tcg/sysemu/mips-semi.c | 397 ++++++++++++++---------------
>   3 files changed, 186 insertions(+), 233 deletions(-)
> 

Queued, thanks!


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

end of thread, other threads:[~2022-07-12 20:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28 11:16 [PATCH v5 0/8] target/mips: semihosting cleanup Richard Henderson
2022-06-28 11:16 ` [PATCH v5 1/8] target/mips: Create report_fault for semihosting Richard Henderson
2022-07-12 20:23   ` Philippe Mathieu-Daudé via
2022-06-28 11:16 ` [PATCH v5 2/8] target/mips: Drop link syscall from semihosting Richard Henderson
2022-07-12 20:19   ` Philippe Mathieu-Daudé via
2022-06-28 11:16 ` [PATCH v5 3/8] target/mips: Use semihosting/syscalls.h Richard Henderson
2022-07-12 20:21   ` Philippe Mathieu-Daudé via
2022-07-12 20:25   ` Philippe Mathieu-Daudé via
2022-06-28 11:16 ` [PATCH v5 4/8] target/mips: Avoid qemu_semihosting_log_out for UHI_plog Richard Henderson
2022-07-12 20:25   ` Philippe Mathieu-Daudé via
2022-06-28 11:16 ` [PATCH v5 5/8] target/mips: Use error_report for UHI_assert Richard Henderson
2022-07-12 20:22   ` Philippe Mathieu-Daudé via
2022-06-28 11:16 ` [PATCH v5 6/8] semihosting: Remove qemu_semihosting_log_out Richard Henderson
2022-06-28 11:17 ` [PATCH v5 7/8] target/mips: Simplify UHI_argnlen and UHI_argn Richard Henderson
2022-07-12 20:22   ` Philippe Mathieu-Daudé via
2022-06-28 11:17 ` [PATCH v5 8/8] target/mips: Remove GET_TARGET_STRING and FREE_TARGET_STRING Richard Henderson
2022-07-12 20:25 ` [PATCH v5 0/8] target/mips: semihosting cleanup Philippe Mathieu-Daudé via

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.